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

Ignore axioms without semantic value when transforming #52

Closed
caufieldjh opened this issue Sep 17, 2021 · 2 comments
Closed

Ignore axioms without semantic value when transforming #52

caufieldjh opened this issue Sep 17, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@caufieldjh
Copy link
Collaborator

Describe the desired behavior

Some OBOs, e.g. foodon, lead kgx to encounter blank nodes. This produces errors like the following:

00:52:41  [KGX][owl_source.py][          load_graph] WARNING: http://purl.obolibrary.org/obo/FOODON_00000000 http://www.w3.org/2000/01/rdf-schema#subClassOf N5c00c78cc5f44cae8b48e71a8fb410db has OWL.onProperty http://purl.obolibrary.org/obo/RO_0002180 and OWL.someValuesFrom None
00:52:41  [KGX][owl_source.py][          load_graph] WARNING: Do not know how to handle BNode: N5c00c78cc5f44cae8b48e71a8fb410db

In this case, a similar error appears ~15 times.

These are the result of axioms without semantic contributions (i.e., they're just part of a data model). We can ignore them when transforming to graphs.

Some evaluation of other OBOs may be necessary before we decide to ignore all errors of this type due to the potential for hierarchy-related strangeness (like in #21), but it is likely safe to skip them in general.

Additional context

See FoodOntology/foodon#159 for more details.

@caufieldjh caufieldjh added the enhancement New feature or request label Sep 17, 2021
@caufieldjh
Copy link
Collaborator Author

caufieldjh commented Sep 20, 2021

It seems fine to ignore BNodes for foodon, but some other OBOs cause KGX to encounter so many blank nodes that there seems to be a broader issue of definitions, e.g. with upa:

$ python3 run.py --s3_test --get_only upa --bucket kg-obo
...
[KGX][transform.py][       kgx_transform] ERROR: Encountered errors in transforming or parsing: {'BNode Errors': 12208, 'Other Errors': 12212}
INFO:kg-obo:upa.tar.gz 332684 bytes
INFO:kg-obo:Completed transform of upa with errors
processing ontologies: 100%|█████████████████████████████████████████████████████████| 1/1 [00:26<00:00, 26.00s/it]
INFO:kg-obo:Successfully transformed 0: []
INFO:kg-obo:Incompletely transformed due to errors 1: ['upa']
Operation completed without errors.

There are more than 12,000 blank nodes. One "other error" is raised for each of these, and since it's not equal to the number of blank nodes then there's something else going on here too the non-equal number of Other Errors is simply double-counting plus a few non-error info messages, ignored in more recent code.

For comparison, transforming Uberon raises ~30 BNodes.

Going to hold off on wholesale ignoring BNodes until I can be sure there isn't something crucial missing from some of these OBOs.

@caufieldjh
Copy link
Collaborator Author

Going to close this as we now transform irrespective of presence of BNodes, provide logs of such errors, and will shortly have ROBOT preprocessing.

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

No branches or pull requests

1 participant