-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample_query.txt
43 lines (33 loc) · 1.36 KB
/
example_query.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#1 Get sample bundles where the organ is part of the cardiovascular system
PREFIX :<http://rdf.data.humancellatlas.org/>
PREFIX bundle:<https://schema.humancellatlas.org/bundle/5.1.0/>
PREFIX biomaterials:<https://schema.humancellatlas.org/type/biomaterial/5.1.0/>
PREFIX obo: <http://purl.obolibrary.org/obo/>
SELECT DISTINCT ?bundle WHERE {
?bundle a bundle:biomaterial ;
:biomaterials
[:hca_ingest [:document_id ?speciemen_id] ;
:content [a biomaterials:specimen_from_organism ;
:organ
[:text ?tissue ;
:ontology ?uberon]]] .
?uberon rdfs:subClassOf [a owl:Restriction ;
owl:onProperty obo:BFO_0000050 ;
owl:someValuesFrom obo:UBERON_0001017 ] .
}
#2 Get organ information for all bundles
PREFIX hca:<http://rdf.data.humancellatlas.org/>
PREFIX bundle:<https://schema.humancellatlas.org/bundle/5.1.0/>
SELECT distinct ?bioid ?name ?tissue ?uberon WHERE {
?bundle a bundle:biomaterial ;
hca:biomaterials
[hca:content
[hca:organ
[hca:text ?tissue ;
hca:ontology ?uberon]]] .
?bundle a bundle:biomaterial ;
hca:biomaterials
[hca:content
[hca:biomaterial_core
[hca:biomaterial_id ?bioid ; hca:biomaterial_name ?name]]]
}