ajmatrices.c
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.
The matrix comparison value table Matrix is created and initialised
with zeroes.
Synopsis
Prototype
AjPMatrix ajMatrixNew (
const AjPPStr codes,
ajint n,
const AjPStr filename
);
Input
| codes: | (Input) | Matrix labels, e.g. valid sequence
character codes |
| n: | (Input) | Number of labels |
| filename: | (Input) | Matrix filename |
Returns
| AjPMatrix: | New matrix, or NULL if codes, n or filename are 0. |
Description
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.
The matrix comparison value table Matrix is created and initialised
with zeroes.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Creates a new, zero assymetrical 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.
The matrix comparison value table Matrix is created and initialised
with zeroes.
Synopsis
Prototype
AjPMatrix ajMatrixNewAsym (
const AjPPStr codes,
ajint n,
const AjPPStr rcodes,
ajint rn,
const AjPStr filename
);
Input
| codes: | (Input) | Matrix column labels, e.g. valid sequence
character codes |
| n: | (Input) | Number of column labels |
| rcodes: | (Input) | Matrix row labels, e.g. valid sequence
character codes |
| rn: | (Input) | Number of row labels |
| filename: | (Input) | Matrix filename |
Returns
| AjPMatrix: | New matrix, or NULL if codes, n or filename are 0. |
Description
Creates a new, zero assymetrical 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.
The matrix comparison value table Matrix is created and initialised
with zeroes.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
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.
The matrix comparison value table Matrix is created and initialised
with zeroes.
Synopsis
Prototype
AjPMatrixf ajMatrixfNew (
const AjPPStr codes,
ajint n,
const AjPStr filename
);
Input
| codes: | (Input) | Matrix labels,
e.g. valid sequence char codes |
| n: | (Input) | Number of labels |
| filename: | (Input) | Matrix filename |
Returns
| AjPMatrixf: | New matrix, or NULL if codes, n or filename are 0. |
Description
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.
The matrix comparison value table Matrix is created and initialised
with zeroes.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Creates a new, zero assymetrical 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.
The matrix comparison value table Matrix is created and initialised
with zeroes.
Synopsis
Prototype
AjPMatrixf ajMatrixfNewAsym (
const AjPPStr codes,
ajint n,
const AjPPStr rcodes,
ajint rn,
const AjPStr filename
);
Input
| codes: | (Input) | Matrix labels,
e.g. valid sequence char codes |
| n: | (Input) | Number of labels |
| rcodes: | (Input) | Matrix row labels, e.g. valid sequence
character codes. |
| rn: | (Input) | Number of row labels |
| filename: | (Input) | Matrix filename |
Returns
| AjPMatrixf: | New matrix, or NULL if codes, n or filename are 0. |
Description
Creates a new, zero assymetrical 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.
The matrix comparison value table Matrix is created and initialised
with zeroes.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Delete a float matrix
Synopsis
Prototype
void ajMatrixfDel (
AjPMatrixf* thys
);
Output
| thys: | (Output) | Matrix to delete |
Returns
Description
Delete a float matrix
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Delete an integer matrix
Synopsis
Prototype
void ajMatrixDel (
AjPMatrix* thys
);
Output
| thys: | (Output) | Matrix to delete |
Returns
Description
Delete an integer matrix
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns the comparison matrix as an array of integer arrays.
Sequence characters are indexed in this array using the internal
Sequence Conversion table in the matrix (see ajMatrixCvt)
Synopsis
Prototype
AjIntArray* ajMatrixArray (
const AjPMatrix thys
);
Input
| thys: | (Input) | Matrix object |
Returns
| AjIntArray*: | array of integer arrays for comparison values. |
Description
Returns the comparison matrix as an array of integer arrays.
Sequence characters are indexed in this array using the internal
Sequence Conversion table in the matrix (see ajMatrixCvt)
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns the comparison matrix as an array of float arrays.
Sequence characters are indexed in this array using the internal
Sequence Conversion table in the matrix (see ajMatrixCvt)
Synopsis
Prototype
AjFloatArray* ajMatrixfArray (
const AjPMatrixf thys
);
Input
| thys: | (Input) | Float Matrix object |
Returns
| AjFloatArray*: | array of float arrays for comparison values. |
Description
Returns the comparison matrix as an array of float arrays.
Sequence characters are indexed in this array using the internal
Sequence Conversion table in the matrix (see ajMatrixCvt)
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns the comparison matrix size.
Synopsis
Prototype
ajint ajMatrixSize (
const AjPMatrix thys
);
Input
| thys: | (Input) | Matrix object |
Returns
Description
Returns the comparison matrix size.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns the comparison matrix size.
Synopsis
Prototype
ajint ajMatrixfSize (
const AjPMatrixf thys
);
Input
| thys: | (Input) | Matrix object |
Returns
Description
Returns the comparison matrix size.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
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.
Synopsis
Prototype
AjPSeqCvt ajMatrixCvt (
const AjPMatrix thys
);
Input
| thys: | (Input) | Matrix object |
Returns
| AjPSeqCvt: | sequence character conversion table |
Description
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.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
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.
Synopsis
Prototype
AjPSeqCvt ajMatrixfCvt (
const AjPMatrixf thys
);
Input
| thys: | (Input) | Float Matrix object |
Returns
| AjPSeqCvt: | sequence character conversion table |
Description
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.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns the sequence character conversion table for a matrix.
This table converts any string defined in the matrix to a
positive integer, and any other string is converted to zero.
Synopsis
Prototype
void ajMatrixChar (
const AjPMatrix thys,
ajint i,
AjPStr* label
);
Input
| thys: | (Input) | Matrix object |
| i: | (Input) | Character index |
Output
| label: | (Output) | Matrix label, e.g. sequence character code |
Returns
Description
Returns the sequence character conversion table for a matrix.
This table converts any string defined in the matrix to a
positive integer, and any other string is converted to zero.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
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.
Synopsis
Prototype
void ajMatrixfChar (
const AjPMatrixf thys,
ajint i,
AjPStr* label
);
Input
| thys: | (Input) | Matrix object |
| i: | (Input) | Character index |
Output
| label: | (Output) | Matrix label, e.g. sequence character code |
Returns
Description
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.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns the name of a matrix object, usually the filename from
which it was read.
Synopsis
Prototype
const AjPStr ajMatrixName (
const AjPMatrix thys
);
Input
| thys: | (Input) | Matrix object |
Returns
| const AjPStr: | The name, a pointer to the internal name. |
Description
Returns the name of a matrix object, usually the filename from
which it was read.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns the name of a matrix object, usually the filename from
which it was read.
Synopsis
Prototype
const AjPStr ajMatrixfName (
const AjPMatrixf thys
);
Input
| thys: | (Input) | Matrix object |
Returns
| const AjPStr: | The name, a pointer to the internal name. |
Description
Returns the name of a matrix object, usually the filename from
which it was read.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Constructs a comparison matrix from a given local data file
Synopsis
Prototype
AjBool ajMatrixRead (
AjPMatrix* pthis,
const AjPStr filename
);
Input
| filename: | (Input) | Input filename |
Output
| pthis: | (Output) | New Matrix object. |
Returns
| AjBool: | ajTrue on success. |
Description
Constructs a comparison matrix from a given local data file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Constructs a comparison matrix from a given local data file
Synopsis
Prototype
AjBool ajMatrixfRead (
AjPMatrixf* pthis,
const AjPStr filename
);
Input
| filename: | (Input) | Input filename |
Output
| pthis: | (Output) | New Float Matrix object. |
Returns
| AjBool: | ajTrue on success. |
Description
Constructs a comparison matrix from a given local data file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Converts a sequence top index numbers using the matrix's
internal conversion table. Sequence characters not defined
in the matrix are converted to zero.
Synopsis
Prototype
AjBool ajMatrixSeqNum (
const AjPMatrix thys,
const AjPSeq seq,
AjPStr* numseq
);
Input
| thys: | (Input) | Matrix object |
| seq: | (Input) | Sequence object |
Output
| numseq: | (Output) | Index code version of the sequence |
Returns
| AjBool: | ajTrue on success. |
Description
Converts a sequence top index numbers using the matrix's
internal conversion table. Sequence characters not defined
in the matrix are converted to zero.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Converts a sequence to index numbers using the matrix's
internal conversion table. Sequence characters not defined
in the matrix are converted to zero.
Synopsis
Prototype
AjBool ajMatrixfSeqNum (
const AjPMatrixf thys,
const AjPSeq seq,
AjPStr* numseq
);
Input
| thys: | (Input) | Float Matrix object |
| seq: | (Input) | Sequence object |
Output
| numseq: | (Output) | Index code version of the sequence |
Returns
| AjBool: | ajTrue on success. |
Description
Converts a sequence to index numbers using the matrix's
internal conversion table. Sequence characters not defined
in the matrix are converted to zero.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns the character codes for each offset in the matrix
Synopsis
Prototype
AjPStr ajMatrixGetCodes (
const AjPMatrix thys
);
Input
| thys: | (Input) | Matrix object |
Returns
Description
Returns the character codes for each offset in the matrix
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns the character codes for each offset in the matrix
Synopsis
Prototype
AjPStr ajMatrixfGetCodes (
const AjPMatrixf thys
);
Input
| thys: | (Input) | Matrix object |
Returns
Description
Returns the character codes for each offset in the matrix
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0