From: tva Date: Wed, 3 Jul 2019 12:44:36 +0000 (+0100) Subject: JAL-2629 fix hmm on alignment being deleted upon running jackhmmer X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=79d76d41dc80b2c5a71201f26f832af337b7809f;p=jalview.git JAL-2629 fix hmm on alignment being deleted upon running jackhmmer --- 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));