From: gmungoc Date: Tue, 21 Jun 2016 08:57:36 +0000 (+0100) Subject: JAL-2113 tidy up canonicalisation of Uniprot xrefs in EMBL data X-Git-Tag: Release_2_10_0~140^2~5^2~49^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=663695f530e1cdef9cabdcd75d947219a1dd5c83;p=jalview.git JAL-2113 tidy up canonicalisation of Uniprot xrefs in EMBL data --- diff --git a/src/jalview/datamodel/xdb/embl/EmblEntry.java b/src/jalview/datamodel/xdb/embl/EmblEntry.java index b750973..ac0d339 100644 --- a/src/jalview/datamodel/xdb/embl/EmblEntry.java +++ b/src/jalview/datamodel/xdb/embl/EmblEntry.java @@ -197,7 +197,10 @@ public class EmblEntry // dbref retrievedref.setMap(new Mapping(null, new int[] { 1, dna.getLength() }, new int[] { 1, dna.getLength() }, 1, 1)); - // TODO: transform EMBL Database refs to canonical form + + /* + * transform EMBL Database refs to canonical form + */ if (dbRefs != null) { for (DBRefEntry dbref : dbRefs) @@ -211,17 +214,6 @@ public class EmblEntry { for (EmblFeature feature : features) { - if (feature.dbRefs != null) - { - for (DBRefEntry dbref : feature.dbRefs) - { - /* - * convert UniProtKB/Swiss-Prot to UNIPROT - */ - dbref.setSource(DBRefUtils.getCanonicalName(dbref.getSource())); - dna.addDBRef(dbref); - } - } if (FeatureProperties.isCodingFeature(sourceDb, feature.getName())) { parseCodingFeature(feature, sourceDb, dna, peptides); @@ -426,13 +418,17 @@ public class EmblEntry } /* - * add mappings for Uniprot xrefs + * add dbRefs to sequence, and mappings for Uniprot xrefs */ if (feature.dbRefs != null) { boolean mappingUsed = false; for (DBRefEntry ref : feature.dbRefs) { + /* + * ensure UniProtKB/Swiss-Prot converted to UNIPROT + */ + ref.setSource(DBRefUtils.getCanonicalName(ref.getSource())); if (ref.getSource().equals(DBRefSource.UNIPROT)) { String proteinSeqName = DBRefSource.UNIPROT + "|" @@ -488,6 +484,7 @@ public class EmblEntry } } } + dna.addDBRef(ref); } if (noProteinDbref && product != null) {