Clover icon

Coverage Report

  1. Project Clover database Mon Nov 18 2024 09:38:20 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 6 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  6 toggle public AlphaFoldAnnotationRowBuilder()
32    {
33  6 super(LABEL);
34  6 min = 0;
35  6 max = 100;
36  6 hasMinMax = true;
37  6 this.setTFType(StructureImportSettings.TFType.PLDDT);
38    }
39   
 
40  882 toggle @Override
41    public void processAnnotation(Annotation annotation)
42    {
43  882 if (annotation.value > 90)
44    {
45    // Very High
46  570 annotation.colour = new java.awt.Color(0, 83, 214);
47    }
48  882 if (annotation.value <= 90)
49    {
50    // High
51  312 annotation.colour = new java.awt.Color(101, 203, 243);
52    }
53  882 if (annotation.value <= 70)
54    {
55    // Confident
56  276 annotation.colour = new java.awt.Color(255, 219, 19);
57    }
58  882 if (annotation.value < 50)
59    {
60  24 annotation.colour = new java.awt.Color(255, 125, 69);
61    }
62    }
63    }