From 8fda5a627c8066bf3939cb97fc358ba1389e92d2 Mon Sep 17 00:00:00 2001 From: Mateusz Warowny Date: Mon, 16 Oct 2023 18:10:15 +0200 Subject: [PATCH] JAL-1601 Propagate hidden columns to the output alignment --- src/jalview/ws2/actions/secstructpred/SecStructPredTask.java | 5 ++--- src/jalview/ws2/gui/SearchServiceGuiHandler.java | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) 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); -- 1.7.10.2