SARS-CoV-2-Queries

allBetacoronaViruses.rq

Code examples: curl

SPARQL

SELECT ?virus ?virusLabel ?ncbi WHERE {
  ?virus wdt:P171+ wd:Q16532287 .
  OPTIONAL { ?virus wdt:P685 ?ncbi }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "pt,en". }
} ORDER BY ?virusLabel

run or edit

Output

virus ncbi
BANAL-103 (edit)
BANAL-52 (edit)
16BO133 (edit)
BM48-31 (edit)
Bat Hp-betacoronavirus Zhejiang2013 (edit)
Bat SARS CoV Rf1/2004 (edit) 347537
Bat SARS CoV Rm1/2004 (edit) 347536
Bat SARS CoV Rp3/2004 (edit) 349344
Bat SARS coronavirus Rp1 (edit) 349342
Bat SARS-like coronavirus RsSHC014 (edit) 1415851
Bat SARS-like coronavirus WIV1 (edit) 1415852
Bat coronavirus RaTG13 (edit) 2709072
Betacoronavirus 1 (edit) 694003
BtKY72 (edit)
China Rattus coronavirus HKU24 (edit) 2501960
Civet SARS-CoV (edit)
Coronavirus Neoromicia/PML-PHE1/RSA/2011 (edit) 1368314
Coronavírus humano HKU1 (edit) 290028
Eidolon bat coronavirus C704 (edit)
Embecovirus (edit) 2509481
Erinaceus coronavirus (edit)
Erinaceus hedgehog coronavirus HKU31 (edit) 2664184
Hedgehog coronavirus 1 (edit) 1965093
Hibecovirus (edit) 2509486
Hp-BatCoV HKU25 (edit)
Human coronavirus HKU1 (edit) 443239
London1_novel CoV/2012 (edit)
Merbecovirus (edit) 2509494
Murine coronavirus (edit) 694005
Myodes coronavirus 2JL14 (edit)
Nobecovirus (edit) 2509502
Pipistrellus bat coronavirus HKU5 (edit) 694008
Rabbit Coronavirus HKU14 (edit) 1160968
RacCS203 (edit)
Rc-o319 (edit)
RhGB01 (edit)
RmYN02 (edit)
Rousettus bat coronavirus GCCDC1 (edit) 2501962
Rousettus bat coronavirus HKU9 (edit) 694006
RpYN06 (edit)
SARS coronavirus B024 (edit) 305407
SARS-CoV (edit) 694009
SARS-CoV (edit) 227859
SARS-CoV-1 (edit)
Sarbecovirus (edit) 2509511
Tylonycteris bat coronavirus HKU4 (edit) 694007
coronavírus da síndrome respiratória aguda grave 2 (edit) 2697049
coronavírus da síndrome respiratória do Oriente Médio (edit) 1335626

Code examples

curl

curl -s https://raw.githubusercontent.com/egonw/SARS-CoV-2-Queries/master/sparql/allBetacoronaViruses.rq | sed 's+<lang/>+pt+' > allBetacoronaViruses.rq

curl -H "Accept: text/tab-separated-values" -G https://query.wikidata.org/bigdata/namespace/wdq/sparql --data-urlencode query@allBetacoronaViruses.rq

This SPARQL query is available under CCZero.