biolink / biolinkml

DEPRECATED: replaced by linkml
https://github.com/linkml/linkml
Creative Commons Zero v1.0 Universal
23 stars 12 forks source link

missing PATO prefix #344

Closed balhoff closed 3 years ago

balhoff commented 3 years ago

Biolink model references PATO several times, but there is no PATO prefix in the context. I thought Biolink was merging in the OBO prefix set; is this not true?

balhoff commented 3 years ago

Same thing with PCO.

deepakunni3 commented 3 years ago

@balhoff Yes, OBO context is being imported but somehow PATO and PCO is not being included in the generated JSON-LD context.

balhoff commented 3 years ago

ENVO is also missing from the JSON-LD context.

deepakunni3 commented 3 years ago

I believe there is a bug in linkML where prefixes for CURIEs in certain slots are not imported from the upstream JSON-LD context. i.e. even if PATO and PCO exist in OBO context, somehow linkML doesn't see that it should be importing them.

deepakunni3 commented 3 years ago

I have a fix for this. The bug is in jsonldcontextgen.py

hsolbrig commented 3 years ago

Out of curiosity -- is this a (bio)LinkML issue or a biolink-model issue?

deepakunni3 commented 3 years ago

This was originally reported in Biolink Model. But the bug is originating from linkML.

Specifically, ContextGenerator in jsonldcontextgen.py only looks at CURIEs (and their prefixes) for the mappings slot of a class. It fails to check related_mappings, close_mappings, narrow_mappings, exact_mappings, and broad_mappings.

PR #345 adds a fix for this issue.

cmungall commented 3 years ago

is this now fixed?

deepakunni3 commented 3 years ago

Yes, this was fixed almost a month ago. Should have closed the ticket when the PR #345 was merged.