JAL-2629 fix hmm on alignment being deleted upon running jackhmmer
authortva <tva@10.205.251.175>
Wed, 3 Jul 2019 12:44:36 +0000 (13:44 +0100)
committertva <tva@10.205.251.175>
Wed, 3 Jul 2019 12:44:36 +0000 (13:44 +0100)
src/jalview/hmmer/HMMSearch.java
src/jalview/hmmer/JackHMMER.java

index 3faa4f2..64802c7 100644 (file)
@@ -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<SequenceI> hmms = copy.getHmmSequences();
-      for (SequenceI hmmSeq : hmms)
-      {
-        copy.deleteSequence(hmmSeq);
-      }
+      deleteHmmSequences(copy);
       exportStockholm(copy.getSequencesArray(), databaseFile, null);
     }
 
index 1815ac4..1731439 100644 (file)
@@ -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));