From d9a5e7ac4957e98089c082e629d6e79dd5d30199 Mon Sep 17 00:00:00 2001 From: TZVanaalten Date: Mon, 14 Aug 2017 15:13:06 +0100 Subject: [PATCH] JAL-2629 fix expected length error for hmmbuild by uniquifying sequences --- src/jalview/hmmer/HMMBuildThread.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/jalview/hmmer/HMMBuildThread.java b/src/jalview/hmmer/HMMBuildThread.java index d1039f9..48796e4 100644 --- a/src/jalview/hmmer/HMMBuildThread.java +++ b/src/jalview/hmmer/HMMBuildThread.java @@ -73,14 +73,13 @@ public class HMMBuildThread implements Runnable { try { + SequenceI[] array; List seqs = alignment .getHMMConsensusSequences(true); cmds.setHmmSeqs(seqs); if (group != null) { - SequenceI[] array = group.getSelectionAsNewSequences(alignment); - - cmds.exportData(array, stoTemp, null, null); + array = group.getSelectionAsNewSequences(alignment); } else { @@ -88,9 +87,12 @@ public class HMMBuildThread implements Runnable { alignment.padGaps(); } - cmds.exportData(alignment.getSequencesArray(), stoTemp, null, - null); + array = alignment.getSequencesArray(); } + cmds.uniquifySequences(array); + cmds.exportData(array, stoTemp, null, null); + jalview.analysis.SeqsetUtils.deuniquify(cmds.hash, array); + } catch (FileNotFoundException e) { // TODO Auto-generated catch block -- 1.7.10.2