Merge branch 'develop' into feature/JAL-1713_overviewInProject
[jalview.git] / src / jalview / datamodel / annotations / AlphaFoldAnnotationRowBuilder.java
diff --git a/src/jalview/datamodel/annotations/AlphaFoldAnnotationRowBuilder.java b/src/jalview/datamodel/annotations/AlphaFoldAnnotationRowBuilder.java
new file mode 100644 (file)
index 0000000..a0befe0
--- /dev/null
@@ -0,0 +1,38 @@
+package jalview.datamodel.annotations;
+
+import jalview.datamodel.Annotation;
+
+public class AlphaFoldAnnotationRowBuilder extends AnnotationRowBuilder
+{
+  public AlphaFoldAnnotationRowBuilder()
+  {
+    super("Alphafold Reliability");
+    min = 0;
+    max = 100;
+    hasMinMax = true;
+  }
+
+  @Override
+  public void processAnnotation(Annotation annotation)
+  {
+    if (annotation.value > 90)
+    {
+      // Very High
+      annotation.colour = new java.awt.Color(0, 83, 214);
+    }
+    if (annotation.value <= 90)
+    {
+      // High
+      annotation.colour = new java.awt.Color(101, 203, 243);
+    }
+    if (annotation.value <= 70)
+    {
+      // Confident
+      annotation.colour = new java.awt.Color(255, 219, 19);
+    }
+    if (annotation.value < 50)
+    {
+      annotation.colour = new java.awt.Color(255, 125, 69);
+    }
+  }
+}
\ No newline at end of file