View source: R/get_pair_types.R
get_pair_types | R Documentation |
Get data frame of inter- and intra-facility pariwise SNV distances
get_pair_types(dists, locs, pt)
dists |
a SNV distance matrix returned by the dist.dna function from the ape package |
locs |
a named vector of locations of isolates (e.g. facility of isolation), with the name being the sample ID |
pt |
a named vector of patients each isolate originated from, with the name being the sample ID. If this information is unavailable, set pt = NULL. |
a data.frame of isolate pairs, their SNV distance, and labeled as either inter- or intra-facility pairs.
## Not run: locs <- metadata %>% dplyr::select(isolate_id, facility) %>% tibble::deframe() pt <- metadata %>% dplyr::select(isolate_id, patient_id) %>% tibble::deframe() pair_types <- get_pair_types(dists, locs, pt) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.