-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcoronavirus-proteins.rq
59 lines (59 loc) · 1.92 KB
/
coronavirus-proteins.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# SELECT DISTINCT ?wdRoot ?route (substr(STR(?wdRoot),32) AS ?wikidata) ?ncbi ?protein ?refseq ?uniprot WHERE {
SELECT DISTINCT ?virusLabel (substr(STR(?wdRoot),32) AS ?wikidata) ?ncbi ?refseq ?uniprot ?guideToPharma WHERE {
VALUES ?virus {
wd:Q278567 # SARSr-CoV
wd:Q4902157 # MERS-CoV
wd:Q8351095 # NL63
wd:Q16000326 # SL-CoV-WIV1
wd:Q16983356 # 229E
wd:Q16983360 # HKU1
wd:Q16991954 # OC43
wd:Q34967815 # SARS coronavirus
wd:Q82069695 # SARS-CoV-2
wd:Q85438966 # SARS-CoV
wd:Q85939995 # SHC014-CoV
wd:Q88162038 # Bat SARS coronavirus Rp1
wd:Q88169973 # SARS coronavirus B024
wd:Q91561236 # RaTG13
wd:Q97709258 # Bat SARS CoV Rf1
wd:Q97709416 # Bat SARS CoV Rm1
wd:Q97709493 # Bat SARS CoV Rp3
wd:Q104400171 # SARS-CoV-2 Beta variant
wd:Q104857014 # RmYN02
wd:Q105221659 # Civet SARS-CoV
wd:Q105686530 # RacCS203
wd:Q105759568 # Rc-o319
wd:Q105759618 # BtKY72/Rhinolophus sp./Kenya/2007
wd:Q105759623 # BtCoV/BM48-31/Rhi bla/Bulgaria/2008
wd:Q107719644 # RhGB01
wd:Q108616377 # BANAL-52
wd:Q108616505 # BANAL-103
}
{
# genes
?wdRoot wdt:P703 ?virus ; wdt:P31 wd:Q7187 .
OPTIONAL { ?wdRoot wdt:P351 ?ncbi }
OPTIONAL {
?wdRoot wdt:P688 | ^wdt:P702 ?protein .
OPTIONAL { ?protein wdt:P637 ?refseq }
OPTIONAL { ?protein wdt:P352 ?uniprot }
OPTIONAL { ?protein wdt:P5458 ?guideToPharma }
}
# BIND ("via gene" AS ?route)
BIND (?wdRoot AS ?gene)
}
UNION
{
# proteins
?wdRoot wdt:P703 ?virus ; wdt:P31 wd:Q8054 .
OPTIONAL {
?gene wdt:P688 | ^wdt:P702 ?wdRoot
OPTIONAL { ?gene wdt:P351 ?ncbi }
}
OPTIONAL { ?wdRoot wdt:P637 ?refseq }
OPTIONAL { ?wdRoot wdt:P352 ?uniprot }
# BIND ("via protein" AS ?route)
BIND (?wdRoot AS ?protein)
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?ncbi ?wikidata