SARS-CoV-2-Queries

virusGenesSARSr.rq

Code examples: curl

SPARQL

SELECT ?virus ?virusLabel ?gene ?geneLabel ?ncbigene WHERE {
  VALUES ?virus {
    wd:Q16000326 # SL-CoV-WIV1
    wd:Q88162038 # Bat SARS coronavirus Rp1
    wd:Q85939995 # SHC014-CoV
    wd:Q82069695 # SARS-CoV-2
    wd:Q34967815 # SARS coronavirus
    wd:Q85438966 # severe acute respiratory syndrome coronavirus
    wd:Q278567   # SARSr-CoV / SARS-CoV
  }
  ?gene wdt:P703 ?virus ; wdt:P31 wd:Q7187 .
  OPTIONAL { ?gene wdt:P351 ?ncbigene }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}

run or edit

Output

virus gene ncbigene
SARS-CoV-1 (edit) hypothetical protein sars7a (edit) 1489674
SARS-CoV-2 (edit) ORF3d (edit)
SARS-CoV-2 (edit) surface glycoprotein (edit) 43740568
SARS-CoV-2 (edit) ORF1a polyprotein;ORF1ab polyprotein (edit) 43740578
SARS-CoV-2 (edit) ORF3a protein-encoding gene (edit) 43740569
SARS-CoV-2 (edit) envelope protein (edit) 43740570
SARS-CoV-2 (edit) membrane glycoprotein (edit) 43740571
SARS-CoV-2 (edit) ORF6 protein (edit) 43740572
SARS-CoV-2 (edit) ORF7a protein (edit) 43740573
SARS-CoV-2 (edit) ORF7b (edit) 43740574
SARS-CoV-2 (edit) ORF8 protein (edit) 43740577
SARS-CoV-2 (edit) nucleocapsid phosphoprotein (edit) 43740575
SARS-CoV-2 (edit) ORF10 protein (edit) 43740576
SARS-CoV-2 (edit) Record to support submission of GeneRIFs for a gene not in Gene (COVID-19 virus; HCoV-19; Human coronavirus 2019; SARS-2; SARS-CoV2; SARS2). (edit) 43562271
SARSr-CoV (edit) protein E (edit) 1489671
SARSr-CoV (edit) hypothetical protein sars6 (edit) 1489673
SARSr-CoV (edit) hypothetical protein sars9b (edit) 1489679
SARSr-CoV (edit) Record to support submission of GeneRIFs for a gene not in Gene (Human coronavirus (strain SARS); SARS-like coronavirus; SARS-related coronavirus). (edit) 8673700
SARSr-CoV (edit) hypothetical protein sars7a (edit) 1489674
SARSr-CoV (edit) hypothetical protein sars7b (edit) 1489675
SARSr-CoV (edit) hypothetical protein sars3a (edit) 1489669
SARSr-CoV (edit) matrix protein (edit) 1489672
SARSr-CoV (edit) orf1a polyprotein (pp1a);orf1ab polyprotein (pp1ab) (edit) 1489680
SARSr-CoV (edit) hypothetical protein sars3b (edit) 1489670
SARSr-CoV (edit) hypothetical protein sars8a (edit) 1489676
SARSr-CoV (edit) E2 glycoprotein precursor (edit) 1489668
SARSr-CoV (edit) hypothetical protein sars8b (edit) 1489677
SARSr-CoV (edit) nucleocapsid protein (edit) 1489678

Code examples

curl

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

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

This SPARQL query is available under CCZero.