monarch-initiative / monarch-mapping-commons

Building a fully exectuable workflow for boomer
Creative Commons Zero v1.0 Universal
4 stars 3 forks source link

Biomappings - externalize/replace curie converter #18

Closed glass-ships closed 11 months ago

glass-ships commented 1 year ago

Using curies.get_monarch_converter() in the process_biomappings.py script doesn't throw any errors, but results in empty tsv output.

As a workaround, a converter is manually defined within the script.

We can either sort out the monarch converter issue, or replace the inline prefix maps with a proper Json LD context.

cthoyt commented 1 year ago

The best way going forward in my opinion is to re-define the Monarch context using Bioregistry - this will get you all the benefit of having URI prefix synonyms and CURIE prefix synonyms

glass-ships commented 1 year ago

hmm, can you expand on that a little? sorry i'm still getting familiar with a lot of this

cthoyt commented 1 year ago

Monarch had a project wide prefix map that is defined in an ad hoc file. That’s where the curies package gets the monarch converter. But it’s missing all of the nice things you get by aligning with the Bioregistry. That’s why me and Nico made a tool in the Bioregistry that let’s you define the project wide prefix map in the Bioregistry. You can make whatever explicit choices you want (such as using identifiers.org Uris for hgnc terms) then fall back on the bioregistry standard for the rest

matentzn commented 1 year ago

Agreed @cthoyt the next opportunity I spot i will make sure we consider moving to bioregistry context

glass-ships commented 11 months ago

We've since added from sssom.context import get_converter, does this use the bioregistry context BTS?

matentzn commented 11 months ago

Yes, this is done!