-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsumQTLs.rq
43 lines (42 loc) · 1014 Bytes
/
sumQTLs.rq
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
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcmitype: <http://purl.org/dc/dcmitype/>
PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX so: <http://purl.obolibrary.org/obo/so#>
PREFIX QTL: <http://purl.obolibrary.org/obo/SO_0000771>
SELECT
(CONCAT('NCBITaxon:', REPLACE(STR(?taxon_uri), '.+_', '')) AS ?taxon_id)
(COUNT(DISTINCT ?pmcid) AS ?n_articles)
(COUNT(?qtl_a) AS ?n_qtls)
(COUNT(?qtl_b) AS ?n_qtls_with_loc)
(COUNT(?qtl_c) AS ?n_qtls_with_genes)
WHERE
{
{
SELECT ?qtl ("A" AS ?qtl_a)
WHERE {
?qtl a QTL: .
}
}
UNION
{
SELECT ?qtl ("B" AS ?qtl_b)
WHERE {
?qtl a QTL: ;
faldo:location ?loc .
}
}
UNION
{
SELECT DISTINCT ?qtl ("C" AS ?qtl_c)
WHERE {
?qtl a QTL: ;
so:overlaps ?gene .
}
}
?dts a dcmitype:Dataset ;
so:genome_of ?taxon_uri ;
dcterms:hasPart ?qtl .
?qtl dcterms:isReferencedBy ?pmcid .
}
GROUP BY ?taxon_uri