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.
See Also
See other functions in this section
Availability
In release 6.4.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.
See Also
See other functions in this section
Availability
In release 6.4.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.
See Also
See other functions in this section
Availability
In release 6.4.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.
See Also
See other functions in this section
Availability
In release 6.4.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
See Also
See other functions in this section
Availability
In release 6.4.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
See Also
See other functions in this section
Availability
In release 6.4.0
Constructs a comparison matrix from a given local data file
Synopsis
Prototype
AjPMatrix ajMatrixNewFile (
const AjPStr filename
);
Type | Name | Read/Write | Description |
const AjPStr | filename | Input | Input filename |
AjPMatrix | | RETURN | Matrix object |
Input
filename: | (Input) | Input filename |
Returns
Description
Constructs a comparison matrix from a given local data file
See Also
See other functions in this section
Availability
In release 6.4.0
Constructs a comparison matrix from a given local data file
Synopsis
Prototype
AjPMatrixf ajMatrixfNewFile (
const AjPStr filename
);
Type | Name | Read/Write | Description |
const AjPStr | filename | Input | Input filename |
AjPMatrixf | | RETURN | Float matrix object |
Input
filename: | (Input) | Input filename |
Returns
AjPMatrixf: | Float matrix object |
Description
Constructs a comparison matrix from a given local data file
See Also
See other functions in this section
Availability
In release 6.4.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 ajMatrixSeqIndex (
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 to index numbers using the matrix's
internal conversion table. Sequence characters not defined
in the matrix are converted to zero.
See Also
See other functions in this section
Availability
In release 6.4.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 ajMatrixfSeqIndex (
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.
See Also
See other functions in this section
Availability
In release 6.4.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
See Also
See other functions in this section
Availability
In release 6.4.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
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the matrix values array in the matrix
Synopsis
Prototype
AjIntArray* ajMatrixGetMatrix (
const AjPMatrix thys
);
Type | Name | Read/Write | Description |
const AjPMatrix | thys | Input | Matrix object |
AjIntArray* | | RETURN | Matrix values array |
Input
thys: | (Input) | Matrix object |
Returns
AjIntArray*: | Matrix values array |
Description
Returns the matrix values array in the matrix
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the matrix values array in the matrix
Synopsis
Prototype
AjFloatArray* ajMatrixfGetMatrix (
const AjPMatrixf thys
);
Type | Name | Read/Write | Description |
const AjPMatrixf | thys | Input | Matrix object |
AjFloatArray* | | RETURN | Matrix values array |
Input
thys: | (Input) | Matrix object |
Returns
AjFloatArray*: | Matrix values array |
Description
Returns the matrix values array in the matrix
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the comparison matrix row size.
Synopsis
Prototype
ajuint ajMatrixGetRows (
const AjPMatrix thys
);
Type | Name | Read/Write | Description |
const AjPMatrix | thys | Input | Matrix object |
ajuint | | RETURN | . |
Input
thys: | (Input) | Matrix object |
Returns
Description
Returns the comparison matrix row size.
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the comparison matrix size.
Synopsis
Prototype
ajuint ajMatrixGetSize (
const AjPMatrix thys
);
Type | Name | Read/Write | Description |
const AjPMatrix | thys | Input | Matrix object |
ajuint | | RETURN | . |
Input
thys: | (Input) | Matrix object |
Returns
Description
Returns the comparison matrix size.
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the comparison matrix row size.
Synopsis
Prototype
ajuint ajMatrixfGetRows (
const AjPMatrixf thys
);
Type | Name | Read/Write | Description |
const AjPMatrixf | thys | Input | Matrix object |
ajuint | | RETURN | . |
Input
thys: | (Input) | Matrix object |
Returns
Description
Returns the comparison matrix row size.
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the comparison matrix size.
Synopsis
Prototype
ajuint ajMatrixfGetSize (
const AjPMatrixf thys
);
Type | Name | Read/Write | Description |
const AjPMatrixf | thys | Input | Matrix object |
ajuint | | RETURN | . |
Input
thys: | (Input) | Matrix object |
Returns
Description
Returns the comparison matrix size.
See Also
See other functions in this section
Availability
In release 6.4.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 ajMatrixGetCvt (
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.
See Also
See other functions in this section
Availability
In release 6.4.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 ajMatrixfGetCvt (
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.
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the sequence character (or asymmetric matrix label)
for a matrix column.
Synopsis
Prototype
const AjPStr ajMatrixGetLabelNum (
const AjPMatrix thys,
ajint i
);
Type | Name | Read/Write | Description |
const AjPMatrix | thys | Input | Matrix object |
ajint | i | Input | Character index |
const AjPStr | | RETURN | Matrix label, e.g. sequence character code
or '?' if not found |
Input
thys: | (Input) | Matrix object |
i: | (Input) | Character index |
Returns
const AjPStr: | Matrix label, e.g. sequence character code
or '?' if not found |
Description
Returns the sequence character (or asymmetric matrix label)
for a matrix column.
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the sequence character (or asymmetric matrix label)
for a matrix column.
Synopsis
Prototype
const AjPStr ajMatrixfGetLabelNum (
const AjPMatrixf thys,
ajint i
);
Type | Name | Read/Write | Description |
const AjPMatrixf | thys | Input | Matrix object |
ajint | i | Input | Character index |
const AjPStr | | RETURN | Matrix label, e.g. sequence character code
or '?' if not found |
Input
thys: | (Input) | Matrix object |
i: | (Input) | Character index |
Returns
const AjPStr: | Matrix label, e.g. sequence character code
or '?' if not found |
Description
Returns the sequence character (or asymmetric matrix label)
for a matrix column.
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the name of a matrix object, usually the filename from
which it was read.
Synopsis
Prototype
const AjPStr ajMatrixGetName (
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.
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the name of a matrix object, usually the filename from
which it was read.
Synopsis
Prototype
const AjPStr ajMatrixfGetName (
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.
See Also
See other functions in this section
Availability
In release 6.4.0
Cleans matrix processing internals
Synopsis
Prototype
void ajMatrixExit (
void
);
Type | Name | Read/Write | Description |
void | | RETURN | |
Returns
Description
Cleans matrix processing internals
See Also
See other functions in this section
Availability
In release 6.4.0