From: MorellThomas Date: Wed, 6 Mar 2024 14:29:15 +0000 (+0100) Subject: Fix PaSiMap on selected sequences X-Git-Tag: Release_2_11_4_0~31^2~23 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d879fd713c06451d655f312840a610f2bae7eda5;p=jalview.git Fix PaSiMap on selected sequences --- diff --git a/src/jalview/analysis/Connectivity.java b/src/jalview/analysis/Connectivity.java index 0f849e3..a9cd46c 100644 --- a/src/jalview/analysis/Connectivity.java +++ b/src/jalview/analysis/Connectivity.java @@ -45,7 +45,14 @@ public class Connectivity */ public static Hashtable getConnectivity(AlignmentViewport av, float[][] scores, byte dim) throws RuntimeException { - SequenceI[] sequences = av.getAlignment().getSequencesArray(); + boolean isSelection = av.getSelectionGroup() != null && av.getSelectionGroup().getSize() > 0; + SequenceI[] sequences; + if (isSelection) + { + sequences = (SequenceI[]) av.getAlignmentView(isSelection).getAlignmentAndHiddenColumns(av.getGapCharacter())[0]; + } else { + sequences = av.getAlignment().getSequencesArray(); + } Hashtable connectivity = new Hashtable(); // for each unique connection