boolean found = false;
DBRefEntry[] xrfs = DBRefUtils
.selectDbRefs(!fromDna, dss.getDBRefs());
+ // ENST & ENSP comes in to both Protein and nucleotide, so we need to
+ // filter them
+ // out later.
if ((xrfs == null || xrfs.length == 0) && dataset != null)
{
/*
List<DBRefEntry> sourceRefs = DBRefUtils.searchRefsForSource(xrfs,
source);
Iterator<DBRefEntry> refIterator = sourceRefs.iterator();
+ // At this point, if we are retrieving Ensembl, we still don't filter out
+ // ENST when looking for protein crossrefs.
while (refIterator.hasNext())
{
DBRefEntry xref = refIterator.next();
found = false;
- if (xref.hasMap())
+ // we're only interested in coding cross-references, not
+ // locus->transcript
+ if (xref.hasMap() && xref.getMap().getMap().isTripletMap())
{
SequenceI mappedTo = xref.getMap().getTo();
if (mappedTo != null)
{
SequenceI matchedSeq = matcher.findIdMatch(xref.getSource() + "|"
+ xref.getAccessionId());
- if (matchedSeq != null)
+ // if there was a match, check it's at least the right type of
+ // molecule!
+ if (matchedSeq != null && matchedSeq.isProtein() == fromDna)
{
if (constructMapping(seq, matchedSeq, xref, cf, fromDna))
{