View source: R/phase_donor_haplotypes.R
phase_donor_haplotypes | R Documentation |
This function infers the diploid donor haplotypes by first calling split_with_overlap
to construct the overlapping SNP segments,
then reconstruct_hap
for majority voting within each overlapping segment,
finally stitching together the overlapping segments to phase both haplotypes using stitch_haplotypes
phase_donor_haplotypes( dt, positions, window_length = 3000, overlap_denom = 2, threads = 2, mcstop = TRUE, stringent_stitch = TRUE, stitch_new_min = 0.5, calculate_window_size_bool = FALSE, cov = NULL, ger = NULL, avgr = NULL )
dt |
Matrix or dataframe of gamete alleles in 0/1/NA encoding |
positions |
vector of SNP positions |
window_length |
An integer; size of window for |
overlap_denom |
An integer; value for denominator in calculation of overlap for |
threads |
An integer; Number of threads to use when calling |
mcstop |
A bool; whether to stop phasing if mean_concordance isn't within advised bounds during stitching in |
stringent_stitch |
A bool; whether or not to use the original bounds (0.1, 0.9 cutoff) in |
stitch_new_min |
A numeric/float, if |
calculate_window_size_bool |
A bool; whether or not to calculate the window size based on characteristics of the input dataset; default = FALSE |
cov |
A numeric; the expected sequencing depth coverage, necessary only if wanting rhapsodi to calculate the preferred window size; default = NULL |
ger |
A numeric; the expected genotyping error rate, necessary only if wanting rhapsodi to calculate the preferred window size; default = NULL |
avgr |
A numeric; the expected average recombination rate, necessary only if wanting rhapsodi to calculate the preferred window size; default = NULL |
complete_haplotypes phased haplotypes as a data frame with column names index, pos (for SNP positions), h1 (haplotype 1), & h2 (haplotype 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.