X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fapi%2Fanalysis%2FScoreModelI.java;h=7f138cd0eb2bdd5a4c9df3ffc59f162c237bfd9a;hb=3f5e846ddfee0852718bef491e2839476f5281d3;hp=4433cea1897c34c0bbec0b0f1d6bda0465a92eda;hpb=2ff143c5a47bd7bde7409ce1457bf84e332660a8;p=jalview.git diff --git a/src/jalview/api/analysis/ScoreModelI.java b/src/jalview/api/analysis/ScoreModelI.java index 4433cea..7f138cd 100644 --- a/src/jalview/api/analysis/ScoreModelI.java +++ b/src/jalview/api/analysis/ScoreModelI.java @@ -1,5 +1,9 @@ package jalview.api.analysis; +import jalview.api.AlignmentViewPanel; +import jalview.datamodel.AlignmentView; +import jalview.math.MatrixI; + public interface ScoreModelI { /** @@ -12,6 +16,15 @@ public interface ScoreModelI String getName(); /** + * Answers an informative description of the model, suitable for use in + * tooltips. Descriptions may be internationalised, and need not be unique + * (but should be). + * + * @return + */ + String getDescription(); + + /** * Answers true if this model is applicable for nucleotide data (so should be * shown in menus in that context) * @@ -28,4 +41,39 @@ public interface ScoreModelI boolean isProtein(); // TODO getName, isDNA, isProtein can be static methods in Java 8 + + /** + * Returns a distance score for the given sequence regions, that is, a matrix + * whose value [i][j] is the distance of sequence i from sequence j by some + * measure. The options parameter provides configuration choices for how the + * similarity score is calculated. + * + * @param seqData + * @param options + * @return + */ + + MatrixI findDistances(AlignmentView seqData, SimilarityParamsI options); + + /** + * Returns a similarity score for the given sequence regions, that is, a + * matrix whose value [i][j] is the similarity of sequence i to sequence j by + * some measure. The options parameter provides configuration choices for how + * the similarity score is calculated. + * + * @param seqData + * @param options + * @return + */ + MatrixI findSimilarities(AlignmentView seqData, SimilarityParamsI options); + + /** + * Returns a score model object configured for the given alignment view. + * Depending on the score model, this may just be a singleton instance, or a + * new instance configured with data from the view. + * + * @param avp + * @return + */ + ScoreModelI getInstance(AlignmentViewPanel avp); }