// 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)
{
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);
}
/*
- * 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 + "|"
}
}
}
+ dna.addDBRef(ref);
}
if (noProteinDbref && product != null)
{