From: Mateusz Warowny Date: Mon, 16 Oct 2023 16:10:15 +0000 (+0200) Subject: JAL-1601 Propagate hidden columns to the output alignment X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8fda5a627c8066bf3939cb97fc358ba1389e92d2;p=jalview.git JAL-1601 Propagate hidden columns to the output alignment --- diff --git a/src/jalview/ws2/actions/secstructpred/SecStructPredTask.java b/src/jalview/ws2/actions/secstructpred/SecStructPredTask.java index cf6ef73..b0a924c 100644 --- a/src/jalview/ws2/actions/secstructpred/SecStructPredTask.java +++ b/src/jalview/ws2/actions/secstructpred/SecStructPredTask.java @@ -96,10 +96,9 @@ public class SecStructPredTask extends BaseTask 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 diff --git a/src/jalview/ws2/gui/SearchServiceGuiHandler.java b/src/jalview/ws2/gui/SearchServiceGuiHandler.java index a57db1d..e66315f 100644 --- a/src/jalview/ws2/gui/SearchServiceGuiHandler.java +++ b/src/jalview/ws2/gui/SearchServiceGuiHandler.java @@ -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 if (idx >= 0) alnCpy.setSeqrep(alnCpy.getSequenceAt(idx)); } + if (result.getHiddenColumns() != null) + alnCpy.setHiddenColumns(new HiddenColumns(result.getHiddenColumns())); displayResultsNewFrame(alnCpy); }); SwingUtilities.invokeLater(infoPanel::setResultsReady);