From 56a55873956da91d4301cbab320c69873f2329ab Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 30 Sep 2016 17:44:32 +0100 Subject: [PATCH] =?utf8?q?JAL-2210=20some=20DBRef=20xref/ref=20correspondenc?= =?utf8?q?es=20may=20add=20sequence=20but=20have=20no=20mapping=20(e.g.=20EN?= =?utf8?q?SG->Uniprot),=20so=20always=20check=20if=20mappings=20have=20been=20?= =?utf8?q?added=20even=20if=20xref=E2=80=99ed=20sequence=20has=20already=20b?= =?utf8?q?een=20added=20to=20set=20to=20be=20shown=20to=20user.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/analysis/CrossRef.java | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index a729334..4a7a41b 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -296,20 +296,28 @@ public class CrossRef if (!rseqs.contains(matchInDataset)) { rseqs.add(matchInDataset); - // need to try harder to only add unique mappings - if (xref.getMap().getMap().isTripletMap() - && dataset.getMapping(seq, matchInDataset) == null - && cf.getMappingBetween(seq, matchInDataset) == null) + } + // even if rseqs contained matchInDataset - check mappings between + // these seqs are added + // need to try harder to only add unique mappings + if (xref.getMap().getMap().isTripletMap() + && dataset.getMapping(seq, matchInDataset) == null + && cf.getMappingBetween(seq, matchInDataset) == null) + { + // materialise a mapping for highlighting between these + // sequences + if (fromDna) { - // materialise a mapping for highlighting between these sequences - if (fromDna) - { - cf.addMap(dss, matchInDataset, xref.getMap().getMap(), xref.getMap().getMappedFromId()); - } else { - cf.addMap(matchInDataset, dss, xref.getMap().getMap().getInverse(), xref.getMap().getMappedFromId()); - } + cf.addMap(dss, matchInDataset, xref.getMap().getMap(), + xref.getMap().getMappedFromId()); + } + else + { + cf.addMap(matchInDataset, dss, xref.getMap().getMap() + .getInverse(), xref.getMap().getMappedFromId()); } } + refIterator.remove(); continue; } -- 1.7.10.2