JAL-3878 Use annotations from the representative sequence in the new alignment.
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Wed, 1 Dec 2021 14:10:15 +0000 (15:10 +0100)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Wed, 1 Dec 2021 14:10:15 +0000 (15:10 +0100)
src/jalview/ws2/gui/JPredMenuBuilder.java
src/jalview/ws2/operations/JPredWorker.java

index 7059c5f..f62f9c1 100644 (file)
@@ -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);
index 6cb8a2e..2daef9d 100644 (file)
@@ -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());
     }