run_scrm: Simulate a single population

View source: R/functions_pool.R

run_scrmR Documentation

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)

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.

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.

Examples

run_scrm(nDip = 100, nloci = 10)
run_scrm(nDip = 100, nloci = 10, theta = 5)


poolHelper documentation built on July 9, 2023, 6:23 p.m.