monarch-initiative / helpdesk

The Monarch Initiative Helpdesk
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

API search: Filtering by human-only diseases #126

Closed aalmazan closed 1 day ago

aalmazan commented 1 month ago

Hello! Hopefully this does not belong on the MONDO repo as I think it's more API related.

I am looking to use the API specifically for looking for human diseases, however, I'll get non-human results.

For example, searching for alpha-mannosidosis will show results:

On the detail pages for the non-human entries (i.e. https://monarchinitiative.org/MONDO:1010172) there is a section for hierarchy. I believe that could be enough on my end to use to filter out non-human entries, but this doesn't exist on search results.

Please let me know if there's something that already exists, or a suggested way forward.

Thanks!

kevinschaper commented 1 month ago

Hi @aalmazan,

I think a very similar question came up in another issue. We're not set up to return the collection of all descendants from Monarch API, but this answer links to a pretty easy method of doing it via Oaklib and the same solution would apply. Assuming you're looking for a list of all descendants of human disease, this would be the command (after installing oaklib):

runoak -i sqlite:obo:mondo descendants MONDO:070009 -p i
aalmazan commented 1 month ago

Hi @kevinschaper thanks for replying. That does indeed look promising.

For those with the same question as this thread, I'll be using runoak to look for any entry that has non-human animal ancestors and filtering accordingly. Example below.

image

aalmazan commented 1 day ago

Closing as relatively solved from feedback, though a hierarchical filter on search would still be appreciated :) .