INCATools / INCATools/ontology-access-kit
set_label_for_curie not implemented for owl files?
- Dominant language
- Python
- Stars
- 198
- Forks
- 35
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
The use case here is adding rdf labels to existing owl files using lexmatch from OAK. When you do this there is an error that the set_label_for_curie method is not implemented. Per @cmungall lexmatch rdflabel generation should work with the PRONTO implementation currently.
runoak -i ../../DLO/deep-learning-ontology/deep-learning-ontology-full.owl -a ../../DLO/deep-learning-ontology/external/ml-ontology-202010021305.owl lexmatch --add-labels
WARNING:root:Using rdflib rdf/xml parser; this behavior may change in future
WARNING:root:Using rdflib rdf/xml parser; this behavior may change in future
WARNING:root:Not a curie: deep-learning-ontology/deep-learning-ontology-full.owl
WARNING:root:Not a curie: deep-learning-ontology/deep-learning-ontology-full.owl
Traceback (most recent call last):
File "/Users/marcin/Documents/VIMSS/ontology/OAK/ontology-access-kit/venv/bin/runoak", line 8, in
sys.exit(main())
File "/Users/marcin/Documents/VIMSS/ontology/OAK/ontology-access-kit/venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/marcin/Documents/VIMSS/ontology/OAK/ontology-access-kit/venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/marcin/Documents/VIMSS/ontology/OAK/ontology-access-kit/venv/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/marcin/Documents/VIMSS/ontology/OAK/ontology-access-kit/venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/marcin/Documents/VIMSS/ontology/OAK/ontology-access-kit/venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/marcin/Documents/VIMSS/ontology/OAK/ontology-access-kit/venv/lib/python3.9/site-packages/oaklib/cli.py", line 1150, in lexmatch
add_labels_from_uris(impl)
File "/Users/marcin/Documents/VIMSS/ontology/OAK/ontology-access-kit/venv/lib/python3.9/site-packages/oaklib/utilities/lexical/lexical_indexer.py", line 46, in add_labels_from_uris
oi.set_label_for_curie(curie, label)
File "/Users/marcin/Documents/VIMSS/ontology/OAK/ontology-access-kit/venv/lib/python3.9/site-packages/oaklib/interfaces/basic_ontology_interface.py", line 203, in set_label_for_curie
raise NotImplementedError
NotImplementedError
Contributor guide
Research direction
Start with the lexmatch entry point in oaklib/cli.py and trace add_labels_from_uris in oaklib/utilities/lexical/lexical_indexer.py to the NotImplementedError in oaklib/interfaces/basic_ontology_interface.py. Reproduce the command from the issue against the OWL files and determine the required implementation for the PRONTO path. Done means lexmatch --add-labels completes without this error and adds the expected RDF labels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100