ajmatrices.c


Function ajMatrixNew

Creates a new, zero matrix from an array of strings and a matrix name. If the matrix is a residue substitution matrix then each string would be a defined sequence character.

Prototype

AjPMatrix ajMatrixNew (
      const AjPPStr codes,
      ajint n,
      const AjPStr filename
);

TypeNameRead/WriteDescription
const AjPPStrcodesInputMatrix labels, e.g. valid sequence character codes
ajintnInputNumber of labels
const AjPStrfilenameInputMatrix filename
AjPMatrix RETURNNew matrix, or NULL if codes, n or filename are 0.

From EMBOSS 1.0.0


Function ajMatrixNewAsym

Creates a new, zero asymmetrical matrix from two array of strings and a matrix name. If the matrix is a substitution matrix then each string would be a defined code, e.g. sequence character.

Prototype

AjPMatrix ajMatrixNewAsym (
      const AjPPStr codes,
      ajint n,
      const AjPPStr rcodes,
      ajint rn,
      const AjPStr filename
);

TypeNameRead/WriteDescription
const AjPPStrcodesInputMatrix column labels, e.g. valid sequence character codes
ajintnInputNumber of column labels
const AjPPStrrcodesInputMatrix row labels, e.g. valid sequence character codes
ajintrnInputNumber of row labels
const AjPStrfilenameInputMatrix filename
AjPMatrix RETURNNew matrix, or NULL if codes, n or filename are 0.

From EMBOSS 3.0.0


Function ajMatrixfNew

Creates a new, zero matrix from an array of strings and a matrix name. If the matrix is a residue substitution matrix then each string would be a defined sequence character.

Prototype

AjPMatrixf ajMatrixfNew (
      const AjPPStr codes,
      ajint n,
      const AjPStr filename
);

TypeNameRead/WriteDescription
const AjPPStrcodesInputMatrix labels, e.g. valid sequence char codes
ajintnInputNumber of labels
const AjPStrfilenameInputMatrix filename
AjPMatrixf RETURNNew matrix, or NULL if codes, n or filename are 0.

From EMBOSS 1.0.0


Function ajMatrixfNewAsym

Creates a new, zero asymmetrical matrix from an array of strings and a matrix name. If the matrix is a residue substitution matrix then each string would be a defined sequence character.

Prototype

AjPMatrixf ajMatrixfNewAsym (
      const AjPPStr codes,
      ajint n,
      const AjPPStr rcodes,
      ajint rn,
      const AjPStr filename
);

TypeNameRead/WriteDescription
const AjPPStrcodesInputMatrix labels, e.g. valid sequence char codes
ajintnInputNumber of labels
const AjPPStrrcodesInputMatrix row labels, e.g. valid sequence character codes.
ajintrnInputNumber of row labels
const AjPStrfilenameInputMatrix filename
AjPMatrixf RETURNNew matrix, or NULL if codes, n or filename are 0.

From EMBOSS 3.0.0


Function ajMatrixfDel

Delete a float matrix

Prototype

void ajMatrixfDel (
      AjPMatrixf* thys
);

TypeNameRead/WriteDescription
AjPMatrixf*thysOutputMatrix to delete
void RETURN

From EMBOSS 1.6.1


Function ajMatrixDel

Delete an integer matrix

Prototype

void ajMatrixDel (
      AjPMatrix* thys
);

TypeNameRead/WriteDescription
AjPMatrix*thysOutputMatrix to delete
void RETURN

From EMBOSS 2.1.0


Function ajMatrixNewFile

Constructs a comparison matrix from a given local data file

Prototype

AjPMatrix ajMatrixNewFile (
      const AjPStr filename
);

TypeNameRead/WriteDescription
const AjPStrfilenameInputInput filename
AjPMatrix RETURNMatrix object

From EMBOSS 6.2.0


Function ajMatrixfNewFile

Constructs a comparison matrix from a given local data file

Prototype

AjPMatrixf ajMatrixfNewFile (
      const AjPStr filename
);

TypeNameRead/WriteDescription
const AjPStrfilenameInputInput filename
AjPMatrixf RETURNFloat matrix object

From EMBOSS 6.2.0


Function ajMatrixSeqIndex

Converts a sequence to index numbers using the matrix's internal conversion table. Sequence characters not defined in the matrix are converted to zero.

Prototype

