From d879fd713c06451d655f312840a610f2bae7eda5 Mon Sep 17 00:00:00 2001 From: MorellThomas Date: Wed, 6 Mar 2024 15:29:15 +0100 Subject: [PATCH] Fix PaSiMap on selected sequences --- src/jalview/analysis/Connectivity.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 1.7.10.2