Class DefaultSequenceGraphFactories.SequenceAlignmentScorer
- java.lang.Object
-
- com.biomatters.geneious.publicapi.implementations.DefaultSequenceGraphFactories.SequenceAlignmentScorer
-
- Enclosing class:
- DefaultSequenceGraphFactories
public abstract static class DefaultSequenceGraphFactories.SequenceAlignmentScorer extends java.lang.Object
Provides methods to supply a score for a given set of sequence residues and provide a color for a given score. Only the multiplicity but not the order of the residues in an alignment column is passed to the scorer, so this can not be used to create alignment graphs that depend on the order of the sequences, or on consistency of sequence order across columns.
-
-
Constructor Summary
Constructors Constructor Description SequenceAlignmentScorer()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.awt.Color
getColor(double score)
return a Color for a score.abstract java.lang.Double
getScore(char[] residues, int[] residueCounts)
Calculates the score for one alignment column based on the residues in each column.
-
-
-
Method Detail
-
getScore
public abstract java.lang.Double getScore(char[] residues, int[] residueCounts)
Calculates the score for one alignment column based on the residues in each column. The implementation must be thread safe as this method may be called simultaneously from multiple threads.As of 2008-20-02, the characters passed to this method do not include endgaps. That is, if residues contains '-' then the corresponding residueCount specifies the number of internal gaps in the alignment column. It is possible that in the future a scorer may indicate whether it's interested in endgaps or not, but for now all implementations won't be able to tell the difference between e.g. a length 3 nongap column and a length 4 column containing one terminal gap.
- Parameters:
residues
- Set of characters occurring in the alignment column to be scored.residueCounts
- an array of the same length as residues, withresidueCounts[i]
specifying the number of times the characterresidues[i]
occurs in the alignment column.- Returns:
- the score between 0 and 1 inclusive for these residues or null if these residues do not have a score.
-
getColor
public abstract java.awt.Color getColor(double score)
return a Color for a score. The score is not necessarily one returned bygetScore(char[],int[])
(for example in an graph averaged over multiple residue sites)- Parameters:
score
- the score- Returns:
- the Color for this score.
-
-