Package jebl.evolution.align.scores
Class Scores
java.lang.Object
jebl.evolution.align.scores.Scores
- All Implemented Interfaces:
ScoreMatrix
- Direct Known Subclasses:
AminoAcidScores
,NucleotideScores
,SubstScoreMatrix
Base class for all score matrices in the package.
- Version:
- $Id: Scores.java 916 2008-05-26 03:33:27Z matt_kearse $ Based on code originally by Peter Setsoft. See package.html.
- Author:
- Alexei Drummond
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Scores
static Scores
forMatrix
(ScoreMatrix scoreMatrix) final float
getScore
(char x, char y) 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.static Scores
includeGaps
(Scores scores, float gapVersusResidueCost, float gapVersusGapCost) toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface jebl.evolution.align.scores.ScoreMatrix
getAlphabet, getName
-
Field Details
-
score
public float[][] score
-
-
Constructor Details
-
Scores
public Scores()
-
-
Method Details
-
getScore
public final float getScore(char x, char y) - Specified by:
getScore
in interfaceScoreMatrix
- Returns:
- the score for matching char x with char y
-
toString
-
forMatrix
- Parameters:
scoreMatrix
- A ScoreMatrix with only low ascii characters (< chr(127)) in the alphabet- Returns:
- A Scores instance corresponding to scoreMatrix.
-
duplicate
-
includeGaps
- Parameters:
scores
-gapVersusResidueCost
- should be a negative valuegapVersusGapCost
- should be a positive value
-
includeAdditionalCharacters
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.
-
getMatrixString
- Returns:
- this score matrix as a string.
-