sample_mixture_from_genotypes {simDNAmixtures} | R Documentation |
Sample mixture profile with provided genotypes
Description
Sample mixture profile with provided genotypes
Usage
sample_mixture_from_genotypes(genotypes, model, sample_name = "mixture")
Arguments
genotypes |
List of contributor genotypes. See sample_contributor_genotypes. |
model |
pg_model object. |
sample_name |
Character. Defaults to "mixture". |
Details
A mixture profile is sampled according to the provided pg_model
(see gamma_model, log_normal_model and genotypes (see sample_contributor_genotypes).
Value
DataFrame with at least SMASH columns (see SMASH_to_wide_table). Depending on the chosen pg_model
(e.g. gamma_model or log_normal_model), other columns with further details about the simulation are returned as well.
See Also
sample_mixtures for a function that samples many mixtures in one go.
Examples
# read allele frequencies and kit data
freqs <- read_allele_freqs(system.file("extdata","FBI_extended_Cauc.csv",
package = "simDNAmixtures"))
data(gf)
# define a pedigree of siblings S1 and S2 (and their parents)
ped_sibs <- pedtools::nuclearPed(children = c("S1", "S2"))
# sample genotypes for a mixture of S1 + U1 + S2
# where U1 is an unrelated person
genotypes <- sample_contributor_genotypes(contributors = c("S1","U1","S2"),
freqs, ped_sibs, loci = gf$autosomal_markers)
# define a gamma model for peak heights
gamma_model <- gamma_model(mixture_proportions = c(0.5, 0.3, 0.2), mu = 1000.,
cv = 0.1, model_settings = gf$gamma_settings_no_stutter)
# sample mixture from genotypes
mix <- sample_mixture_from_genotypes(genotypes, gamma_model)
[Package simDNAmixtures version 1.0.1 Index]