region_time_stratified_sample: Select a random sample from aligment stratified through time...

Description Usage Arguments Value

View source: R/sampleSelection.R

Description

Select samples based on quantile of sample time distribution. Requires date to be at and of sequence label. Alternatively can do a simple random sample within a region

Usage

1
2
3
4
5
6
7
8
9
region_time_stratified_sample(
  region_regex,
  n,
  path_to_align,
  D = NULL,
  nregion = NULL,
  path_to_save = NULL,
  time_stratify_region = TRUE
)

Arguments

region_regex

Sample names matching this regular expression will be retained and closest matches also retained

n

sample size from outside region

D

An optional distance matrix between sequences. Can be based on cophenetic distance from ML tree. If not provided will compute using a HKY model (slow!)

nregion

sample size within region; if null will include everything in region

path_to_save

Where to store (as fasta) the filtered alignment

time_stratify_region

If TRUE (default) will perform a time stratified sample within region, otherwise will do a simple random sample

q_threshold

Clock outlier threshold

minEdge

minimum branch length (substitutions per site) to stabilize clock inference

Value

A DNAbin alignment. Will also save to path_to_save


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