JAL-2629 fixed hmmalign failing due to differing sequence lengths
authorTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Mon, 7 Aug 2017 15:33:39 +0000 (16:33 +0100)
committerTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Mon, 7 Aug 2017 15:33:39 +0000 (16:33 +0100)
src/jalview/hmmer/HMMBuildThread.java
src/jalview/hmmer/HMMERCommands.java

index 868404b..c66e53d 100644 (file)
@@ -39,7 +39,9 @@ public class HMMBuildThread implements Runnable
     {
     try
     {
-      exportAlignment();
+        hmmSeqs = alignment.getHMMConsensusSequences(true);
+        HMMERCommands.exportData(alignment, true, false,
+                new HiddenMarkovModel());
     } catch (FileNotFoundException e)
     {
       // TODO Auto-generated catch block
@@ -73,16 +75,7 @@ public class HMMBuildThread implements Runnable
   }
 
   
-  private void exportAlignment() throws IOException
-  {
-    hmmSeqs = alignment.getHMMConsensusSequences(true);
-    if (!alignment.isAligned())
-    {
-      alignment.padGaps();
-    }
-    HMMERCommands.exportData(alignment, true, false,
-            new HiddenMarkovModel());
-  }
+
   
   private void runCommand() throws IOException, InterruptedException
   {
index 5a84989..56f7e3a 100644 (file)
@@ -94,6 +94,10 @@ public class HMMERCommands
   {
     if (exportAlignment)
     {
+      if (!alignment.isAligned())
+      {
+        alignment.padGaps();
+      }
       List<SequenceI> list = alignment.getSequences();
       SequenceI[] array = new SequenceI[list.size()];
       list.toArray(array);