Merge branch 'releases/Release_2_11_3_Branch'
[jalview.git] / src / jalview / datamodel / annotations / AlphaFoldAnnotationRowBuilder.java
1 package jalview.datamodel.annotations;
2
3 import jalview.datamodel.Annotation;
4 import jalview.structure.StructureImportSettings;
5 import jalview.structure.StructureImportSettings.TFType;
6
7 public class AlphaFoldAnnotationRowBuilder extends AnnotationRowBuilder
8 {
9   public static final String LABEL = "Alphafold Reliability";
10
11   public AlphaFoldAnnotationRowBuilder()
12   {
13     super(LABEL);
14     min = 0;
15     max = 100;
16     hasMinMax = true;
17     this.setTFType(StructureImportSettings.TFType.PLDDT);
18   }
19
20   @Override
21   public void processAnnotation(Annotation annotation)
22   {
23     if (annotation.value > 90)
24     {
25       // Very High
26       annotation.colour = new java.awt.Color(0, 83, 214);
27     }
28     if (annotation.value <= 90)
29     {
30       // High
31       annotation.colour = new java.awt.Color(101, 203, 243);
32     }
33     if (annotation.value <= 70)
34     {
35       // Confident
36       annotation.colour = new java.awt.Color(255, 219, 19);
37     }
38     if (annotation.value < 50)
39     {
40       annotation.colour = new java.awt.Color(255, 125, 69);
41     }
42   }
43 }