JAL-2403 improved ScoreModelI hierarchy as per Kira's review suggestions
[jalview.git] / src / jalview / api / analysis / ScoreModelI.java
1 package jalview.api.analysis;
2
3 import jalview.datamodel.AlignmentView;
4 import jalview.math.MatrixI;
5
6 public interface ScoreModelI
7 {
8   /**
9    * Answers a name for the score model, suitable for display in menus. Names
10    * should be unique across score models in use.
11    * 
12    * @return
13    * @see jalview.analysis.scoremodels.ScoreModels#forName(String)
14    */
15   String getName();
16
17   /**
18    * Answers an informative description of the model, suitable for use in
19    * tooltips. Descriptions may be internationalised, and need not be unique
20    * (but should be).
21    * 
22    * @return
23    */
24   String getDescription();
25
26   /**
27    * Answers true if this model is applicable for nucleotide data (so should be
28    * shown in menus in that context)
29    * 
30    * @return
31    */
32   boolean isDNA();
33
34   /**
35    * Answers true if this model is applicable for peptide data (so should be
36    * shown in menus in that context)
37    * 
38    * @return
39    */
40   boolean isProtein();
41
42   // TODO getName, isDNA, isProtein can be static methods in Java 8
43
44   /**
45    * Returns a distance score for the given sequence regions, that is, a matrix
46    * whose value [i][j] is the distance of sequence i from sequence j by some
47    * measure. The options parameter provides configuration choices for how the
48    * similarity score is calculated.
49    * 
50    * @param seqData
51    * @param options
52    * @return
53    */
54
55   MatrixI findDistances(AlignmentView seqData, SimilarityParamsI options);
56
57   /**
58    * Returns a similarity score for the given sequence regions, that is, a
59    * matrix whose value [i][j] is the similarity of sequence i to sequence j by
60    * some measure. The options parameter provides configuration choices for how
61    * the similarity score is calculated.
62    * 
63    * @param seqData
64    * @param options
65    * @return
66    */
67   MatrixI findSimilarities(AlignmentView seqData, SimilarityParamsI options);
68 }