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

[KGCL] New Image Axiom Request for cardiomyocyte #2298

Open
lubianat opened this issue Feb 26, 2024 · 12 comments
Open

[KGCL] New Image Axiom Request for cardiomyocyte #2298

lubianat opened this issue Feb 26, 2024 · 12 comments
Labels
from wikidata a new term request auto-generated from an Wikidata entry Stale

Comments

@lubianat
Copy link
Contributor

Request to add a new image axiom with KGCL

Wikidata item: cardiomyocyte
CL ID: http://purl.obolibrary.org/obo/CL_0000746
Image URL: http://commons.wikimedia.org/wiki/Special:FilePath/1020%20Cardiac%20Muscle.jpg

      Hey ontobot! apply: - create edge http://purl.obolibrary.org/obo/CL_0000746 <http://xmlns.com/foaf/0.1/depicted_by> "http://commons.wikimedia.org/wiki/Special:FilePath/1020%20Cardiac%20Muscle.jpg"^^xsd:anyURI

Additional notes or concerns:
This request was autogenerated from Wikidata.

@lubianat lubianat added the from wikidata a new term request auto-generated from an Wikidata entry label Feb 26, 2024
@lubianat
Copy link
Contributor Author

@hrshdhgd and @gouttegd here is an attempt at a simple edge change with KGCL, not sure if full URI syntax can be used.

@hrshdhgd
Copy link
Contributor

hrshdhgd commented Feb 27, 2024

@hrshdhgd and @gouttegd here is an attempt at a simple edge change with KGCL, not sure if full URI syntax can be used.

URI syntax can used but we recommend using CURIEs for readability. It's user/curator preference really.

@hrshdhgd
Copy link
Contributor

hrshdhgd commented Feb 27, 2024

I tried


Hey ontobot! apply:


on my fork and I get this error:

2024-02-27 08:04:16,027 ERROR org.incenp.obofoundry.kgcl.robot.ApplyCommand - KGCL syntax error: line 1, column 12: no viable alternative at input 'createedge'http://purl.obolibrary.org/obo/CL_0000746''

Thoughts @gouttegd ? Perhaps a space missing between create and edge?

@gouttegd
Copy link
Collaborator

gouttegd commented Feb 27, 2024

Perhaps a space missing between create and edge?

No. The root cause is the use of full IRI not enclosed within < and > characters.

This is something that the Python implementation of KGCL does allow, but my Java implementation does not (purposefully).

KGCL-Java follows the same logic as the one used, for example, in the OWL functional syntax: identifiers are either “naked“ CURIES or angle-bracketed full IRIs. So it’s either CL:0000746 or <http://purl.obolibrary.org/obo/CL_0000746>, but a “naked” full IRI (http://purl.obolibrary.org/obo/CL_0000746) will not be recognised.

Beyond this, note that there are several other problems with that command:

  • http://xmlns.com/foaf/1.0/depicted_by does not exist. The correct property is http://xmlns.com/foaf/1.0/depiction.
  • That property is an annotation property, not an object property. It cannot be used as the predicate of a create edge command (the predicate can only be either rdfs:subClassOf or an object property).
  • Currently, the KGCL DSL spec does not define a syntax for adding an arbitrary annotation. It only has a command for replacing an existing annotation (change annotation of CL:0000746 with foaf:depiction from "old value" to "new value").

@gouttegd
Copy link
Collaborator

It cannot be used as the predicate of a create edge command (the predicate can only be either rdfs:subClassOf or an object property).

Upon re-reading the KGCL definition of “edge”, this is actually an error of my part. An edge can use an annotation property as the predicate, provided the object side is itself a node and not a literal (if the object is a literal then this is an annotation, not an edge). So KGCL-Java refusing to create an edge in this case is wrong.

@lubianat
Copy link
Contributor Author

@gouttegd Unfortunately, though depicted_by does not exist, it is the one used by CL and Uberon. It is a long standing, low priority issue (see e.g. #753)

So, from the last comment, with the proper <> it might work?

@lubianat
Copy link
Contributor Author

@lubianat
Copy link
Contributor Author

lubianat commented Feb 27, 2024

Oh it was actually fixed by @anitacaron apparently! that is great. Here: #2184

@lubianat
Copy link
Contributor Author

@gouttegd
Copy link
Collaborator

gouttegd commented Feb 27, 2024

Just because we have been using the wrong property the whole time, does not mean we should keep doing so. And CL has already fixed that on its side, there’s no more foaf:depicted_by in CL right now as far as I can tell.

So, from the last comment, with the proper <> it might work?

No. create edge <http://purl.obolibrary.org/obo/CL_0000746> <http://xmlns.com/foaf/0.1/depiction> <http://commons.wikimedia.org/wiki/Special:FilePath/1020%20Cardiac%20Muscle.jpg> should work but will not for now because of a bug in KGCL-Java (which incorrectly refuses to create an edge using an annotation property).

And besides, the way foaf:depiction has typically be used so far is with a literal value (in OWL terms: AnnotationAssertion(foaf:depiction CL:0000746 "http://commons.wikimedia.org/wiki/Special:FilePath/1020%20Cardiac%20Muscle.jpg"^^xsd:anyURI)), rather than with an object value (in OWL terms: AnnotationAssertion(foaf:depiction CL:0000746 <http://commons.wikimedia.org/wiki/Special:FilePath/1020%20Cardiac%20Muscle.jpg>)). That means adding an annotation, not an edge, and KGCL itself does not allow to that for now.

@gouttegd
Copy link
Collaborator

No. create edge http://purl.obolibrary.org/obo/CL_0000746 http://xmlns.com/foaf/0.1/depiction http://commons.wikimedia.org/wiki/Special:FilePath/1020%20Cardiac%20Muscle.jpg should work but will not for now because of a bug in KGCL-Java (which incorrectly refuses to create an edge using an annotation property).

That particular bug is now fixed. With the next release of KGCL-Java,

create edge CL:0000746 foaf:depiction <http://commons.wikimedia.org/wiki/Special:FilePath/1020%20Cardiac%20Muscle.jpg>

will work.

But this does not change the fact that we would really need to create here is an annotation, not an edge, and KGCL itself needs to be amended to allow that.

Copy link

This issue has not seen any activity in the past 6 months; it will be closed automatically in one year from now if no action is taken.

@github-actions github-actions bot added the Stale label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from wikidata a new term request auto-generated from an Wikidata entry Stale
Projects
None yet
Development

No branches or pull requests

3 participants