haplo.fix: Create invariable sites

View source: R/functions_pool.R

haplo.fixR Documentation

Create invariable sites

Description

This function applies a correction for the situations where scrm::scrm() does not produce a single polymorphic site for a given locus. In this situation, two artificial sites are created at that locus. All individuals are assumed to be homozygous for the reference allele at those sites.

Usage

haplo.fix(haplotypes, nHap)

Arguments

haplotypes

a list of haplotypes obtained from the simulations done with scrm::scrm(). Each entry of the list is a matrix that corresponds to a given locus. At each matrix, each column is a different site and each row is a different haplotype.

nHap

an integer representing the total number of haplotypes simulated.

Value

a list of haplotypes identical to haplotypes, but without empty loci.


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