sample_offspring {simDNAmixtures} | R Documentation |
Sample offspring from two parental genotypes
Description
Sample offspring from two parental genotypes
Usage
sample_offspring(father, mother, label = "Child")
Arguments
father |
DataFrame (see sample_genotype) |
mother |
DataFrame (see sample_genotype) |
label |
SampleName of child (character) |
Details
A genotype is sampled according to Mendelian inheritance. That is, one of two alleles of a parent is passed down to the offspring.
Value
DataFrame (see sample_genotype)
Examples
# below we read an allele freqs and sample a genotype
filename <- system.file("extdata","FBI_extended_Cauc.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)
[Package simDNAmixtures version 1.0.1 Index]