AjBool ajMatrixSeqIndex (
      const AjPMatrix thys,
      const AjPSeq seq,
      AjPStr* numseq
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
const AjPSeqseqInputSequence object
AjPStr*numseqOutputIndex code version of the sequence
AjBool RETURNajTrue on success.

From EMBOSS 6.2.0


Function ajMatrixfSeqIndex

Converts a sequence to index numbers using the matrix's internal conversion table. Sequence characters not defined in the matrix are converted to zero.

Prototype

AjBool ajMatrixfSeqIndex (
      const AjPMatrixf thys,
      const AjPSeq seq,
      AjPStr* numseq
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputFloat Matrix object
const AjPSeqseqInputSequence object
AjPStr*numseqOutputIndex code version of the sequence
AjBool RETURNajTrue on success.

From EMBOSS 6.2.0


Function ajMatrixGetCodes

Returns the character codes for each offset in the matrix

Prototype

AjPStr ajMatrixGetCodes (
      const AjPMatrix thys
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
AjPStr RETURNMatrix codes

From EMBOSS 4.0.0


Function ajMatrixfGetCodes

Returns the character codes for each offset in the matrix

Prototype

AjPStr ajMatrixfGetCodes (
      const AjPMatrixf thys
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
AjPStr RETURNMatrix codes

From EMBOSS 4.0.0


Function ajMatrixGetMatrix

Returns the matrix values array in the matrix

Prototype

AjIntArray* ajMatrixGetMatrix (
      const AjPMatrix thys
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
AjIntArray* RETURNMatrix values array

From EMBOSS 6.2.0


Function ajMatrixfGetMatrix

Returns the matrix values array in the matrix

Prototype

AjFloatArray* ajMatrixfGetMatrix (
      const AjPMatrixf thys
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
AjFloatArray* RETURNMatrix values array

From EMBOSS 6.2.0


Function ajMatrixGetRows

Returns the comparison matrix row size.

Prototype

ajuint ajMatrixGetRows (
      const AjPMatrix thys
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
ajuint RETURN.

From EMBOSS 6.3.0


Function ajMatrixGetSize

Returns the comparison matrix size.

Prototype

ajuint ajMatrixGetSize (
      const AjPMatrix thys
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
ajuint RETURN.

From EMBOSS 6.2.0


Function ajMatrixfGetRows

Returns the comparison matrix row size.

Prototype

ajuint ajMatrixfGetRows (
      const AjPMatrixf thys
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
ajuint RETURN.

From EMBOSS 6.3.0


Function ajMatrixfGetSize

Returns the comparison matrix size.

Prototype

ajuint ajMatrixfGetSize (
      const AjPMatrixf thys
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
ajuint RETURN.

From EMBOSS 6.2.0


Function ajMatrixGetCvt

Returns the sequence character conversion table for a matrix. This table converts any character defined in the matrix to a positive integer, and any other character is converted to zero.

Prototype

AjPSeqCvt ajMatrixGetCvt (
      const AjPMatrix thys
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
AjPSeqCvt RETURNsequence character conversion table

From EMBOSS 6.2.0


Function ajMatrixfGetCvt

Returns the sequence character conversion table for a matrix. This table converts any character defined in the matrix to a positive integer, and any other character is converted to zero.

Prototype

AjPSeqCvt ajMatrixfGetCvt (
      const AjPMatrixf thys
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputFloat Matrix object
AjPSeqCvt RETURNsequence character conversion table

From EMBOSS 6.2.0


Function ajMatrixGetLabelNum

Returns the sequence character (or asymmetric matrix label) for a matrix column.

Prototype

const AjPStr ajMatrixGetLabelNum (
      const AjPMatrix thys,
      ajint i
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
ajintiInputCharacter index
const AjPStr RETURNMatrix label, e.g. sequence character code or '?' if not found

From EMBOSS 6.2.0


Function ajMatrixfGetLabelNum

Returns the sequence character (or asymmetric matrix label) for a matrix column.

Prototype

const AjPStr ajMatrixfGetLabelNum (
      const AjPMatrixf thys,
      ajint i
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
ajintiInputCharacter index
const AjPStr RETURNMatrix label, e.g. sequence character code or '?' if not found

From EMBOSS 6.2.0


Function ajMatrixGetName

Returns the name of a matrix object, usually the filename from which it was read.

Prototype

const AjPStr ajMatrixGetName (
      const AjPMatrix thys
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
const AjPStr RETURNThe name, a pointer to the internal name.

From EMBOSS 6.2.0


Function ajMatrixfGetName

Returns the name of a matrix object, usually the filename from which it was read.

Prototype

const AjPStr ajMatrixfGetName (
      const AjPMatrixf thys
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
const AjPStr RETURNThe name, a pointer to the internal name.

From EMBOSS 6.2.0


Function ajMatrixExit

Cleans matrix processing internals

Prototype

void ajMatrixExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 6.2.0