* Castor binding file
*
* For example:
- * http://www.ebi.ac.uk/Tools/dbfetch/dbfetch?db=ena_sequence&id=J03321
- * &format=emblxml
+ * http://www.ebi.ac.uk/ena/data/view/J03321&display=xml
*
* @see embl_mapping.xml
*/
public SequenceI getSequence(String sourceDb, List<SequenceI> peptides)
{
SequenceI dna = makeSequence(sourceDb);
+ if (dna == null)
+ {
+ return null;
+ }
dna.setDescription(description);
DBRefEntry retrievedref = new DBRefEntry(sourceDb,
getSequenceVersion(), accession);
dna.addDBRef(retrievedref);
- dna.setSourceDBRef(retrievedref);
// add map to indicate the sequence is a valid coordinate frame for the
// dbref
retrievedref.setMap(new Mapping(null, new int[] { 1, dna.getLength() },
*/
SequenceI makeSequence(String sourceDb)
{
+ if (sequence == null)
+ {
+ System.err.println("No sequence was returned for ENA accession "
+ + accession);
+ return null;
+ }
SequenceI dna = new Sequence(sourceDb + "|" + accession,
sequence.getSequence());
return dna;
dnaToProteinMapping.setTo(proteinSeq);
dnaToProteinMapping.setMappedFromId(proteinId);
proteinSeq.addDBRef(proteinDbRef);
- proteinSeq.setSourceDBRef(proteinDbRef);
ref.setMap(dnaToProteinMapping);
}
hasUniprotDbref = true;
DBRefSource.EMBLCDSProduct, getSequenceVersion(), proteinId);
}
product.addDBRef(proteinToEmblProteinRef);
- product.setSourceDBRef(proteinToEmblProteinRef);
if (dnaToProteinMapping != null
&& dnaToProteinMapping.getTo() != null)