sample_mixtures_fixed_parameters {simDNAmixtures} | R Documentation |
Sample mixtures with known genotypes and fixed parameters
Description
Sample mixtures with known genotypes and fixed parameters
Usage
sample_mixtures_fixed_parameters(
genotypes,
parameter_summary,
model_settings,
results_directory,
seed,
tag = "simulation",
silent = FALSE
)
Arguments
genotypes |
List of contributor genotypes. See sample_contributor_genotypes. |
parameter_summary |
DataFrame with parameters for each sample. |
model_settings |
List. Passed to the sample_model function. |
results_directory |
(optionally) Character with path to directory where results are written to disk. |
seed |
(optionally) Integer seed value that can be used to get reproducible runs. If results are written to disk, the 'Run details.txt' file will contain a seed that can be used for reproducing the result. |
tag |
Character. Used for sub directory name when results_directory is provided. |
silent |
Logical. If TRUE, then no message will be printed about where the output (if any) was written to disk. |
Value
If results_directory
is provided, this function has the side effect of writing results to disk.
Return value is a list with simulation results:
-
call
matched call -
smash
DataFrame with all samples in SMASH format (see SMASH_to_wide_table) -
samples
Detailed results for each sample -
parameter_summary
DataFrame with parameters for each sample
See Also
Examples
# simulate autosomal samples with fixed parameters (from csv) and refs (from csv)
parameter_summary <- utils::read.csv(system.file(
"extdata","Example_2p_Parameter_Summary.csv",
package = "simDNAmixtures"))
gf <- gf_configuration()
filename_refs <- system.file("extdata","Example_References_DB.csv",
package = "simDNAmixtures")
db_refs <- utils::read.csv(filename_refs, check.names = FALSE)
genotypes <- simDNAmixtures:::.wide_references_to_allele_tables(db_refs)
samples <- sample_mixtures_fixed_parameters(genotypes = genotypes,
parameter_summary = parameter_summary,
model_settings = gf$log_normal_bwfw_settings,
seed = 1)