X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fhmmer%2FHMMERCommands.java;fp=src%2Fjalview%2Fhmmer%2FHMMERCommands.java;h=4c1748b3aa2ca383a886f66875f122add3fa64b0;hb=dbdc8807d9059dacf65a087b7bcb8363be53fb8f;hp=ba4c57b58ef8d7b3e8141fb9c015ab917c2dfe02;hpb=14a3623b86376f7f896667d5268123b5feb45a3c;p=jalview.git diff --git a/src/jalview/hmmer/HMMERCommands.java b/src/jalview/hmmer/HMMERCommands.java index ba4c57b..4c1748b 100644 --- a/src/jalview/hmmer/HMMERCommands.java +++ b/src/jalview/hmmer/HMMERCommands.java @@ -1,7 +1,9 @@ package jalview.hmmer; import jalview.datamodel.Alignment; +import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; +import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.HiddenMarkovModel; import jalview.datamodel.SequenceI; import jalview.gui.AlignFrame; @@ -128,12 +130,24 @@ public class HMMERCommands * @throws IOException */ public void exportData(SequenceI[] seqs, - File stoLocation, HiddenMarkovModel hmm, File hmmLocation) + File stoLocation, HiddenMarkovModel hmm, File hmmLocation, + AnnotatedCollectionI al) throws IOException { if (seqs != null) { - StockholmFile file = new StockholmFile(new Alignment(seqs)); + AlignmentI newAl = new Alignment(seqs); + if (stoLocation != null) + { + for (AlignmentAnnotation annot : al.getAlignmentAnnotation()) + { + if (annot.label.contains("Reference") || "RF".equals(annot.label)) + { + newAl.addAnnotation(annot); + } + } + } + StockholmFile file = new StockholmFile(newAl); String output = file.print(seqs, false); PrintWriter writer = new PrintWriter(stoLocation); writer.println(output);