Clover icon

Coverage Report

  1. Project Clover database Mon Nov 11 2024 17:27:16 GMT
  2. Package jalview.api.analysis

File ScoreModelI.java

 

Coverage histogram

../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
1
1
1
112
19
1
1
1
1
1

Classes

Class Line # Actions
ScoreModelI 27 1 1
1.0100%
 

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  25 toggle default public boolean isSecondaryStructure()
66    {
67  25 return false;
68    }
69   
70    /**
71    * Answers false by default Answers true if the data has secondary structure
72    * (so should be shown in menus in that context)
73    *
74    * @return
75    */
76   
77    /**
78    * Returns a distance score for the given sequence regions, that is, a matrix
79    * whose value [i][j] is the distance of sequence i from sequence j by some
80    * measure. The options parameter provides configuration choices for how the
81    * similarity score is calculated.
82    *
83    * @param seqData
84    * @param options
85    * @return
86    */
87   
88    MatrixI findDistances(AlignmentView seqData, SimilarityParamsI options);
89   
90    /**
91    * Returns a similarity score for the given sequence regions, that is, a
92    * matrix whose value [i][j] is the similarity of sequence i to sequence j by
93    * some measure. The options parameter provides configuration choices for how
94    * the similarity score is calculated.
95    *
96    * @param seqData
97    * @param options
98    * @return
99    */
100    MatrixI findSimilarities(AlignmentView seqData,
101    SimilarityParamsI options);
102   
103    /**
104    * Returns a score model object configured for the given alignment view.
105    * Depending on the score model, this may just be a singleton instance, or a
106    * new instance configured with data from the view.
107    *
108    * @param avp
109    * @return
110    */
111    ScoreModelI getInstance(AlignmentViewPanel avp);
112    }