1 package jalview.api.analysis;
3 import jalview.api.AlignmentViewPanel;
4 import jalview.datamodel.AlignmentView;
5 import jalview.math.MatrixI;
7 public interface ScoreModelI
10 * Answers a name for the score model, suitable for display in menus. Names
11 * should be unique across score models in use.
14 * @see jalview.analysis.scoremodels.ScoreModels#forName(String)
19 * Answers an informative description of the model, suitable for use in
20 * tooltips. Descriptions may be internationalised, and need not be unique
25 String getDescription();
28 * Answers true if this model is applicable for nucleotide data (so should be
29 * shown in menus in that context)
36 * Answers true if this model is applicable for peptide data (so should be
37 * shown in menus in that context)
43 // TODO getName, isDNA, isProtein can be static methods in Java 8
46 * Returns a distance score for the given sequence regions, that is, a matrix
47 * whose value [i][j] is the distance of sequence i from sequence j by some
48 * measure. The options parameter provides configuration choices for how the
49 * similarity score is calculated.
56 MatrixI findDistances(AlignmentView seqData, SimilarityParamsI options);
59 * Returns a similarity score for the given sequence regions, that is, a
60 * matrix whose value [i][j] is the similarity of sequence i to sequence j by
61 * some measure. The options parameter provides configuration choices for how
62 * the similarity score is calculated.
68 MatrixI findSimilarities(AlignmentView seqData, SimilarityParamsI options);
71 * Returns a score model object configured for the given alignment view.
72 * Depending on the score model, this may just be a singleton instance, or a
73 * new instance configured with data from the view.
78 ScoreModelI getInstance(AlignmentViewPanel avp);