2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.api.analysis;
23 import jalview.api.AlignmentViewPanel;
24 import jalview.datamodel.AlignmentView;
25 import jalview.math.MatrixI;
27 public interface ScoreModelI
30 * Answers a name for the score model, suitable for display in menus. Names
31 * should be unique across score models in use.
34 * @see jalview.analysis.scoremodels.ScoreModels#forName(String)
39 * Answers an informative description of the model, suitable for use in
40 * tooltips. Descriptions may be internationalised, and need not be unique
45 String getDescription();
48 * Answers true if this model is applicable for nucleotide data (so should be
49 * shown in menus in that context)
56 * Answers true if this model is applicable for peptide data (so should be
57 * shown in menus in that context)
63 // TODO getName, isDNA, isProtein can be static methods in Java 8
66 * Returns a distance score for the given sequence regions, that is, a matrix
67 * whose value [i][j] is the distance of sequence i from sequence j by some
68 * measure. The options parameter provides configuration choices for how the
69 * similarity score is calculated.
76 MatrixI findDistances(AlignmentView seqData, SimilarityParamsI options);
79 * Returns a similarity score for the given sequence regions, that is, a
80 * matrix whose value [i][j] is the similarity of sequence i to sequence j by
81 * some measure. The options parameter provides configuration choices for how
82 * the similarity score is calculated.
88 MatrixI findSimilarities(AlignmentView seqData,
89 SimilarityParamsI options);
92 * Returns a score model object configured for the given alignment view.
93 * Depending on the score model, this may just be a singleton instance, or a
94 * new instance configured with data from the view.
99 ScoreModelI getInstance(AlignmentViewPanel avp);