From: TZVanaalten Date: Mon, 7 Aug 2017 15:33:39 +0000 (+0100) Subject: JAL-2629 fixed hmmalign failing due to differing sequence lengths X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=02784d0cfac24efb32ac1d336dbeb0d3f9837118;p=jalview.git JAL-2629 fixed hmmalign failing due to differing sequence lengths --- diff --git a/src/jalview/hmmer/HMMBuildThread.java b/src/jalview/hmmer/HMMBuildThread.java index 868404b..c66e53d 100644 --- a/src/jalview/hmmer/HMMBuildThread.java +++ b/src/jalview/hmmer/HMMBuildThread.java @@ -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 { diff --git a/src/jalview/hmmer/HMMERCommands.java b/src/jalview/hmmer/HMMERCommands.java index 5a84989..56f7e3a 100644 --- a/src/jalview/hmmer/HMMERCommands.java +++ b/src/jalview/hmmer/HMMERCommands.java @@ -94,6 +94,10 @@ public class HMMERCommands { if (exportAlignment) { + if (!alignment.isAligned()) + { + alignment.padGaps(); + } List list = alignment.getSequences(); SequenceI[] array = new SequenceI[list.size()]; list.toArray(array);