From: Jim Procter Date: Thu, 4 Aug 2016 19:59:46 +0000 (+0100) Subject: JAL-2154 make sure codon mappings between sequences discovered via database cross... X-Git-Tag: Release_2_10_0~47^2~4^2~43^2~56 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=cc9619f850c707b183d2c1e7528ca5b4579e9e78;p=jalview.git JAL-2154 make sure codon mappings between sequences discovered via database cross-reference matching are added to the codonframe. --- 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;