JAL-1601 Propagate hidden columns to the output alignment
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Mon, 16 Oct 2023 16:10:15 +0000 (18:10 +0200)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Mon, 16 Oct 2023 16:10:15 +0000 (18:10 +0200)
src/jalview/ws2/actions/secstructpred/SecStructPredTask.java
src/jalview/ws2/gui/SearchServiceGuiHandler.java

index cf6ef73..b0a924c 100644 (file)
@@ -96,10 +96,9 @@ public class SecStructPredTask extends BaseTask<SecStructPredJob, AlignmentI>
 
     Object[] alnAndHiddenCols = alignmentView
         .getAlignmentAndHiddenColumns(gapChar);
-    SequenceI[] sequences = (SequenceI[]) alnAndHiddenCols[0];
-    Alignment aln = new Alignment(sequences);
-    HiddenColumns alhidden = (HiddenColumns) alnAndHiddenCols[1];
+    Alignment aln = new Alignment((SequenceI[]) alnAndHiddenCols[0]);
     aln.setDataset(currentView.getDataset());
+    aln.setHiddenColumns((HiddenColumns) alnAndHiddenCols[1]);
     try
     {
       JnetAnnotationMaker
index a57db1d..e66315f 100644 (file)
@@ -8,6 +8,7 @@ import jalview.bin.Console;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
+import jalview.datamodel.HiddenColumns;
 import jalview.gui.AlignFrame;
 import jalview.gui.Desktop;
 import jalview.gui.JvOptionPane;
@@ -148,6 +149,8 @@ class SearchServiceGuiHandler implements TaskEventListener<AlignmentI>
         if (idx >= 0)
           alnCpy.setSeqrep(alnCpy.getSequenceAt(idx));
       }
+      if (result.getHiddenColumns() != null)
+        alnCpy.setHiddenColumns(new HiddenColumns(result.getHiddenColumns()));
       displayResultsNewFrame(alnCpy);
     });
     SwingUtilities.invokeLater(infoPanel::setResultsReady);