Sample offspring from two parental genotypes
sample_offspring.Rd
Sample offspring from two parental genotypes
Arguments
- father
DataFrame (see sample_genotype)
- mother
DataFrame (see sample_genotype)
- label
SampleName of child (character)
Value
DataFrame (see sample_genotype)
Details
A genotype is sampled according to Mendelian inheritance. That is, one of two alleles of a parent is passed down to the offspring.
Examples
# below we read an allele freqs and sample a genotype
filename <- system.file("extdata","FBI_extended_Cauc_022024.csv",
package = "simDNAmixtures")
freqs <- read_allele_freqs(filename)
# sample parents
father <- sample_genotype(freqs, loci = c("D3S1358", "vWA"))
mother <- sample_genotype(freqs, loci = c("D3S1358", "vWA"))
# sample child
child <- sample_offspring(father, mother)