Learn R Programming

poolHelper (version 1.1.0)

run_scrm: Simulate a single population

Description

Simulates the evolution of biological sequences for a single population with variable theta values.

Usage

run_scrm(nDip, nloci, theta = 10)

Value

a list with genotypes. Each entry of the list corresponds to a different locus. For each locus, the genotypes are in a matrix, with each row representing a different individual and each column a different site.

Arguments

nDip

an integer representing the total number of diploid individuals to simulate. Note that scrm::scrm() actually simulates haplotypes, so the number of simulated haplotypes is double of this.

nloci

is an integer that represents how many independent loci should be simulated.

theta

a value for the mutation rate assuming theta = 4Nu, where u is the neutral mutation rate per locus.

Examples

Run this code
run_scrm(nDip = 100, nloci = 10)
run_scrm(nDip = 100, nloci = 10, theta = 5)

Run the code above in your browser using DataLab