JAL-2629 can now filter by sequence e-value or bit score
[jalview.git] / src / jalview / io / SequenceAnnotationReport.java
index 5ada355..d3191f9 100644 (file)
@@ -63,7 +63,7 @@ public class SequenceAnnotationReport
    * Comparator to order DBRefEntry by Source + accession id (case-insensitive),
    * with 'Primary' sources placed before others, and 'chromosome' first of all
    */
-  private static Comparator<DBRefEntry> comparator = new Comparator<DBRefEntry>()
+  private static Comparator<DBRefEntry> comparator = new Comparator<>()
   {
 
     @Override
@@ -394,7 +394,23 @@ public class SequenceAnnotationReport
         maxWidth = Math.max(maxWidth, sz);
       }
     }
+
+    sb.append("<br>");
+    if (sequence.getAnnotation("Search Scores") != null)
+    {
+      String eValue = " E-Value: "
+              + sequence.getAnnotation("Search Scores")[0].getEValue();
+      String bitScore = " Bit Score: "
+              + sequence.getAnnotation("Search Scores")[0].getBitScore();
+      sb.append(eValue);
+      sb.append("<br>");
+      sb.append(bitScore);
+      maxWidth = Math.max(maxWidth, eValue.length());
+      maxWidth = Math.max(maxWidth, bitScore.length());
+    }
+    sb.append("<br>");
     sb.append("</i>");
+
     return maxWidth;
   }