hap2geno: Convert haplotypes to genotypes

View source: R/functions_pool.R

hap2genoR Documentation

Convert haplotypes to genotypes

Description

This function converts haplotypes simulated with scrm::scrm() into genotypes by adding the entries on one row with the entries of the subsequent row.

Usage

hap2geno(haplo)

Arguments

haplo

a matrix of haplotypes obtained from the simulations done with scrm::scrm(). Each column of the matrix is a different site and each row is a different haplotype.

Value

a matrix of genotypes with half the rows of the haplo matrix. Each column of this matrix is a different site and each row is a different genotype.


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