JAL-2629 add multiple options for running hmmbuild on alignment/groups
[jalview.git] / src / jalview / datamodel / Sequence.java
index 701ad7d..a673514 100755 (executable)
@@ -301,10 +301,15 @@ public class Sequence extends ASequence implements SequenceI
         this.addPDBId(new PDBEntry(pdb));
       }
     }
+    if (seq.isHMMConsensusSequence())
+    {
+      this.isHMMConsensusSequence = true;
+    }
     if (seq.getHMM() != null)
     {
       this.hmm = new HiddenMarkovModel(seq.getHMM());
     }
+
   }
 
   @Override
@@ -1545,18 +1550,14 @@ public class Sequence extends ASequence implements SequenceI
   {
     int node = 1;
     int column = 0;
+    hmm.emptyNodeLookup();
     for (char residue : sequence)
     {
       if (!Comparison.isGap(residue))
       {
         hmm.setAlignmentColumn(node, column);
-        hmm.getNodeLookup().put(column, node);
         node++;
       }
-      else
-      {
-        hmm.getNodeLookup().remove(column);
-      }
       column++;
     }
 
@@ -1578,21 +1579,6 @@ public class Sequence extends ASequence implements SequenceI
   public boolean hasHMMAnnotation()
   {
     return hasInfo;
-    /*
-    if (annotation == null)
-    {
-      return false;
-    }
-    
-    for (AlignmentAnnotation annot : annotation)
-    {
-      if (annot.label.contains("_HMM"))
-      {
-        return true;
-      }
-    }
-    return false;
-    */
   }
 
   @Override