if (retrieved != null)
{
- updateDbrefMappings(seq, xrfs, retrieved, cf, fromDna);
+ boolean addedXref = false;
for (SequenceI retrievedSequence : retrieved)
{
// dataset gets contaminated ccwith non-ds sequences. why ??!
// try: Ensembl -> Nuc->Ensembl, Nuc->Uniprot-->Protein->EMBL->
SequenceI retrievedDss = retrievedSequence.getDatasetSequence() == null ? retrievedSequence
: retrievedSequence.getDatasetSequence();
- importCrossRefSeq(cf, dss, retrievedDss);
- rseqs.add(retrievedDss);
- if (dataset.findIndex(retrievedDss) == -1)
+ addedXref |= importCrossRefSeq(cf, dss, retrievedDss);
+ }
+ if (!addedXref)
+ {
+ // try again, after looking for matching IDs
+ // shouldn't need to do this unless the dbref mechanism has broken.
+ updateDbrefMappings(seq, xrfs, retrieved, cf, fromDna);
+ for (SequenceI retrievedSequence : retrieved)
{
- dataset.addSequence(retrievedDss);
- matcher.add(retrievedDss);
+ // dataset gets contaminated ccwith non-ds sequences. why ??!
+ // try: Ensembl -> Nuc->Ensembl, Nuc->Uniprot-->Protein->EMBL->
+ SequenceI retrievedDss = retrievedSequence.getDatasetSequence() == null ? retrievedSequence
+ : retrievedSequence.getDatasetSequence();
+ addedXref |= importCrossRefSeq(cf, dss, retrievedDss);
}
}
}