Clover icon

jalviewX

  1. Project Clover database Wed Oct 31 2018 15:13:58 GMT
  2. Package jalview.api.analysis

File ScoreModelI.java

 

Code metrics

0
0
0
1
100
15
0
-
-
0
-

Classes

Class Line # Actions
ScoreModelI 27 0 0 0
-1.0 -
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
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.
11    *
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.
16    *
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.
20    */
21    package jalview.api.analysis;
22   
23    import jalview.api.AlignmentViewPanel;
24    import jalview.datamodel.AlignmentView;
25    import jalview.math.MatrixI;
26   
 
27    public interface ScoreModelI
28    {
29    /**
30    * Answers a name for the score model, suitable for display in menus. Names
31    * should be unique across score models in use.
32    *
33    * @return
34    * @see jalview.analysis.scoremodels.ScoreModels#forName(String)
35    */
36    String getName();
37   
38    /**
39    * Answers an informative description of the model, suitable for use in
40    * tooltips. Descriptions may be internationalised, and need not be unique
41    * (but should be).
42    *
43    * @return
44    */
45    String getDescription();
46   
47    /**
48    * Answers true if this model is applicable for nucleotide data (so should be
49    * shown in menus in that context)
50    *
51    * @return
52    */
53    boolean isDNA();
54   
55    /**
56    * Answers true if this model is applicable for peptide data (so should be
57    * shown in menus in that context)
58    *
59    * @return
60    */
61    boolean isProtein();
62   
63    // TODO getName, isDNA, isProtein can be static methods in Java 8
64   
65    /**
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.
70    *
71    * @param seqData
72    * @param options
73    * @return
74    */
75   
76    MatrixI findDistances(AlignmentView seqData, SimilarityParamsI options);
77   
78    /**
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.
83    *
84    * @param seqData
85    * @param options
86    * @return
87    */
88    MatrixI findSimilarities(AlignmentView seqData,
89    SimilarityParamsI options);
90   
91    /**
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.
95    *
96    * @param avp
97    * @return
98    */
99    ScoreModelI getInstance(AlignmentViewPanel avp);
100    }