sim_proc_many_pops: Simulate and process many populations

Description Usage Arguments Value

View source: R/sim_proc_many_pops.R

Description

Simulate and process many populations

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sim_proc_many_pops(
  arg_collection,
  n_sims = 1,
  output_dmat = FALSE,
  max_dmat_size = 10000,
  fitness_processing = "none",
  n_gen_with_perfect_fitness = 4,
  output_genealogy = "none",
  verbose = FALSE
)

Arguments

arg_collection

The collection of argument sets to be used in the simulations

n_sims

The number of times sim_pop must be called for each arg_set. The total number of data sets produced will be n_sims * length(arg_collection) if no fitness processing is specified and n_sims * length(arg_collection) * 2 if any fitness processing is specified.

output_dmat

If TRUE, the distance matrices will be included in the output. Uses lots of memory - default is FALSE.

max_dmat_size

If more sequences than this number is present in a last generation on which a distance matrix is about to be computed, then max_dmat_size sequences will be randomly sampled and the distance matrix will only be computed on those sequences. Default is 10000.

fitness_processing

The way that the fitness scores should be used to sample from the genealogy. Valid options include:

  • none: This will produce one dataset per genealogy.

  • fit_unfit_pair: This will use the threshold approach to remove all unfit individuals and their offspring. The remaining members of the last generation will be considered to be the fit member of the pair. An equal number of individuals will be sampled at random from the original genealogy to produce the unfit pair such that it is the same size as the fit pair.

  • fit_unfit_unmatched_pair: Same as fit_unfit_pair except that the unfit member will not be down sampled to size match the fit member.

n_gen_with_perfect_fitness

The number of initial generations that must be assigned perfect fitness. If an early ancestor has low fitness and is thus removed, the likelihood that the end up with an empty genealogy is too large.

output_genealogy

Should the genealogy be output? Valid options include: 'none', 'last_gen_only', and 'full'.

verbose

If TRUE, progress is printed to STDOUT.

Value

A list with the following elements:


philliplab/yasss documentation built on Sept. 7, 2020, 3:28 p.m.