SARS-CoV-2-Queries

allSARSCoVVirusesTaxonomy.rq

Code examples: curl

SPARQL

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

run or edit

Output

virus ncbi
Bat SARS-like coronavirus WIV1 (edit) 1415852
coronavírus da síndrome respiratória aguda grave 2 (edit) 2697049
SARS-CoV-1 (edit)
Bat SARS-like coronavirus RsSHC014 (edit) 1415851
Bat SARS coronavirus Rp1 (edit) 349342
SARS coronavirus B024 (edit) 305407
Bat coronavirus RaTG13 (edit) 2709072
Bat SARS CoV Rf1/2004 (edit) 347537
Bat SARS CoV Rm1/2004 (edit) 347536
Bat SARS CoV Rp3/2004 (edit) 349344
RmYN02 (edit)
Civet SARS-CoV (edit)
RacCS203 (edit)
Rc-o319 (edit)
16BO133 (edit)
BtKY72 (edit)
BM48-31 (edit)
RpYN06 (edit)
RhGB01 (edit)
BANAL-52 (edit)
BANAL-103 (edit)

Code examples

curl

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

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

This SPARQL query is available under CCZero.