JAL-2629 evalues and bit scores now conserved after hmmalign is run
authortva <tva@10.205.251.175>
Wed, 3 Jul 2019 11:16:50 +0000 (12:16 +0100)
committertva <tva@10.205.251.175>
Wed, 3 Jul 2019 11:16:50 +0000 (12:16 +0100)
src/jalview/analysis/SeqsetUtils.java
src/jalview/datamodel/AlignmentAnnotation.java

index b50a2ce..61fc747 100755 (executable)
@@ -20,6 +20,7 @@
  */
 package jalview.analysis;
 
+import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.HiddenMarkovModel;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.Sequence;
@@ -74,6 +75,12 @@ public class SeqsetUtils
     {
       sqinfo.put("HMM", seq.getHMM());
     }
+
+    if (seq.getAnnotation("Search Scores") != null)
+    {
+      sqinfo.put("Score", seq.getAnnotation("Search Scores"));
+    }
+
     return sqinfo;
   }
 
@@ -103,6 +110,9 @@ public class SeqsetUtils
     String description = (String) sqinfo.get("Description");
     Sequence seqds = (Sequence) sqinfo.get("datasetSequence");
     HiddenMarkovModel hmm = (HiddenMarkovModel) sqinfo.get("HMM");
+    AlignmentAnnotation[] scores = (AlignmentAnnotation[]) sqinfo
+            .get("Score");
+
     if (oldname == null)
     {
       namePresent = false;
@@ -145,6 +155,14 @@ public class SeqsetUtils
     {
       sq.setHMM(new HiddenMarkovModel(hmm, sq));
     }
+
+    if (scores != null)
+    {
+      for (AlignmentAnnotation score : scores)
+      {
+        sq.addAlignmentAnnotation(score);
+      }
+    }
     return namePresent;
   }
 
index 9354d55..3e532df 100755 (executable)
@@ -733,6 +733,9 @@ public class AlignmentAnnotation
     this.scaleColLabel = annotation.scaleColLabel;
     this.showAllColLabels = annotation.showAllColLabels;
     this.calcId = annotation.calcId;
+    this.bitScore = annotation.bitScore;
+    this.eValue = annotation.eValue;
+
     if (annotation.properties != null)
     {
       properties = new HashMap<>();