View source: R/impute_gamete_genotypes.R
impute_gamete_genotypes | R Documentation |
This function builds and applies a hidden Markov model to categorize each allele on each gamete.
It then fills the positions missing data with the nearest haplotype assignment.
If the user asks for unsmoothed genotypes (i.e. replacing original sequencing reads where HMM imputation disagrees with these original reads) by setting smooth_imputed_genotypes
to FALSE
then the unsmooth function is called to replace imputed genotypes with original sequencing reads, but both unsmoothed and smoothed are reported.
impute_gamete_genotypes( original_gamete_data, complete_haplotypes, positions, genotyping_error = 0.005, avg_recomb = 1, smooth_imputed_genotypes = FALSE, fill_ends = TRUE, threads = 2 )
original_gamete_data |
original matrix of gametes |
complete_haplotypes |
Inferred parental haplotypes |
positions |
vector of SNP position |
genotyping_error |
User-input for expected error in genotyping (default = 0.005) |
avg_recomb |
User-input for average recombination rate that can be expected for a chromosome (default=1) |
smooth_imputed_genotypes |
a bool, default is FALSE, whether to use smoothed data for ending genotypes. If |
fill_ends |
a boolean; if TRUE, fills the NAs at the terminal edges of chromosomes with the last known or imputed SNP (for end of chromosome) and the first known or imputed SNP (for beginning of chromosome); if FALSE, leaves these genotypes as NA; default = TRUE |
threads |
User-input value for calling |
gamete_data a named list with four data frames (names filled_gametes, unsmoothed_gametes, filled_gametes_haps, and unsmoothed_gametes_haps) resulting from the HMM, fill_NAs, and potentially the unsmooth functions, returning the imputed donor 0/1 encoded genotypes (outputs without _haps in the name) and haplotypes (outputs with _haps in the name) for each gamete. In the filled_gametes outputs, the dataframe represents the direct output. In the unsmoothed_gametes outputs, if smooth_imputed_genotypes
is TRUE, these are NULL; if FALSE, original sequencing reads replace imputed genotypes if they disagree
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.