nofilter_and_optimize.RegressHaplo: Generate consistent haplotypes for a read table and applies a...

View source: R/RegressHaplo_util.R

nofilter_and_optimize.RegressHaploR Documentation

Generate consistent haplotypes for a read table and applies a RegressHaplo optimization.

Description

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

Usage

nofilter_and_optimize.RegressHaplo(df, rho, max_dim = 1200, min_cover = 500)

Arguments

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

Details

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.

Value

#' @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.


SLeviyang/RegressHaplo documentation built on June 1, 2022, 10:48 p.m.