View source: R/RegressHaplo_util.R
nofilter_and_optimize.RegressHaplo | R Documentation |
Generates consistent haplotypes across loci, with no filtering as compared to filter_and_compute.RegressHaplo, and then if dimension is small enough applies RegressHaplo algorithm
nofilter_and_optimize.RegressHaplo(df, rho, max_dim = 1200, min_cover = 500)
df |
read table |
rho |
The rho that should be used. |
max_dim |
The maximum number of haplotypes that can be filtered |
min_cover |
The minimum read coverage needed to link across a read table position |
Haplotypes are generated by splitting the read table positions into loci and then creating global haplotypes by considering all possible local haplotype combinations. If the number of consistent haplotypes < max_dim, RegressHaplo is applied.
To run an optimization, run_optimization must be TRUE and a global_rho must be provided.
#' @return A list constaining the elements df, pi, fit, and h. df is simply the read_table returned. h are the global consistent haplotypes generated after filtering; h is a character matrix with colnames giving positions. pi and fit are NA if the optimization is not run, otherwhise pi is a vector of frequencies with length equal to the number of haplotypes (nrow(h)) and fit is a scalar describing the fit of the solution.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.