View source: R/sim_assess_it.R
sim_assess_it | R Documentation |
This function drives all 3 steps of assessment in comparing the simulated full truth data with the rhapsodi predicted data
First it 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 it assesses gamete genotype imputation, producing a named list with vectors for lhs (largest haplotype segment), ser (switch error rate), acc (accuracy), com (completeness)
Then it 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_assess_it( true_donor_haps, pred_donor_haps, true_recomb, pred_recomb, true_gam, pred_gam, cons = FALSE, verbose = FALSE )
true_donor_haps |
a data frame of phased donor haplotypeps from the generative model with column names of |
pred_donor_haps |
a tibble of phased donor haplotypes from rhapsodi with column names |
true_recomb |
a data.table data table containing the true recombination breakpoints from the generative model with columns |
pred_recomb |
a tibble containing the predicted recombination breakpoints from rhapsodi with columns |
true_gam |
a matrix, from the output of the generative model, the true/full gamete genotypes where the rows are the SNPs and the columns are the gametes (except for the first column which is the SNP genomic positions) |
pred_gam |
a matrix, from the output of rhapsodi, the predicted/filled gamete genotypes where the rows are the SNPs and the columns are the gametes |
cons |
a bool; default=FALSE, If TRUE, compares recombination breakpoints in a conservative manner such that if two or more true breakpoints intersect a single predicted breakpoint, we only consider one intersection to be a tp and the rest to be fn. |
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.