sweep_times: Find generations at which sweeps (or at least partial sweeps)...

Description Usage Arguments Value Examples

View source: R/sweepmetrics.R

Description

Find generations at which sweeps (or at least partial sweeps) occurred

Usage

1
sweep_times(phylo, threshold, min_pop = 0)

Arguments

phylo

Dataframe containing phylogeny

threshold

Number between 0 and 1; a genotype must exceed this frequency to be considered dominant

min_pop

Genotypes with populations smaller than this size will be removed before analysis (default 0)

Value

Vector of generations at which (partial) sweeps occurred.

Examples

1
2
3
library(dplyr)
phylo <- filter(driver_phylo, CellsPerSample == -1)
sweep_times(phylo, threshold = 0.1)

robjohnnoble/demonanalysis documentation built on June 30, 2020, 12:47 a.m.