Clover icon

Coverage Report

  1. Project Clover database Wed Nov 13 2024 16:21:17 GMT
  2. Package jalview.workers

File FeatureSetCounterI.java

 

Code metrics

0
0
0
1
85
11
0
-
-
0
-

Classes

Class Line # Actions
FeatureSetCounterI 34 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   
22    package jalview.workers;
23   
24    import jalview.datamodel.SequenceFeature;
25   
26    import java.util.List;
27   
28    /**
29    * An interface for a type that returns counts (per computed annotation type) of
30    * any value of interest at a sequence position that can be determined from the
31    * sequence character and any features present at that position
32    *
33    */
 
34    public interface FeatureSetCounterI
35    {
36    /**
37    * Returns counts (per annotation type) of some properties of interest, for
38    * example
39    * <ul>
40    * <li>the number of variant features at the position</li>
41    * <li>the number of Cath features of status 'True Positive'</li>
42    * <li>1 if the residue is hydrophobic, else 0</li>
43    * <li>etc</li>
44    * </ul>
45    *
46    * @param residue
47    * the residue (or gap) at the position
48    * @param a
49    * list of any sequence features which include the position
50    */
51    int[] count(String residue, List<SequenceFeature> features);
52   
53    /**
54    * Returns names for the annotations that this is counting, for use as the
55    * displayed labels
56    *
57    * @return
58    */
59    String[] getNames();
60   
61    /**
62    * Returns descriptions for the annotations, for display as tooltips
63    *
64    * @return
65    */
66    String[] getDescriptions();
67   
68    /**
69    * Returns the colour (as [red, green, blue] values in the range 0-255) to use
70    * for the minimum value on histogram bars. If this is different to
71    * getMaxColour(), then bars will have a graduated colour.
72    *
73    * @return
74    */
75    int[] getMinColour();
76   
77    /**
78    * Returns the colour (as [red, green, blue] values in the range 0-255) to use
79    * for the maximum value on histogram bars. If this is the same as
80    * getMinColour(), then bars will have a single colour (not graduated).
81    *
82    * @return
83    */
84    int[] getMaxColour();
85    }