ajalign.c


Function ajAlignDefine

Defines a sequence set as an alignment. The sequences are stored internally and may be edited by alignment processing.

Prototype

AjBool ajAlignDefine (
      AjPAlign thys,
      AjPSeqset seqset
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
AjPSeqsetseqsetModifySequence set object
AjBool RETURNajTrue on success

From EMBOSS 2.1.0


Function ajAlignDefineSS

Defines a sequence pair as an alignment. Either new copies of the sequences or direct references to them are made depending on the value of the SeqExternal attribute of the alignment object.

Prototype

AjBool ajAlignDefineSS (
      AjPAlign thys,
      const AjPSeq seqa,
      const AjPSeq seqb
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPSeqseqaInputSequence object
const AjPSeqseqbInputSecond sequence object
AjBool RETURNajTrue on success

From EMBOSS 2.1.0


Function ajAlignDefineCC

Defines a pair of char* strings as an alignment

Prototype

AjBool ajAlignDefineCC (
      AjPAlign thys,
      const char* seqa,
      const char* seqb,
      const char* namea,
      const char* nameb
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const char*seqaInputFirst sequence
const char*seqbInputSecond sequence
const char*nameaInputName of first sequence
const char*namebInputName of second sequence
AjBool RETURNajTrue on success

From EMBOSS 2.9.0


Function ajAlignDel

Destructor for Alignment objects

Prototype

void ajAlignDel (
      AjPAlign* pthys
);

TypeNameRead/WriteDescription
AjPAlign*pthysDeleteAlignment object reference
void RETURN

From EMBOSS 2.1.0


Function ajAlignReset

Reset for Alignment objects

Prototype

void ajAlignReset (
      AjPAlign thys
);

TypeNameRead/WriteDescription
AjPAlignthysOutputAlignment object reference
void RETURN

From EMBOSS 2.1.0


Function ajAlignOpen

Opens a new align file

Prototype

AjBool ajAlignOpen (
      AjPAlign thys,
      const AjPStr name
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrnameInputFile name
AjBool RETURNajTrue on success

From EMBOSS 2.1.0


Function ajAlignFormatDefault

Sets the default format for an alignment

Prototype

AjBool ajAlignFormatDefault (
      AjPStr* pformat
);

TypeNameRead/WriteDescription
AjPStr*pformatOutputDefault format returned
AjBool RETURNajTrue if format was returned

From EMBOSS 2.1.0


Function ajAlignGetLen

Returns the filename for an alignment. If the alignment has more than one sub-alignment, returns the total.

Prototype

ajint ajAlignGetLen (
      const AjPAlign thys
);

TypeNameRead/WriteDescription
const AjPAlignthysInputAlignment object.
ajint RETURNAlignment length.

From EMBOSS 4.1.0


Function ajAlignGetFilename

Returns the filename for an alignment.

Prototype

const char* ajAlignGetFilename (
      const AjPAlign thys
);

TypeNameRead/WriteDescription
const AjPAlignthysInputAlignment object.
const char* RETURNFilename.

From EMBOSS 4.0.0


Function ajAlignGetFormat

Returns the sequence format for an alignment.

Prototype

const AjPStr ajAlignGetFormat (
      const AjPAlign thys
);

TypeNameRead/WriteDescription
const AjPAlignthysInputAlignment object.
const AjPStr RETURNAlignment format

From EMBOSS 4.0.0


Function ajAlignFormatShowsSequences

Returns whether current alignment format includes sequences in output

Prototype

AjBool ajAlignFormatShowsSequences (
      const AjPAlign thys
);

TypeNameRead/WriteDescription
const AjPAlignthysInputAlignment object
AjBool RETURNtrue if sequences appear in output

From EMBOSS 6.2.0


Function ajAlignFindFormat

Looks for the specified align format in the internal definitions and returns the index.

Prototype

AjBool ajAlignFindFormat (
      const AjPStr format,
      ajint* iformat
);

TypeNameRead/WriteDescription
const AjPStrformatInputFormat required.
ajint*iformatOutputIndex
AjBool RETURNajTrue on success.

From EMBOSS 2.1.0


Function ajAlignValid

Test for an alignment object.

Prototype

AjBool ajAlignValid (
      AjPAlign thys
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
AjBool RETURNajTrue on success

From EMBOSS 2.1.0


Function ajAlignNew

Constructor for an alignment object

Prototype

AjPAlign ajAlignNew (
      void
);

TypeNameRead/WriteDescription
AjPAlign RETURNNew Alignment object

From EMBOSS 2.1.0


Function ajAlignWrite

Writes an alignment file

Prototype

void ajAlignWrite (
      AjPAlign thys
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
void RETURN

From EMBOSS 2.1.0


Function ajAlignClose

Closes an alignment

Prototype

void ajAlignClose (
      AjPAlign thys
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
void RETURN

From EMBOSS 2.1.0


Function ajAlignWriteHeader

Writes an alignment header.

Prototype

void ajAlignWriteHeader (
      AjPAlign thys
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object. Internal count is updated to avoid duplicate headers
void RETURN

From EMBOSS 2.1.0


Function ajAlignWriteTail

Writes an alignment tail

Prototype

void ajAlignWriteTail (
      AjPAlign thys
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetHeader

Defines an alignment header

Prototype

void ajAlignSetHeader (
      AjPAlign thys,
      const AjPStr header
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrheaderInputAlign header with embedded newlines
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetHeaderC

Defines an alignment header

Prototype

void ajAlignSetHeaderC (
      AjPAlign thys,
      const char* header
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const char*headerInputAlign header with embedded newlines
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetHeaderApp

Appends to an alignment header

Prototype

void ajAlignSetHeaderApp (
      AjPAlign thys,
      const AjPStr header
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrheaderInputAlign header with embedded newlines
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetTail

Defines an alignment tail

Prototype

void ajAlignSetTail (
      AjPAlign thys,
      const AjPStr tail
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrtailInputAlign tail with embedded newlines
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetTailC

Defines an alignment tail

Prototype

void ajAlignSetTailC (
      AjPAlign thys,
      const char* tail
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const char*tailInputAlign tail with embedded newlines
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetTailApp

Appends to an alignment tail

Prototype

void ajAlignSetTailApp (
      AjPAlign thys,
      const AjPStr tail
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrtailInputAlign tail with embedded newlines
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetSubTail

Defines an alignment tail

Prototype

void ajAlignSetSubTail (
      AjPAlign thys,
      const AjPStr tail
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrtailInputAlign tail with embedded newlines
void RETURN

From EMBOSS 2.9.0


Function ajAlignSetSubTailC

Defines an alignment tail

Prototype

void ajAlignSetSubTailC (
      AjPAlign thys,
      const char* tail
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const char*tailInputAlign tail with embedded newlines
void RETURN

From EMBOSS 2.9.0


Function ajAlignSetSubTailApp

Appends to an alignment tail

Prototype

void ajAlignSetSubTailApp (
      AjPAlign thys,
      const AjPStr tail
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrtailInputAlign tail with embedded newlines
void RETURN

From EMBOSS 2.9.0


Function ajAlignSetSubHeader

Defines an alignment subheader (cleared after printing so it can be set again for the next alignment)

Prototype

void ajAlignSetSubHeader (
      AjPAlign thys,
      const AjPStr subheader
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrsubheaderInputAlign subheader with embedded newlines
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetSubHeaderC

Defines an alignment header (cleared after printing so it can be set again for the next alignment)

Prototype

void ajAlignSetSubHeaderC (
      AjPAlign thys,
      const char* subheader
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const char*subheaderInputAlign subheader with embedded newlines
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetSubHeaderApp

Appends to an alignment subheader (cleared after printing so it can be set again for the next alignment)

Prototype

void ajAlignSetSubHeaderApp (
      AjPAlign thys,
      const AjPStr subheader
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrsubheaderInputAlign subheader with embedded newlines
void RETURN

From EMBOSS 2.5.1


Function ajAlignSetSubHeaderPre

Prepends to an alignment subheader (cleared after printing so it can be set again for the next alignment)

Prototype

void ajAlignSetSubHeaderPre (
      AjPAlign thys,
      const AjPStr subheader
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrsubheaderInputAlign subheader with embedded newlines
void RETURN

From EMBOSS 2.5.1


Function ajAlignSetMatrixName

Defines an alignment matrix

Prototype

void ajAlignSetMatrixName (
      AjPAlign thys,
      const AjPStr matrix
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const AjPStrmatrixInputMatrix name
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetMatrixNameC

Defines an alignment matrix

Prototype

void ajAlignSetMatrixNameC (
      AjPAlign thys,
      const char* matrix
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
const char*matrixInputMatrix name
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetMatrixInt

Defines an alignment matrix

Prototype

void ajAlignSetMatrixInt (
      AjPAlign thys,
      AjPMatrix matrix
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
AjPMatrixmatrixModifyMatrix object
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetMatrixFloat

Defines an alignment matrix

Prototype

void ajAlignSetMatrixFloat (
      AjPAlign thys,
      AjPMatrixf matrix
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
AjPMatrixfmatrixModifyMatrix (floating point version) object
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetGapI

Defines alignment gap penalties

Prototype

void ajAlignSetGapI (
      AjPAlign thys,
      ajint gappen,
      ajint extpen
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
ajintgappenInputGap penalty
ajintextpenInputGap extension penalty
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetGapR

Defines alignment gap penalties

Prototype

void ajAlignSetGapR (
      AjPAlign thys,
      float gappen,
      float extpen
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
floatgappenInputGap penalty
floatextpenInputGap extension penalty
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetScoreI

Defines alignment score

Prototype

void ajAlignSetScoreI (
      AjPAlign thys,
      ajint score
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
ajintscoreInputscore
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetScoreL

Defines alignment score

Prototype

void ajAlignSetScoreL (
      AjPAlign thys,
      ajlong score
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
ajlongscoreInputscore
void RETURN

From EMBOSS 4.0.0


Function ajAlignSetScoreR

Defines alignment score

Prototype

void ajAlignSetScoreR (
      AjPAlign thys,
      float score
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
floatscoreInputscore
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetStats

Sets standard properties for an alignment subheader. These are: Length, Identity, Gaps, Similarity, Score

Prototype

void ajAlignSetStats (
      AjPAlign thys,
      ajint iali,
      ajint len,
      ajint ident,
      ajint sim,
      ajint gaps,
      const AjPStr score
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
ajintialiInputAlignment number
ajintlenInputAlignment length
ajintidentInputNumber of identities
ajintsimInputNumber of similarities
ajintgapsInputNumber of gaps
const AjPStrscoreInputAlignment score (as saved by ajAlignSetScoreI or ajAlignSetScoreR)
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetSubStandard

Sets standard subheader using the properties for an alignment. These are: Length, Identity, Gaps, Similarity, Score

Prototype

void ajAlignSetSubStandard (
      AjPAlign thys,
      ajint iali
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
ajintialiInputAlignment number (or -1 for the latest)
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetType

Sets the align type (if it is not set already)

Prototype

void ajAlignSetType (
      AjPAlign thys
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
void RETURN

From EMBOSS 2.1.0


Function ajAlignSetExternal

Sets the align object to use external sequence references, which are to be copied pointers rather than clones of the whole sequence.

Prototype

void ajAlignSetExternal (
      AjPAlign thys,
      AjBool external
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
AjBoolexternalInputIf true, do not make copies of sequence data and do not delete internal sequence data
void RETURN

From EMBOSS 2.4.0


Function ajAlignSetRefSeqIndx

Sets the index of the reference sequence.

Prototype

void ajAlignSetRefSeqIndx (
      AjPAlign thys,
      ajint refseq
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
ajintrefseqInputindex of the reference sequence
void RETURN

From EMBOSS 6.3.0


Function ajAlignSetRange

Sets the alignment range in each sequence, but only for a pairwise alignment

Prototype

AjBool ajAlignSetRange (
      AjPAlign thys,
      ajint start1,
      ajint end1,
      ajint len1,
      ajint off1,
      ajint start2,
      ajint end2,
      ajint len2,
      ajint off2
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
ajintstart1InputStart in sequence 1
ajintend1InputEnd in sequence 1
ajintlen1InputLength of sequence 1
ajintoff1InputOffset of sequence 1
ajintstart2InputStart in sequence 2
ajintend2InputEnd in sequence 2
ajintlen2InputLength of sequence 2
ajintoff2InputOffset of sequence 2
AjBool RETURNajTrue on success. Failure also writes an error message.

From EMBOSS 2.3.0


Function ajAlignSetSubRange

Sets the local alignment sub range in each sequence, but only for a pairwise alignment.

Prototype

AjBool ajAlignSetSubRange (
      AjPAlign thys,
      ajint substart1,
      ajint start1,
      ajint end1,
      AjBool rev1,
      ajint len1,
      ajint substart2,
      ajint start2,
      ajint end2,
      AjBool rev2,
      ajint len2
);

TypeNameRead/WriteDescription
AjPAlignthysModifyAlignment object
ajintsubstart1InputSubsequence offset in sequence 1
ajintstart1InputSubsequence start in sequence 1
ajintend1InputSubsequence end in sequence 1
AjBoolrev1InputajTrue if sequence 1 is reversed
ajintlen1InputLength of sequence 1
ajintsubstart2InputSubsequence offset in sequence 2
ajintstart2InputSubsequence start in sequence 2
ajintend2InputSubsequence end in sequence 2
AjBoolrev2InputajTrue if sequence 2 is reversed
ajintlen2InputLength of sequence 2
AjBool RETURNajTrue on success. Failure also writes an error message.

From EMBOSS 2.5.1


Function ajAlignTraceT

Reports an AjPAlign object to debug output

Prototype

void ajAlignTraceT (
      const AjPAlign thys,
      const char* title
);

TypeNameRead/WriteDescription
const AjPAlignthysInputalignment object
const char*titleInputTrace report title
void RETURN

From EMBOSS 3.0.0


Function ajAlignTrace

Reports an AjPAlign object to debug output

Prototype

void ajAlignTrace (
      const AjPAlign thys
);

TypeNameRead/WriteDescription
const AjPAlignthysInputalignment object
void RETURN

From EMBOSS 2.1.0


Function ajAlignPrintFormat

Reports the internal data structures

Prototype

void ajAlignPrintFormat (
      AjPFile outf,
      AjBool full
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
AjBoolfullInputFull report (usually ajFalse)
void RETURN

From EMBOSS 2.5.0


Function ajAlignPrintbookFormat

Reports the alignment format internals as Docbook text

Prototype

void ajAlignPrintbookFormat (
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
void RETURN

From EMBOSS 6.2.0


Function ajAlignPrinthtmlFormat

Reports the internal data structures

Prototype

void ajAlignPrinthtmlFormat (
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
void RETURN

From EMBOSS 6.4.0


Function ajAlignPrintwikiFormat

Reports the alignment format internals as wikitext

Prototype

void ajAlignPrintwikiFormat (
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
void RETURN

From EMBOSS 6.2.0


Function ajAlignConsAmbig

Calculates alignment consensus of ambiguity characters from a sequence set.

Prototype

AjBool ajAlignConsAmbig (
      const AjPSeqset thys,
      AjPStr* cons
);

TypeNameRead/WriteDescription
const AjPSeqsetthysInputSequence set.
AjPStr*consOutputthe created consensus sequence
AjBool RETURNajTrue on success

From EMBOSS 6.0.0


Function ajAlignConsAmbigNuc

Calculates alignment consensus of ambiguity characters from a sequence set.

Prototype

AjBool ajAlignConsAmbigNuc (
      const AjPSeqset thys,
      AjPStr* cons
);

TypeNameRead/WriteDescription
const AjPSeqsetthysInputSequence set.
AjPStr*consOutputthe created consensus sequence
AjBool RETURNajTrue on success

From EMBOSS 6.0.0


Function ajAlignConsAmbigProt

Calculates alignment consensus of ambiguity characters from a sequence set.

Prototype

AjBool ajAlignConsAmbigProt (
      const AjPSeqset thys,
      AjPStr* cons
);

TypeNameRead/WriteDescription
const AjPSeqsetthysInputSequence set.
AjPStr*consOutputthe created consensus sequence
AjBool RETURNajTrue on success

From EMBOSS 6.0.0


Function ajAlignConsStats

Calculates alignment statistics (and a consensus) from a sequence set.

Prototype

AjBool ajAlignConsStats (
      const AjPSeqset thys,
      AjPMatrix mymatrix,
      AjPStr* cons,
      ajint* retident,
      ajint* retsim,
      ajint* retgap,
      ajint* retlen
);

TypeNameRead/WriteDescription
const AjPSeqsetthysInputSequence set.
AjPMatrixmymatrixOutputUser-defined matrix, or NULL for the default
AjPStr*consOutputthe created consensus sequence
ajint*retidentOutputnumber of residues identical in all sequences
ajint*retsimOutputnumber of residues similar in all sequences
ajint*retgapOutputnumber of residues with a gap in 1 sequence
ajint*retlenOutputlength of the alignment
AjBool RETURNajTrue on success

From EMBOSS 2.9.0


Function ajAlignExit

Cleans up report processing internal memory

Prototype

void ajAlignExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 4.0.0