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

add SubClassOf ObjectHasValue to the recognized graph projection patterns #807

Closed
turbomam opened this issue Oct 1, 2024 · 7 comments · Fixed by #806
Closed

add SubClassOf ObjectHasValue to the recognized graph projection patterns #807

turbomam opened this issue Oct 1, 2024 · 7 comments · Fixed by #806

Comments

@turbomam
Copy link
Collaborator

turbomam commented Oct 1, 2024

As discussed in the obo-community's ontology-access-kit thread: https://obo-communitygroup.slack.com/archives/C03D93DEALA/p1727706503549479

@cmungall did you already address this in graph projections and subset validation #806?

What OAK command can expose the fact that MiSeq is_manufactured_by Illumina, where Illumina is a named individual in OBI?

see also https://ontobee.org/ontology/rdf/OBI?iri=http://purl.obolibrary.org/obo/OBI_0002003

Neither of these get it

runoak \
    --input sqlite:obo:obi relationships \
    --include-metadata .desc//p=i OBI:0400103  | grep 0000304
runoak \
    --input sqlite:obo:obi term-metadata \
    --output-type tsv \
    --additional-metadata .desc//p=i OBI:0400103 | grep 0000304
@cmungall
Copy link
Collaborator

cmungall commented Oct 2, 2024

Fixed in #806

@turbomam
Copy link
Collaborator Author

turbomam commented Oct 3, 2024

Awesome

runoak --input sqlite:obo:obi relationships OBI:0002003

subject predicate object subject_label predicate_label object_label
OBI:0002003 rdfs:subClassOf OBI:0400103 MiSeq None DNA sequencer
OBI:0002003 OBI:0000304 OBI:0000759 MiSeq is_manufactured_by Illumina

@turbomam
Copy link
Collaborator Author

turbomam commented Oct 3, 2024

@cmungall Now I just have to learn how to query for things that were manufactured by Illumina

runoak --input sqlite:obo:obi relationships .desc//p=is_manufactured_by Illumina

returns 7621 rows

runoak --input sqlite:obo:obi info .desc//p=is_manufactured_by Illumina

returns 0 rows

@turbomam
Copy link
Collaborator Author

turbomam commented Oct 3, 2024

I can very crudely approximate what I want with

runoak --input sqlite:obo:obi relationships .all | grep -P 'is_manufactured_by\s+Illumina'

@cmungall
Copy link
Collaborator

cmungall commented Oct 3, 2024

All relationships for all entities manufactured by Illumina:

runoak --input sqlite:obo:obi relationships .desc//p=OBI:0000304 Illumina

@cmungall
Copy link
Collaborator

cmungall commented Oct 3, 2024

We need to enhance the docs here

Predicate abbreviations are described in the tutorial:
https://incatools.github.io/ontology-access-kit/intro/tutorial01.html#predicate-abbreviations

Predicate CURIEs always work. For common predicates (i+p), abbreviations are allowed.

We need to also mention predicate abbreviations here:
https://incatools.github.io/ontology-access-kit/howtos/use-oak-expression-language.html#ancestors

@cmungall
Copy link
Collaborator

cmungall commented Oct 3, 2024

UPDATE

This is what you want:

runoak --input sqlite:obo:obi relationships .child//p=OBI:0000304 Illumina

Understanding why is objectively confusing, but a start is in the table here:

https://incatools.github.io/ontology-access-kit/guide/relationships-and-graphs.html#further-notes-on-owl-and-graph-projection

image

direct edge queries ("children") are handled by the SQL adapter which directly queries all the structures shown in the table

indirect or entailed edges ("descendants") in SQL query the entailed_edge table which is populated by RelationGraph, which does not support the HasValue pattern.

We really need standardization of these patterns. For now the best we can do is document and provide examples, sorry about that.

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

Successfully merging a pull request may close this issue.

2 participants