public class ScoringScheme
This abstract class is the superclass of all scoring schemes. It defines basic operations that must be provided by all subclasses. Scoring schemes are used by sequence alignment algorithms to compute the score of an alignment.
class PairwiseAlignmentAlgorithmprotected boolean case_sensitive
Determines whether this scoring scheme ignores the case of characters when computing their score. It is set by the constructor and cannot be changed afterwards.
public ScoringScheme()
Creates a new instance of an scoring scheme. The case of characters is significant when subsequently computing their score.
public ScoringScheme(boolean case_sensitive)
Creates a new instance of an scoring scheme. If case_sensitive is true, the case of characters is significant when subsequently computing their score; otherwise the case is ignored.
case_sensitive - true if the case of characters must be significant, false otherwisepublic boolean isCaseSensitive()
Tells whether this scoring scheme ignores the case of characters when computing their score.
true if the case of characters is significant, false otherwisepublic int scoreSubstitution(char a,
char b)
Returns the score of a substitution of character a for character b according to this scoring scheme. If this substitution is not defined, an exception is raised.
a - first characterb - second charactera for bIncompatibleScoringSchemeException - if this substitution is not definedpublic int scoreInsertion(char a)
Returns the score of an insertion of character a according to this scoring scheme. If this character is not recognised, an exception is raised.
a - the character to be insertedaIncompatibleScoringSchemeException - if character is not recognised by this scoring schemepublic int scoreDeletion(char a)
Returns the score of a deletion of character a according to this scoring scheme. If this character is not recognised, an exception is raised.
a - the character to be deletedaIncompatibleScoringSchemeException - if character is not recognised by this scoring schemepublic int maxAbsoluteScore()
Returns the maximum absolute score that this scoring scheme can return for any substitution, deletion or insertion.
public boolean isPartialMatchSupported()
Returns true if this scoring scheme supports partial matches, false otherwise. A partial match is a situation when two characters are not equal but, for any reason, are regarded as similar by this scoring scheme, which then returns a positive score. This is common when for scoring schemes that implement amino acid scoring matrices.
true if this scoring scheme supports partial matches, false otherwise