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.workers;
23 import jalview.datamodel.SequenceFeature;
25 import java.util.List;
28 * An interface for a type that returns counts of any value of interest at a
29 * sequence position that can be determined from the sequence character and any
30 * features present at that position
33 public interface FeatureCounterI
36 * Returns a count of some property of interest, for example
38 * <li>the number of variant features at the position</li>
39 * <li>the number of Cath features of status 'True Positive'</li>
40 * <li>1 if the residue is hydrophobic, else 0</li>
45 * the residue (or gap) at the position
47 * list of any sequence features which include the position
49 int count(String residue, List<SequenceFeature> features);
52 * Returns a name for the annotation that this is counting, for use as the
60 * Returns a description for the annotation, for display as a tooltip
64 String getDescription();
67 * Returns the colour (as [red, green, blue] values in the range 0-255) to use
68 * for the minimum value on histogram bars. If this is different to
69 * getMaxColour(), then bars will have a graduated colour.
76 * Returns the colour (as [red, green, blue] values in the range 0-255) to use
77 * for the maximum value on histogram bars. If this is the same as
78 * getMinColour(), then bars will have a single colour (not graduated).