JAL-2629 hmmbuild now runs on alignments of different lengths
authorTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Fri, 4 Aug 2017 11:19:51 +0000 (12:19 +0100)
committerTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Fri, 4 Aug 2017 14:08:03 +0000 (15:08 +0100)
src/jalview/hmmer/HMMERCommands.java

index 3f50bbb..c8d26e4 100644 (file)
@@ -60,6 +60,10 @@ public class HMMERCommands
     clearer.print("");
     clearer.close();
     AlignmentI alignment = af.getViewport().getAlignment();
+    if (!alignment.isAligned())
+    {
+      alignment.padGaps();
+    }
     Map<Integer, SequenceI> seqs = alignment.getHMMConsensusSequences(true);
     exportAlignment(alignment);
     final String command = HMMBUILD + NAME + af.getName() + SPACE
@@ -87,8 +91,11 @@ public class HMMERCommands
     PrintWriter clearer = new PrintWriter(ALIGNMENTINPUT);
     clearer.print("");
     clearer.close();
-
     AlignmentI al = af.getViewport().getAlignment();
+    if (!al.isAligned())
+    {
+      al.padGaps();
+    }
     Map<Integer, SequenceI> seqs = al.getHMMConsensusSequences(true);
     int index = 0;
     if (hmm == null)