SARS-CoV-2-Queries

allBetacoronaVirusesGraph.rq

Code examples: curl

SPARQL

#defaultView:Graph
SELECT ?parent ?parentLabel ?virus ?virusLabel ?ncbi WHERE {
  ?virus wdt:P171+ wd:Q16532287 .
  ?virus wdt:P171 ?parent .
  OPTIONAL { ?virus wdt:P685 ?ncbi }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "pt,en". }
}

run or edit

Output

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

Code examples

curl

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

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

This SPARQL query is available under CCZero.