Clover icon

Coverage Report

  1. Project Clover database Fri Dec 6 2024 13:47:14 GMT
  2. Package jalview.api.analysis

File ScoreModelI.java

 

Coverage histogram

../../../img/srcFileCovDistChart5.png
43% of files have more coverage

Code metrics

0
2
2
1
137
29
2
1
1
2
1

Classes

Class Line # Actions
ScoreModelI 32 2 2
0.550%
 

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 java.util.ArrayList;
24    import java.util.List;
25   
26    import jalview.api.AlignmentViewPanel;
27    import jalview.datamodel.AlignmentAnnotation;
28    import jalview.datamodel.AlignmentView;
29    import jalview.datamodel.SequenceI;
30    import jalview.math.MatrixI;
31   
 
32    public interface ScoreModelI
33    {
34    /**
35    * Answers a name for the score model, suitable for display in menus. Names
36    * should be unique across score models in use.
37    *
38    * @return
39    * @see jalview.analysis.scoremodels.ScoreModels#forName(String)
40    */
41    String getName();
42   
43    /**
44    * Answers an informative description of the model, suitable for use in
45    * tooltips. Descriptions may be internationalised, and need not be unique
46    * (but should be).
47    *
48    * @return
49    */
50    String getDescription();
51   
52    /**
53    * Answers true if this model is applicable for nucleotide data (so should be
54    * shown in menus in that context)
55    *
56    * @return
57    */
58    boolean isDNA();
59   
60    /**
61    * Answers true if this model is applicable for peptide data (so should be
62    * shown in menus in that context)
63    *
64    * @return
65    */
66    boolean isProtein();
67   
68    // TODO getName, isDNA, isProtein can be static methods in Java 8
69   
 
70  25 toggle default public boolean isSecondaryStructure()
71    {
72  25 return false;
73    }
74   
75    /**
76    * Answers false by default Answers true if the data has secondary structure
77    * (so should be shown in menus in that context)
78    *
79    * @return
80    */
81   
82    /**
83    * Returns a distance score for the given sequence regions, that is, a matrix
84    * whose value [i][j] is the distance of sequence i from sequence j by some
85    * measure. The options parameter provides configuration choices for how the
86    * similarity score is calculated.
87    *
88    * @param seqData
89    * @param options
90    * @return
91    */
92   
93    MatrixI findDistances(AlignmentView seqData, SimilarityParamsI options);
94   
95    /**
96    * Returns a similarity score for the given sequence regions, that is, a
97    * matrix whose value [i][j] is the similarity of sequence i to sequence j by
98    * some measure. The options parameter provides configuration choices for how
99    * the similarity score is calculated.
100    *
101    * @param seqData
102    * @param options
103    * @return
104    */
105    MatrixI findSimilarities(AlignmentView seqData,
106    SimilarityParamsI options);
107   
108    /**
109    * Returns a score model object configured for the given alignment view.
110    * Depending on the score model, this may just be a singleton instance, or a
111    * new instance configured with data from the view.
112    *
113    * @param avp
114    * @return
115    */
116    ScoreModelI getInstance(AlignmentViewPanel avp);
117   
118    /**
119    * Score models may create multiple leaves for a single sequence - implement
120    * this method if you do
121    *
122    * @param sequences
123    * - sequences to be filtered/expanded set of leaves
124    * @param seqData
125    * - origin
126    * @param labels
127    * - strings to show instead of the SequenceI.getName() for each
128    * element of sequences attached to leaves
129    * @return filtered/expanded set of leaves to be analysed
130    */
 
131  0 toggle default SequenceI[] expandSeqData(SequenceI[] sequences,
132    AlignmentView seqData, SimilarityParamsI scoreParams,
133    List<String> labels, ArrayList<AlignmentAnnotation> ssAnnotationForSeqs)
134    {
135  0 return sequences;
136    };
137    }