sample_pedigree_genotypes {simDNAmixtures} | R Documentation |
Sample genotypes for pedigree according to allele frequencies by allele dropping.
Description
Sample genotypes for pedigree according to allele frequencies by allele dropping.
Usage
sample_pedigree_genotypes(pedigree, freqs, loci = names(freqs))
Arguments
pedigree |
ped object |
freqs |
Allele frequencies (see read_allele_freqs) |
loci |
Character vector of locus names (defaults to |
Details
For each founder, a genotype is sampled randomly by drawing two alleles according to allele frequencies. Alleles for the rest of the pedigree are then obtained by allele dropping: sample_offspring is invoked for each non-founder.
Value
List of DataFrames with genotypes for each pedigree member. See sample_genotype for the DataFrame format.
Examples
freqs <- read_allele_freqs(system.file("extdata","FBI_extended_Cauc.csv",
package = "simDNAmixtures"))
data(gf)
ped_sibs <- pedtools::nuclearPed(children = c("S1", "S2"))
sibs_genotypes <- sample_pedigree_genotypes(ped = ped_sibs,
freqs = freqs, loci = gf$autosomal_markers)
[Package simDNAmixtures version 1.0.1 Index]