From: Mateusz Warowny Date: Wed, 1 Dec 2021 14:10:15 +0000 (+0100) Subject: JAL-3878 Use annotations from the representative sequence in the new alignment. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3b75fc1a1915922140681a733dfa24b762f395c5;p=jalview.git JAL-3878 Use annotations from the representative sequence in the new alignment. --- diff --git a/src/jalview/ws2/gui/JPredMenuBuilder.java b/src/jalview/ws2/gui/JPredMenuBuilder.java index 7059c5f..f62f9c1 100644 --- a/src/jalview/ws2/gui/JPredMenuBuilder.java +++ b/src/jalview/ws2/gui/JPredMenuBuilder.java @@ -9,6 +9,7 @@ import javax.swing.JMenu; import javax.swing.JMenuItem; import jalview.datamodel.Alignment; +import jalview.datamodel.AlignmentAnnotation; import jalview.gui.AlignFrame; import jalview.gui.Desktop; import jalview.gui.WebserviceInfo; @@ -143,9 +144,9 @@ class JPredProgressUpdater { Alignment alignment = new Alignment(result.getAlignment()); alignment.setSeqrep(alignment.getSequenceAt(0)); - for (var annotation : result.getAlignment().getAlignmentAnnotation()) + for (var annot : alignment.getSeqrep().getAnnotation()) { - alignment.addAnnotation(annotation); + alignment.addAnnotation(annot); } AlignFrame frame = new AlignFrame(alignment, result.getHiddenCols(), AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); diff --git a/src/jalview/ws2/operations/JPredWorker.java b/src/jalview/ws2/operations/JPredWorker.java index 6cb8a2e..2daef9d 100644 --- a/src/jalview/ws2/operations/JPredWorker.java +++ b/src/jalview/ws2/operations/JPredWorker.java @@ -285,8 +285,7 @@ public class JPredWorker extends AbstractPollableWorker Object[] alanndcolsel = view.getAlignmentAndHiddenColumns(gapChar); SequenceI[] seqs = (SequenceI[]) alanndcolsel[0]; new RemoveGapsCommand(MessageManager.getString("label.remove_gaps"), - new SequenceI[] - { seqs[msaIndex] }, currentView); + new SequenceI[] { seqs[msaIndex] }, currentView); SequenceI profileSeq = alignment.getSequenceAt(firstSeq); profileSeq.setSequence(seqs[msaIndex].getSequenceAsString()); }