Documentation

NucleotideAmbiguityScoring implements SubstitutionScoringInterface, MoleculeAwareScoringInterface

Scores two nucleotides by the bases each may stand for. Two definite bases are a match or a mismatch ; when one of them is an ambiguity code (R, Y, S, W, K, M, B, D, H, V, N, X), the pair is a mismatch only if the two sets of bases share nothing (R against Y : A/G against C/T), and otherwise scores the intermediate "ambiguous" value, 0 by default - a read that says N neither confirms nor refutes the base facing it, where SimpleMatchMismatchScoring gives N against N a full match and R against A a full mismatch. U is read as T, so DNA and RNA score alike. Case insensitive.

Class NucleotideAmbiguityScoring

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.

Constants

BASES  : array<string|int, string> = ["A" => "A", "C" => "C", "G" => "G", "T" => "T"...

Properties

$ambiguousScore  : int
$matchScore  : int
$mismatchScore  : int

Methods

__construct()  : mixed
NucleotideAmbiguityScoring constructor.
score()  : int
supportsMolType()  : bool

Constants

BASES

private array<string|int, string> BASES = ["A" => "A", "C" => "C", "G" => "G", "T" => "T", "U" => "T", "R" => "AG", "Y" => "CT", "S" => "CG", "W" => "AT", "K" => "GT", "M" => "AC", "B" => "CGT", "D" => "AGT", "H" => "ACT", "V" => "ACG", "N" => "ACGT", "X" => "ACGT"]

The bases each IUPAC symbol stands for

Properties

Methods

__construct()

NucleotideAmbiguityScoring constructor.

public __construct([int $iMatchScore = 1 ][, int $iMismatchScore = -1 ][, int $iAmbiguousScore = 0 ]) : mixed
Parameters
$iMatchScore : int = 1

Two identical definite bases

$iMismatchScore : int = -1

Two bases, or sets of bases, with nothing in common

$iAmbiguousScore : int = 0

An ambiguity code facing a base (or a code) it may stand for

supportsMolType()

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

Search results