discover_meiotic_recombination: A function to drive and report meiotic recombination...

View source: R/discover_meiotic_recombination.R

discover_meiotic_recombinationR Documentation

A function to drive and report meiotic recombination breakpoint finding

Description

This function takes as input two booleans controlling whether the gamete haplotypes and genotypes remain smoothed before crossover discovery (directly from HMM) or unsmoothed (replacing inferred HMM state with the original reads if they disagree) Then the function runs recombination finding It offers the option to avoid oversmoothing by superimposing initial haplotype assignments over each gamete. For example, if an allele assigned to h1 was changed by the model to h2, the early functions can fill the NAs to h2, but then un-smoothing will replace the singular h1 at the correct allele. This singular h1 could be an example of gene conversion or non-crossover.

Usage

discover_meiotic_recombination(
  original_gamete_data,
  complete_haplotypes,
  filled_gamete_data_list,
  positions,
  smooth_crossovers = TRUE,
  smooth_imputed_genotypes = FALSE,
  sampleName = "sampleT",
  chrom = "chrT",
  threads = 2
)

Arguments

original_gamete_data

original sparse gamete data matrix

complete_haplotypes

dataframe of phased diploid donor genotypes in two columns, each column corresponding with a haplotype from the donor

filled_gamete_data_list

the output list from impute_gamete_genotypes which contains each gamete data matrix with haplotype info from the HMM and fill_NA functions

positions

the genomic positions corresponding to SNP indices

smooth_crossovers

boolean, default is TRUE, whether to use smoothed data for recombination finding. If TRUE, doesn't replace with original reads

smooth_imputed_genotypes

boolean, default is FALSE, whether to use smoothed data for ending genotypes. If TRUE, doesn't replace with original reads

sampleName

sample name of sample given to rhapsodi, default is "sampleT"

chrom

chromosome of sample given to rhapsodi, default is "chromT"

threads

an integer, default = 2, the number of cores to use when we use mclapply or the like

Value

recomb_breaks a dataframe, specifying the predicted recombination breakpoints for each gamete


mccoy-lab/rhapsodi documentation built on July 27, 2022, 3:56 a.m.