coalescent_starting_variation: simulate starting variation for the simulation

Description Usage Arguments

View source: R/macs-interface.R

Description

This is a high-level wrapper that calls macs_command_line and read_macs_output and returns a bunch of biallelic genotypes that one can then use however they want to initialize the forward in time simulation. The parameterization here is built for convenience, for people that don't like thinking about scaling things in coalescent time too much. Basically you tell it the length of the sequence in base pairs and the desired number of SNPs. It assumes by default that recombination rate is 1 cM per megabase. You set the effective size so that we can scale things as necessary by 4Ne.

Usage

1
2
coalescent_starting_variation(n = 100, bp = 1e+06, rho = 1, Ne = 10000,
  S = 1000, h = 100)

Arguments

n

the number of sequences (2 times the number of diploid individuals you will want)

bp

the number of base pairs in length of the segment to simulate

rho

number of centiMorgans per megabase. Default is 1. (Note, we can change this in the future to give ourselves recombination rate variation.)

Ne

the coalescent effective size of the population over its coalescent history.

S

the desired expected number of segregating sites. We will set theta to shoot for this. Note that doing so we can have high recombination across an entire chromosome, but simulate getting SNPs from only a fraction of the total area of the chromosome.

h

how many base pairs back to extend the Markovian approximation using macs


eriqande/gids documentation built on May 13, 2017, 8:21 p.m.