From 02784d0cfac24efb32ac1d336dbeb0d3f9837118 Mon Sep 17 00:00:00 2001 From: TZVanaalten Date: Mon, 7 Aug 2017 16:33:39 +0100 Subject: [PATCH] JAL-2629 fixed hmmalign failing due to differing sequence lengths --- src/jalview/hmmer/HMMBuildThread.java | 15 ++++----------- src/jalview/hmmer/HMMERCommands.java | 4 ++++ 2 files changed, 8 insertions(+), 11 deletions(-) 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); -- 1.7.10.2