sim_autorun | R Documentation |
First this simulation autorun function calls the generative model producing input data for rhapsodi as well as the true fully known data to be used later in assessment of rhapsodi
Then it calls the rhapsodi autorun function which passes the generated output through the rhapsodi steps, returning rhapsodi's predictions
Then it calls assessment using the function assess_it
to compare the fully known truth/generated data with the rhapsodi predictions.
which first assesses donor haplotypte phasing, producing a named list with single values for lhs (largest haplotype segment), ser (switch error rate), acc (accuracy), com (completeness)
Then second assesses gamete genotype imputation, producing a named list with vectors for lhs (largest haplotype segment), ser (switch error rate), acc (accuracy), com (completeness)
Then third assesses recombination discovery producing a named list with single values for precision, recall, accuracy, specificity, fdr (false discovery rate), fpr (false positive rate) f1 (f1 score),
true_n (number of true recombination breakpoints), pred_n (number of predicted recombination breakpoints), tn (true negative), fn (false negative), tp (true positive), fp (false positive)
Finally, it returns a list of named lists where phasing
contains the phasing assessment named list
gam_imputation
contains the gamete genotype imputation assessment named list
and recomb
contains the recombination breakpoint discovery assessment named list
sim_autorun( num_gametes, num_snps, coverage, recomb_lambda, random_seed = 42, threads = 2, input_cov = TRUE, input_mgr = FALSE, missing_genotype_rate = NULL, add_seq_error = TRUE, seqError_add = 0.005, add_de_novo_mut = FALSE, de_novo_lambda = 5, de_novo_alpha = 7.5, de_novo_beta = 10, cons = FALSE, sampleName = "sim", chrom = "chrS", seqError_model = 0.005, avg_recomb_model = 1, window_length = 3000, overlap_denom = 2, calculate_window_size_bool = FALSE, mcstop = FALSE, stringent_stitch = TRUE, stitch_new_min = 0.5, smooth_imputed_genotypes = FALSE, fill_ends = TRUE, smooth_crossovers = TRUE, verbose = FALSE )
num_gametes |
an integer, the number of gametes, used within |
num_snps |
an integer, the number of SNPs, used within |
coverage |
a numeric, input if |
recomb_lambda |
a numeric, the average rate of recombination expected for the simulation, used by |
random_seed |
an integer, default = 42, the random seed which will be set for the simulation, used within |
threads |
an integer, default = 2, the number of cores to use when we use |
input_cov |
a bool, TRUE if coverage (i.e. like 0.01 (x)) will be input rather than missing genotype rate, default = TRUE, used within |
input_mgr |
a bool, TRUE if missing genotype rate (i.e. like 80 (%) or 0.8) will be input rather than coverage, default = FALSE, used within |
missing_genotype_rate |
a numeric, input if |
add_seq_error |
a bool, TRUE if you want to simulate genotyping error in the generated data, default = TRUE, used within |
seqError_add |
a numeric, default = 0.005, the genotyping error rate if adding genotyping error to the generated data, used by |
add_de_novo_mut |
a bool, TRUE if you want to add de novo mutations to the generated data, default = FALSE, used within |
de_novo_lambda |
an integer, default = 5, parameterizes a poisson distribution to find the number of de novo mutations (DNM) total, used by |
de_novo_alpha |
a numeric, default=7.5, shape parameter for a gamma distribution to find the number of gametes affected per DNM, used by |
de_novo_beta |
a numeric, default = 10, scale parameter for a gamma distribution to find the number of gametes affected per DNM, used by |
cons |
a bool, default = FALSE, If TRUE, compares recombination breakpoints in a conservative manner such that if two ore more true breakpoints intersect a single prediction, we only consider one intersection to be a tp and the rest to be fn. If FALSE, all are tp. Used by |
sampleName |
a string, default = "sim", only used in reporting recombination breakpoints by rhapsodi. Used by |
chrom |
a string, default = "chrS", only used in reporting recombination breakpoints by rhapsodi. Used by |
seqError_model |
a numeric, default = 0.005, used in |
avg_recomb_model |
a numeric, default = 1, used in |
window_length |
an integer, default = 3000, used in |
overlap_denom |
an integer, default = 2, used in |
calculate_window_size_bool |
A bool; used in |
mcstop |
a bool, default = FALSE, used in |
stringent_stitch |
a bool, default = TRUE, used in |
stitch_new_min |
a numeric, >0, < 1, default = 0.5, used in |
smooth_imputed_genotypes |
a bool, default = FALSE, used in |
fill_ends |
a boolean; if TRUE, fills the NAs at the terminal edges of chromosomes with the last known or imputed SNP (for end of chromosome) and the first known or imputed SNP (for beginning of chromosome); if FALSE, leaves these genotypes as NA; default = TRUE |
smooth_crossovers |
a bool, default = TRUE, used in |
verbose |
a bool; default is FALSE; if TRUE, prints progress statements after each step is successfully completed |
all_metrics a named list of named lists with all the assessment metric values or vectors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.