SARS-CoV-2-Queries

sarscov2Variants.rq

Code examples: curl

SPARQL

SELECT DISTINCT ?variant ?variantLabel ?pango WHERE {
  VALUES ?variantType { wd:Q15304597 wd:Q75913269 }
  { ?variant p:P31 [ ps:P31 ?variantType ; pq:P642 wd:Q82069695 ] . }
  UNION
  { ?variant wdt:P31 wd:Q104450895 }
  OPTIONAL { ?variant wdt:P9632 ?pango }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}

run or edit

Output

variant pango
SARS-CoV-2 lineage XBB.1 (edit) XBB.1
SARS-CoV-2 Lineage BA.2.75.2 (edit) BA.2.75.2
SARS-CoV-2 Lineage BQ.1.1 (edit) BQ.1.1
SARS-CoV-2 Lineage BA.1.1 (edit) BA.1.1
SARS-CoV-2 Lineage BA.5.2.1 (edit) BA.5.2.1
SARS-CoV-2 Lineage BA.2.75 (edit) BA.2.75
SARS-CoV-2 lineage XBB.1.5 (edit) XBB.1.5
SARS-CoV-2 Lineage BQ.1 (edit) BQ.1
SARS-CoV-2 lineage XD (edit) XD
SARS-CoV-2 Lineage BA.5.2 (edit) BA.5.2
SARS-CoV-2 lineage XBB (edit) XBB
Cluster 5 (edit)
SARS-CoV-2 Lineage BF.7 (edit) BF.7
SARS-CoV-2 Lineage BA.3 (edit) BA.3
SARS-CoV-2 20C clade (edit)
SARS-CoV-2 Delta plus variant (edit) AY.1
SARS-CoV-2 Lineage R.1 (edit) R.1
Deltacron (edit)
SARS-CoV-2 Lineage AZ.5 (edit) AZ.5
SARS-CoV-2 Lineage B.1.214.2 (edit) B.1.214.2
SARS-CoV-2 Beta variant (edit) B.1.351
SARS-CoV-2 Mu variant (edit) B.1.621
Lineage B.1.427 (edit) B.1.427
SARS-CoV-2 Theta variant (edit) P.3
SARS-CoV-2 Iota variant (edit) B.1.526
SARS-CoV-2 Eta variant (edit) B.1.525
SARS-CoV-2 Lineage AY.4.2 (edit) AY.4.2
SARS-CoV-2 lineage B.1.617 (edit) B.1.617
SARS-CoV-2 Lineage BA.2.12 (edit) BA.2.12
SARS-CoV-2 Zeta variant (edit) P.2
SARS-CoV-2 Kappa variant (edit) B.1.617.1
SARS-CoV-2 Lineage BA.1 (edit) BA.1
Lineage B.1.618 (edit) B.1.618
SARS-CoV-2 lineage XF (edit) XF
SARS-CoV-2 Lineage C.36.3 (edit) C.36.3
SARS-CoV-2 Lineage B.1.617.3 (edit) B.1.617.3
SARS-CoV-2 Lineage B.1.630 (edit) B.1.630
SARS-CoV-2 Lineage B.1.466.2 (edit) B.1.466.2
SARS-CoV-2 Lineage B.1.1.519 (edit) B.1.1.519
SARS-CoV-2 Lineage B.1.1.318 (edit) B.1.1.318
SARS-CoV-2 Lambda variant (edit) C.37
SARS-CoV-2 Lineage BA.5 (edit) BA.5
SARS-CoV-2 Lineage C.1.2 (edit) C.1.2
SARS-CoV-2 lineage B.1.640.2 (edit) B.1.640.2
SARS-CoV-2 Lineage B.1.619 (edit) B.1.619
SARS-CoV-2 Lineage BA.4 (edit) BA.4
SARS-CoV-2 Lineage AY.20 (edit) AY.20
SARS-CoV-2 Lineage BA.2 (edit) BA.2
Q109046536 (edit)
SARS-CoV-2 Delta variant (edit) B.1.617.2
Lineage B.1.620 (edit) B.1.620
SARS-CoV-2 lineage B.1.640 (edit) B.1.640
SARS-CoV-2 Lineage AV.1 (edit) AV.1
Lineage B.1.1.7 with E484K (edit)
SARS-CoV-2 Omicron variant (edit) B.1.1.529
SARS-CoV-2 Alpha variant (edit) B.1.1.7
SARS-CoV-2 lineage XE (edit) XE
Lineage B.1.1.207 (edit) B.1.1.207
SARS-CoV-2 Lineage B.1.429 (edit) B.1.429
SARS-CoV-2 Gamma variant (edit) P.1
SARS-CoV-2 Lineage C.36 (edit) C.36
Lineage B.1.616 (edit) B.1.616
SARS-CoV-2 Lineage BA.2.12.1 (edit) BA.2.12.1

Code examples

curl

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

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

This SPARQL query is available under CCZero.