Skip to content

Commit

Permalink
Merge pull request #146 from INCATools/simple_closure
Browse files Browse the repository at this point in the history
Create simple_closure.rq
  • Loading branch information
dosumis authored Mar 20, 2024
2 parents 1f08ced + c70538d commit bc3df32
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions sparql/simple_closure.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#+ summary: Find subterms
#+ description: Enter a single ontology term iri, get back all parts and subclasses. Default (nephron tubule) added for demo purposes

#+ defaults:
#+ - input_term: http://purl.obolibrary.org/obo/UBERON_0001231 # nephron tubule

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX part_of: <http://purl.obolibrary.org/obo/BFO_0000050>
PREFIX oboinowl: <http://www.geneontology.org/formats/oboInOwl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?subterm (STR(?subterm_label_obj) as ?subterm_label)
WHERE {
{
?subterm part_of: ?_input_term .
}
UNION
{
?subterm rdfs:subClassOf ?_input_term .
}
?subterm rdfs:label ?subterm_label_obj .
}





0 comments on commit bc3df32

Please sign in to comment.