From cc9619f850c707b183d2c1e7528ca5b4579e9e78 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 4 Aug 2016 20:59:46 +0100 Subject: [PATCH] JAL-2154 make sure codon mappings between sequences discovered via database cross-reference matching are added to the codonframe. --- src/jalview/analysis/CrossRef.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index b4d75f9..1edc9e5 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -277,6 +277,19 @@ 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) + { + // 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()); + } + } } refIterator.remove(); continue; -- 1.7.10.2