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

Food Ontology Import Issue #303

Open
ecwood opened this issue Jun 28, 2023 · 11 comments
Open

Food Ontology Import Issue #303

ecwood opened this issue Jun 28, 2023 · 11 comments

Comments

@ecwood
Copy link
Collaborator

ecwood commented Jun 28, 2023

Motivated by #300 and FoodOntology/foodon#277, we need to investigate the food ontology issue more.

Currently, we are going to use a pickled version of foodon.json from buildkg2.rtx.ai and use that in the build.

@ecwood
Copy link
Collaborator Author

ecwood commented Jun 29, 2023

With ab8a4e2, I committed a patch so it will build. HOWEVER, with this patch, you cannot run the code in --savePickle mode.

@saramsey
Copy link
Member

Can we mark this "verify in next build"?

@ecwood
Copy link
Collaborator Author

ecwood commented Jun 30, 2023

Can we mark this "verify in next build"?

@saramsey Sort of... it hasn't been fixed in the upstream ontology, so this is just a temporary workaround.

@saramsey
Copy link
Member

Looks like the current version of robot also fails to convert the current verson of foodon.owl to obograph-json:

./robot convert --input foodon.owl --output foodon.json
OBO GRAPH ERROR Could not convert ontology to OBO Graph (see https://github.com/geneontology/obographs)
For details see: http://robot.obolibrary.org/errors#obo-graph-error
Use the -vvv option to show the stack trace.
Use the --help option to see usage information.

@saramsey
Copy link
Member

Here is the tail end of the long output from running the above with -vvv:

2023-06-30 15:28:56,023 DEBUG org.obolibrary.robot.IOHelper - Saving ontology as OboGraphs JSON Syntax with to IRI file:/Users/sramsey/Desktop/foodon.json
OBO GRAPH ERROR Could not convert ontology to OBO Graph (see https://github.com/geneontology/obographs)
For details see: http://robot.obolibrary.org/errors#obo-graph-error
java.io.IOException: errors#OBO GRAPH ERROR Could not convert ontology to OBO Graph (see https://github.com/geneontology/obographs)
	at org.obolibrary.robot.IOHelper.saveOntologyFile(IOHelper.java:1752)
	at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:876)
	at org.obolibrary.robot.CommandLineHelper.maybeSaveOutput(CommandLineHelper.java:667)
	at org.obolibrary.robot.ConvertCommand.execute(ConvertCommand.java:141)
	at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:244)
	at org.obolibrary.robot.CommandManager.execute(CommandManager.java:188)
	at org.obolibrary.robot.CommandManager.main(CommandManager.java:135)
	at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:61)

@saramsey
Copy link
Member

This seems like maybe the start of a solution?
http://robot.obolibrary.org/errors#obo-graph-error

@saramsey
Copy link
Member

@ecwood I have a temporary solution. In ont-load-inventory.yaml, let's switch to using foodon-base.owl, which doesn't trigger any errors with robot or owltools. This works on my laptop:

./owltools foodon-base.owl -o -f json foodon-base.json

This also works:

./robot convert --input foodon-base.owl --output foodon-base.json

This is in place of importing foodon.owl into RTX-KG2.

@saramsey
Copy link
Member

Longer term, maybe we can use a solution based robot remove as described on this page.

@saramsey
Copy link
Member

saramsey commented Jun 30, 2023

In the really long-term, maybe we'll find an alternative to ontobio that doesn't require the conversion to obograph JSON. I don't know. I know previously, I struggled with rdflib and that is why we ended up using ontobio.

@ecwood
Copy link
Collaborator Author

ecwood commented Jul 13, 2023

We need to add this to kg2-versions.md for documentation purposes.

@d33bs
Copy link

d33bs commented Jan 29, 2024

I came across this issue when trying to run the full RTX-KG2 workflow. In addition or perhaps alongside the changes mentioned regarding a pickled version of the original data, would it make sense to remove or update the reference in in ont-load-inventory.yaml (line 51) to reference foodon-base.json instead? As it stands, owltools errors seem to come up as a result of attempting to run the workflow.

Current data in ont-load-inventory.yaml:

-
  url: http://purl.obolibrary.org/obo/foodon.owl 
  file: foodon.owl
  download: true
  title: FOODON (Food Ontology)

Suggested updates (retaining the non-base FOODON data with hopes that it may be resolved and for later developer reference):

# Commented due to owlapi / owltools errors with conversions and object types.
# Replaced by FOODON base below in reference to RTXteam/RTX-KG2#300
# See: 
# - https://github.com/RTXteam/RTX-KG2/issues/303
# - https://github.com/FoodOntology/foodon/issues/277
#
#-
#   url: http://purl.obolibrary.org/obo/foodon.owl 
#   file: foodon.owl
#   download: true
#   title: FOODON (Food Ontology)
-
  url: https://raw.githubusercontent.com/FoodOntology/foodon/master/foodon-base.owl
  file: foodon-base.owl
  download: true
  title: FOODON (Food Ontology) Base

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

3 participants