JAL-2154 regression warning - should never recover a sequence ‘like’ an xref’s mappin...
authorJim Procter <jprocter@issues.jalview.org>
Mon, 22 Aug 2016 12:00:07 +0000 (13:00 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 22 Aug 2016 12:00:53 +0000 (13:00 +0100)
src/jalview/analysis/CrossRef.java

index 578b18f..81fad27 100644 (file)
@@ -271,6 +271,18 @@ public class CrossRef
              * but findInDataset() matches ENSP when looking for Uniprot...
              */
             SequenceI matchInDataset = findInDataset(xref);
+            if (matchInDataset != null && xref.getMap().getTo() != null
+                    && matchInDataset != xref.getMap().getTo())
+            {
+              System.err
+                      .println("Implementation problem (reopen JAL-2154): CrossRef.findInDataset seems to have recovered a different sequence than the one explicitly mapped for xref."
+                              + "Found:"
+                              + matchInDataset
+                              + "\nExpected:"
+                              + xref.getMap().getTo()
+                              + "\nFor xref:"
+                              + xref);
+            }
             /*matcher.findIdMatch(mappedTo);*/
             if (matchInDataset != null)
             {