Documentation

Pam250Scoring implements SubstitutionScoringInterface, MoleculeAwareScoringInterface

Scores a pair of amino acid symbols using the PAM250 substitution matrix already exposed by bioapi for other parts of this library (see Api\Pam250MatrixDigitApi), rather than a flat match/mismatch rule. The matrix is fetched and flattened once, in the constructor, and is exhaustive for every ordered pair of the twenty standard amino acids ; it has no entry for any other symbol AminoAcidSequence tolerates - the ambiguous B, Z, J and X, selenocysteine U, pyrrolysine O and the stop "*" - which score() reports as an error rather than guessing a value.

Class Pam250Scoring

Tags
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

Table of Contents

Interfaces

SubstitutionScoringInterface
Interface SubstitutionScoringInterface - lets a pairwise aligner stay ignorant of how two symbols are scored against each other, whether by a flat match/mismatch rule or a substitution matrix such as PAM250.
MoleculeAwareScoringInterface
Interface MoleculeAwareScoringInterface - implemented by a scoring that only means something for some molecules (PAM250 for proteins, the IUPAC nucleotide scoring for DNA and RNA). The aligners refuse a sequence it does not support, instead of scoring A, C, G and T as alanine, cysteine, glycine and threonine. A scoring that does not implement it is taken to suit any molecule. Kept apart from SubstitutionScoringInterface, so that interface keeps its single method.

Properties

$matrix  : array<string|int, int>

Methods

__construct()  : mixed
Pam250Scoring constructor.
score()  : int
supportsMolType()  : bool
PAM250 scores amino acids : on DNA, A, C, G and T would be read as alanine, cysteine, glycine and threonine.

Properties

$matrix

private array<string|int, int> $matrix

Flattened matrix, keyed by the two-letter residue pair code

Methods

score()

public score(string $sFirstSymbol, string $sSecondSymbol) : int
Parameters
$sFirstSymbol : string
$sSecondSymbol : string
Tags
throws
InvalidAlignmentInputException

When the matrix has no entry for this pair

Return values
int

supportsMolType()

PAM250 scores amino acids : on DNA, A, C, G and T would be read as alanine, cysteine, glycine and threonine.

public supportsMolType(string $sMolType) : bool
Parameters
$sMolType : string
Return values
bool
On this page

Search results