Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions sparql/cell_by_location.rq
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
#+ summary: Find cells by location
#+ description: Enter an anatomical location, get back a list of cell type IRIs and labels
#+ summary: Find cells by type and location
#+ description: Input: anatomical location IRI (default added as example); optionally specify a cell type IRI. Returns a list of cell type IRIs and labels.

#+ defaults:
#+ - location: http://purl.obolibrary.org/obo/UBERON_0002113
#+ - cell: http://purl.obolibrary.org/obo/CL_0000000


PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX overlaps: <http://purl.obolibrary.org/obo/RO_0002131>
PREFIX cell: <http://purl.obolibrary.org/obo/CL_0000000>

SELECT DISTINCT ?cell_iri (STR(?qlabel) as ?cell_label)
WHERE {
?cell_iri overlaps: ?_location_iri .
?cell_iri rdfs:subClassOf cell: .
?_cell_iri overlaps: ?_location_iri .
?cell_iri rdfs:subClassOf ?_cell_iri: .
?cell_iri rdfs:label ?qlabel .
}