Open saramsey opened 3 years ago
My setup:
tagging @cmungall and @deepakunni3
@saramsey This is an interesting observation.
One thing to note here is that Ontobio uses owltools
to parse OWL to create a JSON representation.
While technically owltools and robot should be the same, but there is something else at play here.
Using Robot, if I were to convert the test.ttl to test.json (a form Ontobio recognizes), I get an error.
robot convert -vvv --input test.ttl --output test.json -f json
2021-01-11 13:30:10,064 DEBUG org.obolibrary.robot.IOHelper - Saving ontology Ontology(OntologyID(Anonymous-2)) [Axioms: 6 Logical Axioms: 1] First 20 axioms: {AnnotationAssertion(rdfs:label <http://foo.com/baz> "test label") AnnotationAssertion(rdfs:comment <http://foo.com/baz> "test comment") AnnotationAssertion(<http://www.w3.org/2004/02/skos/core#prefLabel> <http://foo.com/bar> "some node"@en) DataPropertyAssertion(<http://foo.com/baz> <http://foo.com/bar> "test property"^^xsd:string) Declaration(Class(<http://foo.com/bar>)) Declaration(DataProperty(<http://foo.com/baz>)) } as OboGraphs JSON Syntax with to IRI file:/Users/deepak.unni3/GIT/ontobio-master/test.json
2021-01-11 13:30:10,070 DEBUG org.obolibrary.robot.ExceptionHelper - {} missing exception message.
java.lang.NullPointerException
at org.geneontology.obographs.owlapi.FromOwl.getNodeId(FromOwl.java:717)
at org.geneontology.obographs.owlapi.FromOwl.generateGraph(FromOwl.java:515)
at org.geneontology.obographs.owlapi.FromOwl.generateGraphDocument(FromOwl.java:110)
at org.obolibrary.robot.IOHelper.saveOntologyFile(IOHelper.java:1121)
at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:583)
at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:524)
at org.obolibrary.robot.ConvertCommand.execute(ConvertCommand.java:167)
at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:248)
at org.obolibrary.robot.CommandManager.execute(CommandManager.java:192)
at org.obolibrary.robot.CommandManager.main(CommandManager.java:139)
at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:55)
null
java.lang.NullPointerException
at org.geneontology.obographs.owlapi.FromOwl.getNodeId(FromOwl.java:717)
at org.geneontology.obographs.owlapi.FromOwl.generateGraph(FromOwl.java:515)
at org.geneontology.obographs.owlapi.FromOwl.generateGraphDocument(FromOwl.java:110)
at org.obolibrary.robot.IOHelper.saveOntologyFile(IOHelper.java:1121)
at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:583)
at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:524)
at org.obolibrary.robot.ConvertCommand.execute(ConvertCommand.java:167)
at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:248)
at org.obolibrary.robot.CommandManager.execute(CommandManager.java:192)
at org.obolibrary.robot.CommandManager.main(CommandManager.java:139)
at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:55)
Now if I were to convert test.ttl to test.owl then it works as demonstrated above by @saramsey
And when I convert this derived test.owl to test.json,
robot convert --input test.owl --output test.json -f json
I get the following:
{
"graphs" : [ {
"nodes" : [ {
"id" : "http://foo.com/baz",
"meta" : {
"comments" : [ "test comment" ]
},
"type" : "PROPERTY",
"lbl" : "test label"
}, {
"id" : "http://foo.com/bar",
"meta" : {
"basicPropertyValues" : [ {
"pred" : "http://www.w3.org/2004/02/skos/core#prefLabel",
"val" : "some node"
} ]
},
"type" : "INDIVIDUAL"
} ],
"edges" : [ ],
"meta" : {
"subsets" : [ ],
"xrefs" : [ ],
"basicPropertyValues" : [ ]
},
"equivalentNodesSets" : [ ],
"logicalDefinitionAxioms" : [ ],
"domainRangeAxioms" : [ ],
"propertyChainAxioms" : [ ]
} ]
}
While I see the owl:DatatypeProperty, it ends up as a node in the graph instead of a property on the node with IRI http://foo.com/bar
.
@cmungall Thoughts?
It's correct for http://foo.com/baz
to show up as a "node", since in this graph view, all entities are nodes, even properties. But I'm not sure how the triple should show up. Normally if you're linking objects, like with subClassOf
, you would see an entry in the edges
list: {'a', 'subClassOf
, 'b'}` or similar, for example. It may be different because this is a datatype property.
Thanks, @dougli1sqrd and @deepakunni3. Is the current behavior of ontobio
on this example input (i.e., not showing any edge in the resulting ontobio object, corresponding to the datatype property) expected?
@dougli1sqrd Agreed. We expect to see the dataTypeProperty as a node.
@saramsey No, the behavior is definitely not expected.
What we should be seeing is a proper edge that links http://foo.com/bar
to test_property
where the predicate is http://foo.com/baz
. But "test property" is a string, having a direct edge doesn't make sense. So this should be a node property on node http://foo.com/bar
.
Yeah should this be in one of the meta
fields?
Thanks for your replies, @deepakunni3 and @dougli1sqrd!
Great, a node property (in the ontobio object model) would be ideal for us. Any sense of how light or heavy a lift it will be, to make this change to owltools/ontobio?
Hi ontobio team, just checking back on this-- do you think this is a feasible fix? Would the fix be in owltools or in ontobio?
@cmungall Any recommendations on this?
Are only a selected set of properties end up in meta
field of a node in OBOGraphs?
Hi @deepakunni3 @cmungall, do you have any updates on the status / feasibility of this fix? a few more issues that stem from this have cropped up on our end, so I thought I'd check back in :)
a few things going on here. Looks like something unrelated to ontobio for ttl->rdfxml conversion? both owltools and robot are wrappers to the owlapi, but they may use different versions? if there is a bug it should be reported on the appropriate tracker.
but I think the question here is about the obograph spec. yes, this should be clarified, and yes we should make DPs nodes as we do for OPs. Can you add to obographs?
a few things going on here. Looks like something unrelated to ontobio for ttl->rdfxml conversion? both owltools and robot are wrappers to the owlapi, but they may use different versions? if there is a bug it should be reported on the appropriate tracker.
but I think the question here is about the obograph spec. yes, this should be clarified, and yes we should make DPs nodes as we do for OPs. Can you add to obographs?
Thank you @cmungall ! For DPs, can there also be a triple (or alternately, a property on the DP node) that indicates the "parent" node for which it is a owlDatatypeProperty
?
yes, it should have these edges
On Wed, Mar 10, 2021 at 12:16 PM Stephen A. Ramsey @.***> wrote:
a few things going on here. Looks like something unrelated to ontobio for ttl->rdfxml conversion? both owltools and robot are wrappers to the owlapi, but they may use different versions? if there is a bug it should be reported on the appropriate tracker.
but I think the question here is about the obograph spec. yes, this should be clarified, and yes we should make DPs nodes as we do for OPs. Can you add to obographs?
Thank you @cmungall https://github.com/cmungall ! For DPs, can there also be a triple (or alternately, a property on the DP node) that indicates the "parent" node that it is associated with?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/biolink/ontobio/issues/507#issuecomment-796027525, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMMONVSDDGITF74R2NZGTTC7AR5ANCNFSM4VZ7BICA .
Hello Ontobio team,
I have a simple RDF Turtle file
test.ttl
that I want to load using Ontobio:When I convert it to OWL using robot,
I get something reasonable, including my "test property" as shown here:
But when I load that
test.owl
file intoontobio
2.1.2,I don't see the property in the node:
Is there a way to load an OWL file into Ontobio and to programmatically access a
owl:DatatypeProperty
field of a class?