GetGenotypes {poolHelper} | R Documentation |
Create genotypes from a output with haplotypes
Description
This function applies the hap2geno
function to all entries of a
list. Each entry of that list is a different locus simulated with
scrm::scrm()
. Thus, this function converts the haplotypes of all simulated
loci into genotypes.
Usage
GetGenotypes(haplotypes, nDip)
Arguments
haplotypes |
a list of haplotypes obtained from the simulations done
with |
nDip |
an integer representing the total number of diploid individuals to simulate. Note that this is the total number of diploid individuals and not the number of individuals per population. |
Value
a list of genotypes. Each entry of the list is a matrix corresponding to a different locus. locus. At each matrix, each column is a different site and each row is a different genotype