From e1599e1245a76fc65eb4266881633ef3e9401894 Mon Sep 17 00:00:00 2001 From: TZVanaalten Date: Fri, 4 Aug 2017 12:19:51 +0100 Subject: [PATCH] JAL-2629 hmmbuild now runs on alignments of different lengths --- src/jalview/hmmer/HMMERCommands.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/jalview/hmmer/HMMERCommands.java b/src/jalview/hmmer/HMMERCommands.java index 3f50bbb..c8d26e4 100644 --- a/src/jalview/hmmer/HMMERCommands.java +++ b/src/jalview/hmmer/HMMERCommands.java @@ -60,6 +60,10 @@ public class HMMERCommands clearer.print(""); clearer.close(); AlignmentI alignment = af.getViewport().getAlignment(); + if (!alignment.isAligned()) + { + alignment.padGaps(); + } Map 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 seqs = al.getHMMConsensusSequences(true); int index = 0; if (hmm == null) -- 1.7.10.2