From: jprocter Date: Tue, 19 Aug 2008 09:38:38 +0000 (+0000) Subject: better check for molecule type when identifying internal sequence cross-references X-Git-Tag: Release_2_4~17 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5ab495cf0873d14455eaab904823838563620064;p=jalview.git better check for molecule type when identifying internal sequence cross-references --- 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)