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 has_parts tag (use SPARQL) #45

Open
dosumis opened this issue Mar 7, 2023 · 4 comments
Open

add has_parts tag (use SPARQL) #45

dosumis opened this issue Mar 7, 2023 · 4 comments
Assignees

Comments

@dosumis
Copy link
Member

dosumis commented Mar 7, 2023

We will assume that the results in the absence of reasoning will be sufficiently accurate for our use case.

@admclachlan
Copy link

Same as has_sub

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX obo: <http://purl.obolibrary.org/obo/>

CONSTRUCT {
	?x <http://n2o.neo/property/nodeLabel> "has_parts" .
}
WHERE {
  ?y obo:BFO_0000050 ?x . 
}

@admclachlan
Copy link

tried testing here: http://ts.p2.virtualflybrain.org/rdf4j-workbench/repositories/NONE/repositories but doesn't seem that it's working?

@dosumis
Copy link
Member Author

dosumis commented Mar 22, 2023

Some more advanced SPARQL needed. The where clause needs to match existential restrictions. @hkir-dev can help.

@hkir-dev
Copy link
Contributor

hkir-dev commented Mar 23, 2023

This should handle ?y SubClassOf: part_of some ?x definitions as well.

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX obo: <http://purl.obolibrary.org/obo/>

CONSTRUCT {
	?x <http://n2o.neo/property/nodeLabel> "has_parts" .
}
WHERE {
    { ?y rdfs:subClassOf [
    a owl:Restriction ;
    owl:onProperty obo:BFO_0000050 ;
    owl:someValuesFrom ?x ] 
  }
  UNION {
    ?y obo:BFO_0000050 ?x .
  }
  ?x a owl:Class .
  ?y a owl:Class .
}

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

No branches or pull requests

3 participants