sim_assess_phasing: This function assesses the effectiveness of rhapsodi's...

View source: R/sim_assess_phasing.R

sim_assess_phasingR Documentation

This function assesses the effectiveness of rhapsodi's diploid donor haplotype phasing

Description

This function compares the simulated truth diploid donor haplotypes to the rhapsodi predicted phased data, producing a named list of values for lhs (largest haplotype segment), ser (switch error rate), acc (accuracy), com (completeness)

Usage

sim_assess_phasing(true_donor_haps, pred_donor_haps, num_snps)

Arguments

true_donor_haps

a data frame of phased donor haplotypes from the generative model with column names of donor1 and donor2

pred_donor_haps

a tibble of phased donor haplotypes from rhapsodi with column names index, pos (for SNP positions), h1 (haplotype 1) & h2 (haplotype 2)

num_snps

the number of SNPs, should be equal to the number of rows of true_donor_haps or pred_donor_haps

Value

assess_phasing a named list with values for acc, com, lhs, & ser


mccoy-lab/rhapsodi documentation built on July 27, 2022, 3:56 a.m.