From 79d76d41dc80b2c5a71201f26f832af337b7809f Mon Sep 17 00:00:00 2001 From: tva Date: Wed, 3 Jul 2019 13:44:36 +0100 Subject: [PATCH] JAL-2629 fix hmm on alignment being deleted upon running jackhmmer --- src/jalview/hmmer/HMMSearch.java | 6 +----- src/jalview/hmmer/JackHMMER.java | 5 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/jalview/hmmer/HMMSearch.java b/src/jalview/hmmer/HMMSearch.java index 3faa4f2..64802c7 100644 --- a/src/jalview/hmmer/HMMSearch.java +++ b/src/jalview/hmmer/HMMSearch.java @@ -275,11 +275,7 @@ public class HMMSearch extends HmmerCommand databaseFile = FileUtils.createTempFile("database", ".sto"); AlignmentI al = af.getViewport().getAlignment(); AlignmentI copy = new Alignment(al); - List hmms = copy.getHmmSequences(); - for (SequenceI hmmSeq : hmms) - { - copy.deleteSequence(hmmSeq); - } + deleteHmmSequences(copy); exportStockholm(copy.getSequencesArray(), databaseFile, null); } diff --git a/src/jalview/hmmer/JackHMMER.java b/src/jalview/hmmer/JackHMMER.java index 1815ac4..1731439 100644 --- a/src/jalview/hmmer/JackHMMER.java +++ b/src/jalview/hmmer/JackHMMER.java @@ -246,8 +246,9 @@ public class JackHMMER extends HmmerCommand */ databaseFile = FileUtils.createTempFile("database", ".fa"); AlignmentI al = af.getViewport().getAlignment(); - deleteHmmSequences(al); - exportFasta(al, databaseFile); + AlignmentI copy = new Alignment(al); + deleteHmmSequences(copy); + exportFasta(copy, databaseFile); } args.add(getFilePath(seqFile, true)); -- 1.7.10.2