SARS-CoV-2-Queries

humanInteractionCounts.rq

Code examples: curl

SPARQL

SELECT ?virus ?virusLabel ?gene ?geneLabel ?count WITH {
  SELECT ?virus ?gene (COUNT(DISTINCT ?work) AS ?count) WHERE {
    ?virus wdt:P171+ wd:Q57751738 .
    ?work wdt:P921 ?virus, ?gene .
    ?gene wdt:P703 wd:Q15978631 .
    { ?gene wdt:P31 wd:Q7187 } UNION { ?gene wdt:P31 wd:Q8054 }
  } GROUP BY ?virus ?gene
} AS %ARTICLES WHERE {
  INCLUDE %ARTICLES
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}
ORDER BY DESC(?count) ?virus ?gene

run or edit

Output

virus gene count
SARS-CoV-2 (edit) angiotensin I converting enzyme 2 (edit) 24
SARS-CoV-2 (edit) Transmembrane serine protease 2 (edit) 9
SARS-CoV-1 (edit) angiotensin I converting enzyme 2 (edit) 7
SARS-CoV-1 (edit) Transmembrane serine protease 2 (edit) 4
SARSr-CoV (edit) angiotensin I converting enzyme 2 (edit) 3
SARS-CoV-2 (edit) Furin, paired basic amino acid cleaving enzyme (edit) 3
Betacoronavirus (edit) angiotensin I converting enzyme 2 (edit) 2
Middle East respiratory syndrome coronavirus (edit) Dipeptidyl peptidase 4 (edit) 2
SARS-CoV-2 (edit) ACE2 (edit) 2
SARS-CoV-2 (edit) TMPRSS2 (edit) 2
Betacoronavirus (edit) C-reactive protein (edit) 1
Human coronavirus 229E (edit) TMPRSS2 (edit) 1
Human coronavirus 229E (edit) Transmembrane serine protease 2 (edit) 1
Human coronavirus 229E (edit) peptidylprolyl isomerase A (edit) 1
Human coronavirus 229E (edit) Alanyl aminopeptidase, membrane (edit) 1
Human coronavirus 229E (edit) angiotensin I converting enzyme 2 (edit) 1
SARSr-CoV (edit) MASP2 (edit) 1
SARSr-CoV (edit) TNF (edit) 1
SARSr-CoV (edit) Interferon induced transmembrane protein 3 (edit) 1
SARSr-CoV (edit) Interferon induced transmembrane protein 2 (edit) 1
SARSr-CoV (edit) Interferon induced transmembrane protein 1 (edit) 1
Middle East respiratory syndrome coronavirus (edit) Transmembrane serine protease 2 (edit) 1
SARS-CoV-2 (edit) IL6 (edit) 1
SARS-CoV-2 (edit) HLA-E (edit) 1
SARS-CoV-2 (edit) BSG (edit) 1
SARS-CoV-2 (edit) FURIN (edit) 1
SARS-CoV-2 (edit) MX1 (edit) 1
SARS-CoV-2 (edit) IGHV3-53 (edit) 1
SARS-CoV-2 (edit) TRBV11-2 (edit) 1
SARS-CoV-2 (edit) PIKFYVE (edit) 1
SARS-CoV-2 (edit) thioredoxin reductase 1 (edit) 1
SARS-CoV-2 (edit) CCHC-type zinc finger nucleic acid binding protein (edit) 1
SARS-CoV-2 (edit) transmembrane serine protease 4 (edit) 1
SARS-CoV-2 (edit) Transmembrane protein 41B (edit) 1
SARS-CoV-2 (edit) Translocase of outer mitochondrial membrane 70 (edit) 1
SARS-CoV-2 (edit) Von Willebrand factor (edit) 1
SARS-CoV-2 (edit) ADAM metallopeptidase with thrombospondin type 1 motif 13 (edit) 1
SARS-CoV-2 (edit) heme oxygenase 1 (edit) 1
human Coronavirus NL63 (edit) angiotensin I converting enzyme 2 (edit) 1
SARS-CoV-1 (edit) MASP2 (edit) 1
SARS-CoV-1 (edit) TNF (edit) 1
SARS-CoV-1 (edit) C-type lectin domain family 4 member G (edit) 1
SARS-CoV-1 (edit) C-type lectin domain family 4 member M (edit) 1
SARS-CoV-1 (edit) Hepsin (edit) 1
SARS-CoV-1 (edit) Transmembrane serine protease 11D (edit) 1
SARS-CoV-1 (edit) Interferon induced transmembrane protein 3 (edit) 1
SARS-CoV-1 (edit) Interferon induced transmembrane protein 2 (edit) 1
SARS-CoV-1 (edit) Interferon induced transmembrane protein 1 (edit) 1
SARS-CoV-1 (edit) BCL2 like 1 (edit) 1
SARS-CoV-1 (edit) ADAM metallopeptidase domain 17 (edit) 1
SARS-CoV-1 (edit) BCL2 associated X, apoptosis regulator (edit) 1

Code examples

curl

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

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

This SPARQL query is available under CCZero.