sim.ms.sumstat: Simulate summary statistics using ms and PopGenome

View source: R/sim.sumstat.R

sim.ms.sumstatR Documentation

Simulate summary statistics using ms and PopGenome

Description

Simulate summary statistics using ms and PopGenome

Usage

sim.ms.sumstat(
  model,
  use.alpha = F,
  nsim.blocks = 1,
  sim.block.size = 1000,
  path = getwd(),
  perpop.SS = T,
  overall.SS = T,
  output.name = "model",
  get.moments = F,
  append.sims = F
)

Arguments

model

A model object bult by the main.menu function.

use.alpha

Logical.If TRUE the most recent population size change will be exponential. If FALSE sudden demographic changes. Default is FALSE.

nsim.blocks

Number of blocks to simulate. The total number of simulations is: nsim.blocks x sim.block.size.

sim.block.size

Simulations are performed in blocks. This argument defines the size of the block in number of simulations, i.e. how many simulations to run per block. A block of 1000 will work for most cases. Increse the total number of simulations with nsim.block argument.

path

Path to write the output. By default outputs will be saved in the working directory.

perpop.SS

Logical. If TRUE calculates the summary statistics per population. Default is TRUE.

overall.SS

Logical. If TRUE calculates the summary statistics across all your populations. Defaut is FALSE.

output.name

String. The prefix of the output names. Defalt is "model"

get.moments

Logical. If TRUE computes the four moments (mean, variance, kurtosis, skewness) of each summary statistics across loci. If False only mean is computed. Defalt is FALSE.

append.sims

Logical. If TRUE simulations will be appended in the last output. Default is FALSE.

Value

Writes simulations and parameters to the path directory.

Author(s)

Marcelo Gehara

References

Hudson R.R. (2002) Generating samples under a Wright-Fisher neutral model of genetic variation. Bioinformatics, 18, 337–338.

Pfeifer, B. et al. (2014) PopGenome: An Efficient Swiss Army Knife for Population Genomic Analyses in R. Mol Biol Evol 31(7): 1929-1936.<doi:10.1093/molbev/msu136>


gehara/PipeMaster documentation built on April 19, 2024, 8:14 a.m.