sim.coaltrees: Simulate coalescent trees using ms

View source: R/sim.coaltrees.R

sim.coaltreesR Documentation

Simulate coalescent trees using ms

Description

This function simulates coalescent trees and writes them into a file.

Usage

sim.coaltrees(
  model,
  nsim.blocks,
  use.alpha = F,
  path = getwd(),
  append.sims = F,
  sim.block.size = 1000
)

Arguments

model

A model object bult by the main.menu function.

nsim.blocks

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

use.alpha

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

path

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

append.sims

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

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.

Value

Writes trees 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.


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