Clover icon

Coverage Report

  1. Project Clover database Thu Nov 28 2024 18:06:40 GMT
  2. Package jalview.datamodel.annotations

File AlphaFoldAnnotationRowBuilder.java

 

Coverage histogram

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

Code metrics

8
13
2
1
63
35
6
0.46
6.5
2
3

Classes

Class Line # Actions
AlphaFoldAnnotationRowBuilder 27 13 6
1.0100%
 

Contributing tests

This file is covered by 18 tests. .

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.datamodel.annotations;
22   
23    import jalview.datamodel.Annotation;
24    import jalview.structure.StructureImportSettings;
25    import jalview.structure.StructureImportSettings.TFType;
26   
 
27    public class AlphaFoldAnnotationRowBuilder extends AnnotationRowBuilder
28    {
29    public static final String LABEL = "Alphafold Reliability";
30   
 
31  34 toggle public AlphaFoldAnnotationRowBuilder()
32    {
33  34 super(LABEL);
34  34 min = 0;
35  34 max = 100;
36  34 hasMinMax = true;
37  34 this.setTFType(StructureImportSettings.TFType.PLDDT);
38    }
39   
 
40  2737 toggle @Override
41    public void processAnnotation(Annotation annotation)
42    {
43  2737 if (annotation.value > 90)
44    {
45    // Very High
46  2027 annotation.colour = new java.awt.Color(0, 83, 214);
47    }
48  2737 if (annotation.value <= 90)
49    {
50    // High
51  710 annotation.colour = new java.awt.Color(101, 203, 243);
52    }
53  2737 if (annotation.value <= 70)
54    {
55    // Confident
56  598 annotation.colour = new java.awt.Color(255, 219, 19);
57    }
58  2737 if (annotation.value < 50)
59    {
60  52 annotation.colour = new java.awt.Color(255, 125, 69);
61    }
62    }
63    }