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
);
| Type | Name | Read/Write | Description |
| const AjPPStr | codes | Input | Matrix labels, e.g. valid sequence
character codes |
| ajint | n | Input | Number of labels |
| const AjPStr | filename | Input | Matrix filename |
| AjPMatrix | | RETURN | New matrix, or NULL if codes, n or filename are 0. |
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 5.0.0
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.
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
);
| Type | Name | Read/Write | Description |
| const AjPPStr | codes | Input | Matrix column labels, e.g. valid sequence
character codes |
| ajint | n | Input | Number of column labels |
| const AjPPStr | rcodes | Input | Matrix row labels, e.g. valid sequence
character codes |
| ajint | rn | Input | Number of row labels |
| const AjPStr | filename | Input | Matrix filename |
| AjPMatrix | | RETURN | New matrix, or NULL if codes, n or filename are 0. |
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 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.
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPPStr | codes | Input | Matrix labels,
e.g. valid sequence char codes |
| ajint | n | Input | Number of labels |
| const AjPStr | filename | Input | Matrix filename |
| AjPMatrixf | | RETURN | New matrix, or NULL if codes, n or filename are 0. |
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 5.0.0
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.
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
);
| Type | Name | Read/Write | Description |
| const AjPPStr | codes | Input | Matrix labels,
e.g. valid sequence char codes |
| ajint | n | Input | Number of labels |
| const AjPPStr | rcodes | Input | Matrix row labels, e.g. valid sequence
character codes. |
| ajint | rn | Input | Number of row labels |
| const AjPStr | filename | Input | Matrix filename |
| AjPMatrixf | | RETURN | New matrix, or NULL if codes, n or filename are 0. |
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 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.
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 5.0.0
Delete a float matrix
Synopsis
Prototype
void ajMatrixfDel (
AjPMatrixf* thys
);
| Type | Name | Read/Write | Description |
| AjPMatrixf* | thys | Output | Matrix to delete |
| void | | RETURN | |
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 5.0.0
Delete an integer matrix
Synopsis
Prototype
void ajMatrixDel (
AjPMatrix* thys
);
| Type | Name | Read/Write | Description |
| AjPMatrix* | thys | Output | Matrix to delete |
| void | | RETURN | |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrix | thys | Input | Matrix object |
| AjIntArray* | | RETURN | array of integer arrays for comparison values. |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrixf | thys | Input | Float Matrix object |
| AjFloatArray* | | RETURN | array of float arrays for comparison values. |
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 5.0.0
Returns the comparison matrix size.
Synopsis
Prototype
ajint ajMatrixSize (
const AjPMatrix thys
);
| Type | Name | Read/Write | Description |
| const AjPMatrix | thys | Input | Matrix object |
| ajint | | RETURN | . |
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 5.0.0
Returns the comparison matrix size.
Synopsis
Prototype
ajint ajMatrixfSize (
const AjPMatrixf thys
);
| Type | Name | Read/Write | Description |
| const AjPMatrixf | thys | Input | Matrix object |
| ajint | | RETURN | . |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrix | thys | Input | Matrix object |
| AjPSeqCvt | | RETURN | sequence character conversion table |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrixf | thys | Input | Float Matrix object |
| AjPSeqCvt | | RETURN | sequence character conversion table |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrix | thys | Input | Matrix object |
| ajint | i | Input | Character index |
| AjPStr* | label | Output | Matrix label, e.g. sequence character code |
| void | | RETURN | |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrixf | thys | Input | Matrix object |
| ajint | i | Input | Character index |
| AjPStr* | label | Output | Matrix label, e.g. sequence character code |
| void | | RETURN | |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrix | thys | Input | Matrix object |
| const AjPStr | | RETURN | The name, a pointer to the internal name. |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrixf | thys | Input | Matrix object |
| const AjPStr | | RETURN | The name, a pointer to the internal name. |
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 5.0.0
Constructs a comparison matrix from a given local data file
Synopsis
Prototype
AjBool ajMatrixRead (
AjPMatrix* pthis,
const AjPStr filename
);
| Type | Name | Read/Write | Description |
| AjPMatrix* | pthis | Output | New Matrix object. |
| const AjPStr | filename | Input | Input filename |
| AjBool | | RETURN | ajTrue on success. |
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 5.0.0
Constructs a comparison matrix from a given local data file
Synopsis
Prototype
AjBool ajMatrixfRead (
AjPMatrixf* pthis,
const AjPStr filename
);
| Type | Name | Read/Write | Description |
| AjPMatrixf* | pthis | Output | New Float Matrix object. |
| const AjPStr | filename | Input | Input filename |
| AjBool | | RETURN | ajTrue on success. |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrix | thys | Input | Matrix object |
| const AjPSeq | seq | Input | Sequence object |
| AjPStr* | numseq | Output | Index code version of the sequence |
| AjBool | | RETURN | ajTrue on success. |
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 5.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
);
| Type | Name | Read/Write | Description |
| const AjPMatrixf | thys | Input | Float Matrix object |
| const AjPSeq | seq | Input | Sequence object |
| AjPStr* | numseq | Output | Index code version of the sequence |
| AjBool | | RETURN | ajTrue on success. |
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 5.0.0
Returns the character codes for each offset in the matrix
Synopsis
Prototype
AjPStr ajMatrixGetCodes (
const AjPMatrix thys
);
| Type | Name | Read/Write | Description |
| const AjPMatrix | thys | Input | Matrix object |
| AjPStr | | RETURN | Matrix codes |
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 5.0.0
Returns the character codes for each offset in the matrix
Synopsis
Prototype
AjPStr ajMatrixfGetCodes (
const AjPMatrixf thys
);
| Type | Name | Read/Write | Description |
| const AjPMatrixf | thys | Input | Matrix object |
| AjPStr | | RETURN | Matrix codes |
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 5.0.0