Closed zengxianhua closed 4 years ago
What are you trying to accomplish with the rdf2x
package?
The error that you're showing looks like a blank node, potentially coming from here (starting on line 298037 in doid.owl
):
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AllDisjointClasses"/>
<owl:members rdf:parseType="Collection">
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111099"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111100"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111101"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111102"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111103"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111104"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111105"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111106"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111107"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111108"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111109"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111110"/>
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/DOID_0111111"/>
</owl:members>
</rdf:Description>
-3be79fdb:16f03ccdbaf:-5dd9
is a reference to the blank node, which has no URI, so perhaps this package does not support anonymous subjects.
Appreicate for your response.I want to dump the ontologies and the relations between ontologies into relation database such as mysql.The rdf2x tool can solve it, however it encouts some errors which result in exporting out data failure.Do you know any tools to dump the doid rdf/owl format data into relation database?
I'm not aware of any tools specifically for that purpose, but I do a lot of work between MySQL databases and ontologies. I've had to write my own scripts in the past for this purpose. I use the following tools:
You could potentially write SPARQL queries to generate a CSV file with ROBOT and then load it into your database.
Alternatively, you could write a python script using rdflib
to parse the data and PyMySQL
to add it to your database.
Thanks a lot.I will try it.
when dealing with HumanDiseaseOntology rdf representation file(url:https://github.com/DiseaseOntology/HumanDiseaseOntology/blob/master/src/ontology/doid.owl) using rdf2x tool(https://github.com/Merck/rdf2x), occurs parsing errors such as InstanceAggregator:194 - Error parsing quad [urn:x-arq:DefaultGraphNode -3be79fdb:16f03ccdbaf:-5dd9 http://www.w3.org/1999/02/22-rdf-syntax-ns#first http://purl.obolibrary.org/obo/DOID_0111104]: Subject has to be a URI, encountered: -3be79fdb:16f03ccdbaf:-5dd9
can anybody give any advices?