Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in score_grounded_result #21

Open
leokim-l opened this issue May 17, 2024 · 5 comments
Open

Error in score_grounded_result #21

leokim-l opened this issue May 17, 2024 · 5 comments

Comments

@leokim-l
Copy link
Member

@cmungall @justaddcoffee @caufieldjh any idea what these are?

ERROR:root:Skipping statements(subject=MONDO:0016830,predicate=skos:exactMatch,object=https://omim.org/phenotypicSeries/PS310300,value=None,datatype=None,language=None,); ValueError: https://omim.org/phenotypicSeries/PS310300 is not a valid URI or CURIE

I'm getting a bunch of these errors when running score_grounded_result(...). @cmungall do you have an obvious immediate direction to point us to? Thanks!

@justaddcoffee
Copy link
Member

For context, these errors I think are coming from this line

            df['is_correct'] = df.apply(
                lambda row: score_grounded_result(row['term'], row['correct_term']) > 0,
                axis=1)

where we are scoring whether GPTs prediction (row['term']) is equivalent to the correct OMIM term (row['correct_term'])

@cmungall can you tell if this error is harmful or not? It's not clear if this means we are not getting the OMIMs that are part of the phenotypic series mentioned in this error.

(Also, I'm not clear on why things like https://omim.org/phenotypicSeries/PS310300 are not valid URIs)

@caufieldjh
Copy link
Member

This can be replicated with the OAK CLI:

$ runoak -vvv -i sqlite:obo:mondo normalize MONDO:0016830 -M OMIM
INFO:root:Setting other_languages=()
INFO:root:Settings = Settings(impl=None, autosave=False, associations_type=None, preferred_language=None, other_languages=())
INFO:root:Locator: obo:mondo
INFO:root:Ensuring gunzipped for https://s3.amazonaws.com/bbop-sqlite/mondo.db.gz
INFO:root:Locator, post-processed: sqlite:////home/harry/.data/oaklib/mondo.db
INFO:root:Normalizing: <generator object query_terms_iterator at 0x7f5b45f994a0>
ERROR:root:Skipping statements(subject=MONDO:0016830,predicate=skos:exactMatch,object=<https://omim.org/phenotypicSeries/PS310300>,value=None,datatype=None,language=None,); ValueError: <https://omim.org/phenotypicSeries/PS310300> is not a valid URI or CURIE

@matentzn
Copy link
Member

If having these mappings correctly is critical for your work you can do we do in Mondo ingest pipeline, passing in a custom prefix file:

https://github.com/monarch-initiative/mondo-ingest/blob/e093456bdb193f609b71e3ba5ce7baab3834fcd5/src/ontology/mondo-ingest.Makefile#L34

Here is a related issue you could comment on to raise the urgency: INCATools/semantic-sql#51

Here are two related PRs:

@cmungall
Copy link
Member

This should be a WARN not ERROR. It's annoying but irrelevant for malco because you are not grounding on OMIM PS IDs

@justaddcoffee
Copy link
Member

Great! Thanks @cmungall - just making sure this isn't going to affect our scoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants