SARS-CoV-2-Queries

litHumanCoronavirusesProteinCounts.rq

Code examples: curl

SPARQL

SELECT ?virus ?virusLabel ?protein ?proteinLabel ?count WITH {
  SELECT ?virus ?protein (COUNT(DISTINCT ?work) AS ?count) WHERE {
    VALUES ?virus {
      wd:Q82069695 # SARS-CoV-2
      wd:Q16983360 # HKU1
      wd:Q16991954 # OC43
      wd:Q8351095  # NL63 
      wd:Q16983356 # 229E 
      wd:Q4902157  # MERS-CoV
      wd:Q278567   # SARS-CoV
    }
    ?protein wdt:P31 wd:Q8054 .
    { ?protein wdt:P703 ?virus }
    UNION
    { ?protein wdt:P702 | ^wdt:P688 ?gene . ?gene wdt:P703 ?virus }
    ?work wdt:P921 ?protein .
  } GROUP BY ?virus ?protein
} AS %ARTICLES WHERE {
  INCLUDE %ARTICLES
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}
ORDER BY DESC(?count) ?virus ?protein

run or edit

Output

virus protein count
SARS-CoV-2 (edit) spike glycoprotein [SARS-CoV-2] (edit) 415
SARS-CoV-2 (edit) nucleocapsid protein [SARS-CoV-2] (edit) 108
SARSr-CoV (edit) spike glycoprotein [SARS-Cov] (edit) 98
SARS-CoV-2 (edit) Papain-like proteinase [SARS-CoV-2] (edit) 74
SARSr-CoV (edit) nucleoprotein [SARS-Cov] (edit) 70
SARSr-CoV (edit) 3C-like proteinase [SARS-Cov] (edit) 66
SARS-CoV-2 (edit) non-structural protein 5 [SARS-CoV-2] (edit) 59
SARS-CoV-2 (edit) Non-structural protein 10 [SARS CoV-2] (edit) 57
SARS-CoV-2 (edit) RNA-directed RNA polymerase [SARS-CoV-2] (edit) 57
SARS-CoV-2 (edit) Host translation inhibitor nsp1 [SARS-CoV-2] (edit) 51
SARSr-CoV (edit) papain-like proteinase [SARS-Cov] (edit) 46
SARS-CoV-2 (edit) non-structural protein 16 [SARS-CoV-2] (edit) 45
SARS-CoV-2 (edit) Non-structural protein 14 [SARS-CoV-2] (edit) 43
SARSr-CoV (edit) Protein 3a [SARS-Cov] (edit) 41
SARS-CoV-2 (edit) Helicase [SARS-CoV-2] (edit) 41
SARSr-CoV (edit) Envelope small membrane protein [SARS-Cov] (edit) 38
SARS-CoV-2 (edit) envelope protein [SARS-CoV-2] (edit) 34
SARS-CoV-2 (edit) ORF8 protein [SARS-CoV-2] (edit) 31
SARS-CoV-2 (edit) Viroporin 3a [SARS-CoV-2] (edit) 30
SARS-CoV-2 (edit) non-structural protein 15 [SARS-CoV-2] (edit) 28
SARS-CoV-2 (edit) Non-structural protein 7 [SARS-CoV-2] (edit) 26
SARSr-CoV (edit) Membrane protein [SARS-Cov] (edit) 25
SARS-CoV-2 (edit) membrane protein [SARS-CoV-2] (edit) 25
SARS-CoV-2 (edit) Non-structural protein nsp8 [SARS-CoV-2] (edit) 25
SARSr-CoV (edit) Non-structural protein NS6 [SARS-Cov] (edit) 20
SARS-CoV-2 (edit) ORF6 protein [SARS-CoV-2] (edit) 20
SARS-CoV-2 (edit) Protein 7a [SARS-CoV-2] (edit) 19
SARSr-CoV (edit) host translation inhibitor nsp1 [SARS-Cov] (edit) 17
SARS-CoV-2 (edit) Non-structural protein 9 [SARS-CoV-2] (edit) 17
SARSr-CoV (edit) Protein 7a [SARS-Cov] (edit) 15
SARS-CoV-2 (edit) Protein ORF9b [SARS-CoV-2] (edit) 15
SARS-CoV-2 (edit) Non-structural protein 2 [SARS CoV-2] (edit) 14
SARS-CoV-2 (edit) non-structural protein 6 [SARS-CoV-2] (edit) 12
SARSr-CoV (edit) Non-structural protein 3b [SARS-Cov] (edit) 10
SARSr-CoV (edit) 2'-O-methyltransferase [SARS-Cov] (edit) 10
SARSr-CoV (edit) Guanine-N7 methyltransferase [SARS-Cov] (edit) 10
SARSr-CoV (edit) protein non-structural 8a [SARS-Cov] (edit) 10
Middle East respiratory syndrome coronavirus (edit) spike glycoprotein (edit) 10
SARSr-CoV (edit) helicase [SARS-Cov] (edit) 9
SARS-CoV-2 (edit) Non-structural protein 4 [SARS-CoV-2] (edit) 9
SARSr-CoV (edit) Protein 9b [SARS-Cov] (edit) 8
SARSr-CoV (edit) uridylate-specific endoribonuclease [SARS-Cov] (edit) 8
SARSr-CoV (edit) non-structural protein 10 [SARS-Cov] (edit) 8
SARSr-CoV (edit) protein non-structural 8b [SARS-Cov] (edit) 8
SARS-CoV-2 (edit) ORF10 protein [SARS-CoV-2] (edit) 8
SARSr-CoV (edit) replicase polyprotein 1ab [SARS-Cov] (edit) 7
SARSr-CoV (edit) RNA-directed RNA polymerase [SARS-Cov] (edit) 7
SARS-CoV-2 (edit) ORF3b protein [SARS-CoV-2] (edit) 7
SARS-CoV-2 (edit) Protein non-structural 7b [SARS-CoV-2] (edit) 7
SARSr-CoV (edit) Protein non-structural 7b [SARS-Cov] (edit) 6
SARSr-CoV (edit) non-structural protein 7 [SARS-Cov] (edit) 6
SARSr-CoV (edit) non-structural protein 8 [SARS-Cov] (edit) 6
Human coronavirus OC43 (edit) nucleocapsid protein (edit) 5
SARSr-CoV (edit) non-structural protein 9 [SARS-Cov] (edit) 5
SARSr-CoV (edit) spike protein S2 [SARS-Cov] (edit) 5
SARSr-CoV (edit) non-structural protein 4 [SARS-Cov] (edit) 5
human Coronavirus NL63 (edit) Spike glycoprotein [NL63] (edit) 5
Human coronavirus OC43 (edit) spike surface glycoprotein (edit) 4
Human coronavirus HKU1 (edit) Spike glycoprotein (edit) 3
SARSr-CoV (edit) non-structural protein 6 [SARS-Cov] (edit) 3
SARSr-CoV (edit) non-structural protein 2 [SARS-Cov] (edit) 3
Middle East respiratory syndrome coronavirus (edit) nucleoprotein (edit) 3
SARS-CoV-2 (edit) orf1ab polyprotein [SARS-Cov 2] (edit) 3
Human coronavirus 229E (edit) Non-structural protein 4b (edit) 2
Human coronavirus 229E (edit) Spike glycoprotein (edit) 2
Human coronavirus HKU1 (edit) Replicase polyprotein 1ab (edit) 2
Human coronavirus OC43 (edit) ns12.9 (edit) 2
Human coronavirus OC43 (edit) hemagglutinin-esterase (edit) 2
SARS-CoV-2 (edit) Non-structural protein 11 [SARS CoV-2] (edit) 2
SARS-CoV-2 (edit) ORF9c protein [SARS CoV-2] (edit) 2
human Coronavirus NL63 (edit) Nucleoprotein (edit) 2
Human coronavirus 229E (edit) Non-structural protein 4a (edit) 1
Human coronavirus 229E (edit) Nucleoprotein (edit) 1
Human coronavirus 229E (edit) Replicase polyprotein 1ab (edit) 1
Human coronavirus HKU1 (edit) Spike glycoprotein (edit) 1
Human coronavirus HKU1 (edit) Membrane protein (edit) 1
Human coronavirus OC43 (edit) ns2 (edit) 1
Human coronavirus OC43 (edit) membrane protein (edit) 1
SARSr-CoV (edit) Replicase polyprotein 1a (edit) 1
Middle East respiratory syndrome coronavirus (edit) NS4B protein (edit) 1
SARS-CoV-2 (edit) putative protein ORF3c (edit) 1
human Coronavirus NL63 (edit) Membrane protein (edit) 1

Code examples

curl

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

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

This SPARQL query is available under CCZero.