JAL-2210 CrossRef.findInDataset should search for presence of SequenceI in dataset...
authorJim Procter <jprocter@issues.jalview.org>
Fri, 30 Sep 2016 16:42:57 +0000 (17:42 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 30 Sep 2016 16:42:57 +0000 (17:42 +0100)
src/jalview/analysis/CrossRef.java

index 1295b46..a729334 100644 (file)
@@ -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())
     {
       /*