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.

The matrix comparison value table Matrix is created and initialised with zeroes.

Synopsis

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.

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

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.

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
);

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.

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

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.

The matrix comparison value table Matrix is created and initialised with zeroes.

Synopsis

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.

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

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.

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
);

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.

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

Function ajMatrixfDel

Delete a float matrix

Synopsis

Prototype
void ajMatrixfDel (
      AjPMatrixf* thys
);

TypeNameRead/WriteDescription
AjPMatrixf*thysOutputMatrix to delete
void RETURN

Output
thys:(Output)Matrix to delete
Returns
void:No return value

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

Function ajMatrixDel

Delete an integer matrix

Synopsis

Prototype
void ajMatrixDel (
      AjPMatrix* thys
);

TypeNameRead/WriteDescription
AjPMatrix*thysOutputMatrix to delete
void RETURN

Output
thys:(Output)Matrix to delete
Returns
void:No return value

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

Function ajMatrixArray

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
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
AjIntArray* RETURNarray 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

Function ajMatrixfArray

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
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputFloat Matrix object
AjFloatArray* RETURNarray 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

Function ajMatrixSize

Returns the comparison matrix size.

Synopsis

Prototype
ajint ajMatrixSize (
      const AjPMatrix thys
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
ajint RETURN.

Input
thys:(Input)Matrix object
Returns
ajint:.

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

Function ajMatrixfSize

Returns the comparison matrix size.

Synopsis

Prototype
ajint ajMatrixfSize (
      const AjPMatrixf thys
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
ajint RETURN.

Input
thys:(Input)Matrix object
Returns
ajint:.

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

Function ajMatrixCvt

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
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
AjPSeqCvt RETURNsequence 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

Function ajMatrixfCvt

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
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputFloat Matrix object
AjPSeqCvt RETURNsequence 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

Function ajMatrixChar

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
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
ajintiInputCharacter index
AjPStr*labelOutputMatrix 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
void:No return value

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

Function ajMatrixfChar

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
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
ajintiInputCharacter index
AjPStr*labelOutputMatrix 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
void:No return value

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

Function ajMatrixName

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

Synopsis

Prototype
const AjPStr ajMatrixName (
      const AjPMatrix thys
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
const AjPStr RETURNThe 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

Function ajMatrixfName

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

Synopsis

Prototype
const AjPStr ajMatrixfName (
      const AjPMatrixf thys
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
const AjPStr RETURNThe 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

Function ajMatrixRead

Constructs a comparison matrix from a given local data file

Synopsis

Prototype
AjBool ajMatrixRead (
      AjPMatrix* pthis,
      const AjPStr filename
);

TypeNameRead/WriteDescription
AjPMatrix*pthisOutputNew Matrix object.
const AjPStrfilenameInputInput filename
AjBool RETURNajTrue 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

Function ajMatrixfRead

Constructs a comparison matrix from a given local data file

Synopsis

Prototype
AjBool ajMatrixfRead (
      AjPMatrixf* pthis,
      const AjPStr filename
);

TypeNameRead/WriteDescription
AjPMatrixf*pthisOutputNew Float Matrix object.
const AjPStrfilenameInputInput filename
AjBool RETURNajTrue 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

Function ajMatrixSeqNum

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
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
const AjPSeqseqInputSequence object
AjPStr*numseqOutputIndex code version of the sequence
AjBool RETURNajTrue 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

Function ajMatrixfSeqNum

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
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputFloat Matrix object
const AjPSeqseqInputSequence object
AjPStr*numseqOutputIndex code version of the sequence
AjBool RETURNajTrue 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

Function ajMatrixGetCodes

Returns the character codes for each offset in the matrix

Synopsis

Prototype
AjPStr ajMatrixGetCodes (
      const AjPMatrix thys
);

TypeNameRead/WriteDescription
const AjPMatrixthysInputMatrix object
AjPStr RETURNMatrix codes

Input
thys:(Input)Matrix object
Returns
AjPStr:Matrix codes

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

Function ajMatrixfGetCodes

Returns the character codes for each offset in the matrix

Synopsis

Prototype
AjPStr ajMatrixfGetCodes (
      const AjPMatrixf thys
);

TypeNameRead/WriteDescription
const AjPMatrixfthysInputMatrix object
AjPStr RETURNMatrix codes

Input
thys:(Input)Matrix object
Returns
AjPStr:Matrix codes

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