View source: R/reconstruct_hap.R
reconstruct_hap | R Documentation |
This function takes gamete data and computes and clusters a distance matrix with a binary method. It anticipates sparse data and replaces NAs with 0.5. It clusters the tree into two groups, i.e., haplotypes. It then categorizes the gamete cells falling into each of the two groups. It reconstructs the original haplotypes by majority vote after inverting the opposite haplotype.
reconstruct_hap(input_dt, input_positions, window_indices)
input_dt |
A dataframe of sparse gamete data coded with reference and alt alleles (i.e., 0, 1, or NA) |
input_positions |
vector of SNP positions |
window_indices |
A window of the gamete data (using segments generated from |
inferred_output A tibble with the inferred haplotype sorted by position and window
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.