callahantiff / PheKnowLator

PheKnowLator: Heterogeneous Biomedical Knowledge Graphs and Benchmarks Constructed Under Alternative Semantic Models
https://github.com/callahantiff/PheKnowLator/wiki
Apache License 2.0
171 stars 29 forks source link

Pheknowlator knowledge graph in OBO format #92

Closed ablack3 closed 3 years ago

ablack3 commented 3 years ago

Hi, I'm interested in trying to use the PheKnowLator integrated knowledge graph in R with the OntologyX packages. I downloaded PheKnowLator_MergedOntologies.owl from the GCP bucket &prefix=&forceOnObjectsSortingFiltering=false). I followed instructions to convert the .owl file to a .obo file using robot and hit the following error.

C:\Users\Adam Black\projects\PheKnowLator>java  -jar C:\Windows\Robot\robot.jar convert --input .\current_build_knowledge_graphs_instance_builds_inverse_relations_owl_PheKnowLator_MergedOntologies.owl --output .\current_build_knowledge_graphs_instance_builds_inverse_relations_owl_PheKnowLator_MergedOntologies.obo
2021-02-16 15:13:08,028 ERROR org.obolibrary.robot.IOHelper - Input ontology contains 2 triple(s) that could not be parsed:
 - <http://purl.obolibrary.org/obo/OBI_0000759> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2149425744.
 - <https://www.wikidata.org/wiki/Q2306597> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2149425745.

OBO STRUCTURE ERROR Ontology does not conform to OBO structure rules:
multiple comment tags not allowed. in frame:Frame(CLO:0050730 id( CLO:0050730)def( A immortal mouse skin-derived cell line cell that has the characteristics: Mouse skin derived cell line. Induced by ultra-violet irradiation.)name( RCB1995 cell)property_value( IAO:0000118 UV&middot;BAL-1.1 xsd:string)property_value( IAO:0000117 RIKEN Cell bank Team Yongqun He xsd:string)comment( Register: Kuribayashi, Kagemasa)property_value( IAO:0000118 RCB1995 xsd:string)comment( Originator: Kuribayashi, Kagemasa)comment( Derived from tissue: skin in animal: mouse, BALB/c.)is_a( CLO:0000176)is_a( CLO:0000520))
For details see: http://robot.obolibrary.org/errors#obo-structure-error
Use the -vvv option to show the stack trace.
Use the --help option to see usage information.

As I am new to this project and the ontology world in general I have a couple basic questions: Is it possible to convert the pheKnowLator knowledge graph into the OBO format? Are owl and obo formats interchangeable? Can the pheKnowLator knowlege graph be considered a single integrated ontology (i.e. Are tools designed to work with a single obo ontology such as the ontologyX R packages expected to work with the phenKnowlator knowledge graph)?

Thanks for this amazing work.

callahantiff commented 3 years ago

Hey @ablack3 - thanks so much for the suggestion. We will definitely look into creating a version of the output in OBO. I think that there are a few other formats that we provide that will still be useful for you (e.g. any of the identifier edge list text files).

In the meantime, I want to share a tutorial I created that provides examples in Python using NetworkX and RDFLib using the Vaccine Ontology from the Open Biomedical Ontology Foundry and one of the PheKnowLator builds.

Jupyter Notebook: RDF_Graph_Processing_Example.ipynb

Looking forward to going over this tomorrow!

callahantiff commented 3 years ago

@bill-baumgartner - Do you know of an easy way to convert an OWL graph into an OBO graph? I suspect that this will be painful given that @ablack3 was unable to do this using ROBOT on only the merged ontology subset (meaning that the errors raised are from the original ontologies and are likely to vary by ontology).

callahantiff commented 3 years ago

Update

@ablack3 take a look at the R Library called rdflib, it looks to parallel the library that I recommend in Python RDFLib and should provide you with the functionality you need.

callahantiff commented 3 years ago

@ablack3 - closing this for now. Please re-open if you still need this output type.