From 5ab495cf0873d14455eaab904823838563620064 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 19 Aug 2008 09:38:38 +0000 Subject: [PATCH] better check for molecule type when identifying internal sequence cross-references --- src/jalview/analysis/CrossRef.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index d063eed..159d96a 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -445,6 +445,7 @@ public class CrossRef boolean direct, boolean dna) { boolean found = false; + SequenceI[] typer=new SequenceI[1]; if (dataset == null) return false; if (dataset.getSequences() == null) @@ -465,6 +466,17 @@ public class CrossRef } if (nxt != sequenceI && nxt != sequenceI.getDatasetSequence()) { + // check if this is the correct sequence type + { + typer[0] = nxt; + boolean isDna = jalview.util.Comparison.isNucleotide(typer); + if ((direct && isDna == dna) || (!direct && isDna!=dna)) + { + // skip this sequence because it is same molecule type + continue; + } + } + // look for direct or indirect references in common DBRefEntry[] poss = null, cands = null; if (direct) -- 1.7.10.2