import jalview.datamodel.SequenceI;
import jalview.datamodel.UniprotEntry;
import jalview.datamodel.UniprotFile;
+import jalview.util.DBRefUtils;
import jalview.ws.ebi.EBIFetchClient;
import jalview.ws.seqfetcher.DbSourceProxyImpl;
{
onlyPdbEntries.addElement(pdb);
}
+ if ("EMBL".equals(pdb.getType()))
+ {
+ // look for a CDS reference and add it, too.
+ String cdsId = (String) pdb.getProperty()
+ .get("protein sequence ID");
+ if (cdsId != null && cdsId.trim().length() > 0)
+ {
+ dbr = new DBRefEntry(DBRefSource.EMBLCDS, DBRefSource.UNIPROT
+ + ":"
+ + dbVersion, cdsId.trim());
+ dbRefs.add(dbr);
+ }
+ }
}
sequence.setPDBId(onlyPdbEntries);
sequence.addSequenceFeature(sf);
}
}
+ // we use setDBRefs to assign refs quickly.
sequence.setDBRefs(dbRefs.toArray(new DBRefEntry[0]));
+ // need to use ensurePrimaries to reify any refs that should become primary
+ // refs
+ DBRefUtils.ensurePrimaries(sequence); // promote any direct refs to primary
+ // source dbs
return sequence;
}