From 702c98b00aef5fee4ad1a8bd669854cabe4b104d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 23 Jun 2016 14:15:05 +0100 Subject: [PATCH] JAL-2110 make indirect xref searches work by not filtering refs on candidates after selecting them by molecule type (direct==same, indirect==different) --- src/jalview/analysis/CrossRef.java | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) 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)) -- 1.7.10.2