jebl.evolution.align.scores
Class Scores
java.lang.Object
jebl.evolution.align.scores.Scores
- All Implemented Interfaces:
- ScoreMatrix
- Direct Known Subclasses:
- AminoAcidScores, NucleotideScores, SubstScoreMatrix
public abstract class Scores
- extends Object
- implements ScoreMatrix
Base class for all score matrices in the package.
- Author:
- Alexei Drummond
Field Summary |
float[][] |
score
|
score
public float[][] score
Scores
public Scores()
buildScores
protected void buildScores(float[][] scores)
getScore
public final float getScore(char x,
char y)
- Specified by:
getScore
in interface ScoreMatrix
- Returns:
- the score for matching char x with char y
toString
public String toString()
- Overrides:
toString
in class Object
duplicate
public static Scores duplicate(Scores scores)
includeGaps
public static Scores includeGaps(Scores scores,
float gapVersusResidueCost,
float gapVersusGapCost)
- Parameters:
scores
- gapVersusResidueCost
- should be a negative valuegapVersusGapCost
- should be a positive value
includeAdditionalCharacters
public static Scores includeAdditionalCharacters(Scores scores,
String characters)
- includes additional characters in the score matrix which will all have scored zero when compared to other
characters.
Current system does not handle special characters well, such as ? Or "R" for NucleotideSequences,
which represents a "A" or "G".
Currently, we just add all characters to the allowed set of characters, and they are scored as
zero cost when comparing to other characters, including themselves. One-day, we should probably
introduce better scoring system so that "R" is a positive score compared to "A" or "G",
but a negative score compared to "C" or "T".
example usage:
scores = Scores.includeAdditionalCharacters(scores, "?ABCDEFGHIJKLMNOPQRSTUVWXYZ");
- Parameters:
scores
- characters
-
- Returns:
- a new score matrix.
getExtraResidues
protected String getExtraResidues()