exog_sampler1: Sample exogenous sequence IDs using a time stratified design...

Description Usage Arguments Examples

View source: R/sampleSelection1.R

Description

Sample exogenous sequence IDs using a time stratified design and including close genetic distance to a regional sample

Usage

1
exog_sampler1(md, n, D, region_sample, exclusion_rules = list(), dedup = TRUE)

Arguments

md

data frame with gisaid metadata

n

sample size

D

distance matrix between sequences

region_sample

vector of sequence IDs from region

exclusion_rules

Optional list of rules of the form c( <meta data column> , <regular expression> ). Where this pattern matches, a sequence will not be included in the sample

dedup

If TRUE will not include identical sequences

Examples

1
2
3
4
5
6
7
8
## Not run: 
#This will get a sample from King County in Washington and exclude sequences labelled Washington from the exog sample, since we aren't sure if they are from King County or not
ipatt = '^KingCounty$'
epatt = '.*Washington.*'
regiontips = region_sampler1( md, n = 10  , inclusion_rules = list( c('CityOrCounty', ipatt) ))
exogtips = exog_sampler1( md, 20, D, s, exclusion_rules = list( c('CityOrCounty', epatt) )  )

## End(Not run)

emvolz-phylodynamics/sarscov2Rutils documentation built on Nov. 17, 2020, 9:22 a.m.