R/lookupSublineages.R
lookupSublineages.Rd
Retrieve all sublineages of a given Pango lineage or WHO designation. Based on a phylogeny maintained by the [Pango team](https://github.com/cov-lineages/lineages-website/blob/master/data/lineages.yml) to grab all sublineages associated with a lineage, and a curated list of Variants of Concern, Variants of Interest, Variants Under Monitoring, and de-escalated variants maintained by the [outbreak.info team](https://outbreak.info/situation-reports)
lookupSublineages(lineage, returnQueryString = FALSE)
String with the name of a Pango lineage or WHO name
Boolean to return a query string to be piped into functions like getPrevalence (collapses vector by `"OR"`)
list containing the sublineages associated with that lineage or WHO designation
# WHO-designated lineages
lookupSublineages("epsilon")
#> [1] "B.1.427" "B.1.429" "B.1.429.1"
lookupSublineages("epsilon", returnQueryString = TRUE)
#> [1] "B.1.427 OR B.1.429 OR B.1.429.1"
# Pango lineage
lookupSublineages("B.1.1.7")
#> [1] "B.1.1.7" "Q.1" "Q.2" "Q.3" "Q.4" "Q.5" "Q.6"
#> [8] "Q.7" "Q.8"
#' # Not a recognized lineage
lookupSublineages("VOC-21APR-02")
#> Warning: Lineage VOC-21APR-02 not recognized as a Pango lineage
#> Error in invokeRestart("muffleWarning"): no 'restart' 'muffleWarning' found