renaud / neuroNER

named entity recognizer for neuronal cells, based on UIMA Ruta rules
GNU Lesser General Public License v3.0
7 stars 8 forks source link

get DB crossrefs for UBERON term #60

Closed stripathy closed 8 years ago

stripathy commented 8 years ago

@tgbugs is there a convenient service to get the appropriate DB crossrefs for an Uberon term?

For example, given this term:

[Term] id: UBERON:0002711 name: nucleus of posterior commissure synonym: "Darkshevich nucleus" NARROW [] synonym: "Darkshevich's nucleus" NARROW [] synonym: "nucleus commissura posterior" RELATED LATIN [NeuroNames:511] synonym: "nucleus commissuralis posterioris" RELATED LATIN [NeuroNames:511] synonym: "nucleus interstitialis of posterior commissure" RELATED LATIN [NeuroNames:511] synonym: "nucleus of Darkschewitsch" NARROW [] synonym: "nucleus of the posterior commissure" RELATED [NeuroNames:511] synonym: "posterior commissure nucleus" EXACT [FMA:68463]

I want to know if it has a xref to MBA and what if so, what its MBA ID is.

tgbugs commented 8 years ago

http://matrix.neuinfo.org:9000/scigraph/graph/UBERON:0002711 check if the json that comes back has xrefs = j['nodes'][0]['http://www.geneontology.org/formats/oboInOwl#hasDbXref'] which should be a list and if you check any([r for r in xrefs if r.startswith('MBA:')]) you will know it has an xref to mba.

Let me know if this works, otherwise I can put the xrefs back in (I stripped them out).

stripathy commented 8 years ago

Thanks @tgbugs! works great!