permuteAllelesInHaplosNum: Haplotypes

View source: R/quantgen.R

permuteAllelesInHaplosNumR Documentation

Haplotypes

Description

Permute alleles in haplotypes. In the scrm package, haplotypes are made of 0's and 1's, the former indicating ancestral alleles and the latter derived alleles. However, when one wants to simulate realistic data, one often converts haplotypes into genotypes encoded as allele dose. At this step, one may not want to always count the number of copies of the derived allele. It hence is useful to permute alleles beforehand.

Usage

permuteAllelesInHaplosNum(haplos, snps.toperm, verbose = 0)

Arguments

haplos

list of haplotypes returned by scrm, each component of which corresponds to a matrix with haplotypes in rows and SNP in columns

snps.toperm

vector of SNP identifiers corresponding to the SNPs to which allele permutation will be performed (column names of haplos)

verbose

verbosity level (0/1)

Value

list of haplotypes

Author(s)

Timothee Flutre

See Also

simulCoalescent, segSites2allDoses, haplosAlleles2num


timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.