Pam250Scoring
in package
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
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
__construct()
Pam250Scoring constructor.
public
__construct(Pam250MatrixDigitApiAdapter $oPam250Adapter) : mixed
Parameters
- $oPam250Adapter : Pam250MatrixDigitApiAdapter
score()
public
score(string $sFirstSymbol, string $sSecondSymbol) : int
Parameters
- $sFirstSymbol : string
- $sSecondSymbol : string
Tags
Return values
intsupportsMolType()
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