From 79e9deb92f86fe2df40db97b57587663203a6fdd Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 30 Sep 2016 17:42:57 +0100 Subject: [PATCH] JAL-2210 CrossRef.findInDataset should search for presence of SequenceI in dataset before anything more fancy or fuzzy. --- src/jalview/analysis/CrossRef.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index 1295b46..a729334 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -618,6 +618,12 @@ public class CrossRef String name2 = xref.getSource() + "|" + name; SequenceI dss = mapsTo.getDatasetSequence() == null ? mapsTo : mapsTo .getDatasetSequence(); + // first check ds if ds is directly referenced + if (dataset.findIndex(dss) > -1) + { + return dss; + } + ; for (SequenceI seq : dataset.getSequences()) { /* -- 1.7.10.2