From: Jim Procter Date: Thu, 23 Jun 2016 13:15:05 +0000 (+0100) Subject: JAL-2110 make indirect xref searches work by not filtering refs on candidates after... X-Git-Tag: Release_2_10_0~140^2~5^2~38 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=702c98b00aef5fee4ad1a8bd669854cabe4b104d;p=jalview.git JAL-2110 make indirect xref searches work by not filtering refs on candidates after selecting them by molecule type (direct==same, indirect==different) --- diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index 1cd6a3d..0011e39 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -827,21 +827,16 @@ public class CrossRef // look for direct or indirect references in common DBRefEntry[] poss = nxt.getDBRefs(); List cands = null; - /* - * TODO does this make any sense? - * if 'direct', search the dbrefs for xrf - * else, filter the dbrefs by type and then search for xrf - * - the result is the same isn't it? - */ - if (direct) - { - cands = DBRefUtils.searchRefs(poss, xrf); - } - else - { - poss = DBRefUtils.selectDbRefs(!fromDna, poss); - cands = DBRefUtils.searchRefs(poss, xrf); - } + + // todo: indirect specifies we select either direct references to nxt + // that match xrf which is indirect to sequenceI, or indirect + // references to nxt that match xrf which is direct to sequenceI + cands = DBRefUtils.searchRefs(poss, xrf); + // else + // { + // poss = DBRefUtils.selectDbRefs(nxt.isProtein()!fromDna, poss); + // cands = DBRefUtils.searchRefs(poss, xrf); + // } if (!cands.isEmpty()) { if (!rseqs.contains(nxt))