rf_snp_filter: Remove markers that do not meet a LOD criteria

View source: R/filters.R

rf_snp_filterR Documentation

Remove markers that do not meet a LOD criteria

Description

Remove markers that do not meet a LOD and recombination fraction criteria for at least a percentage of the pairwise marker combinations. It also removes markers with strong evidence of linkage across the whole linkage group (false positive).

Usage

rf_snp_filter(
  input.twopt,
  thresh.LOD.ph = 5,
  thresh.LOD.rf = 5,
  thresh.rf = 0.15,
  probs = c(0.05, 1),
  diag.markers = NULL,
  mrk.order = NULL,
  ncpus = 1L,
  diagnostic.plot = TRUE,
  breaks = 100
)

Arguments

input.twopt

an object of class mappoly.twopt

thresh.LOD.ph

LOD score threshold for linkage phase configuration (default = 5)

thresh.LOD.rf

LOD score threshold for recombination fraction (default = 5)

thresh.rf

threshold for recombination fractions (default = 0.15)

probs

indicates the probability corresponding to the filtering quantiles. (default = c(0.05, 1))

diag.markers

A window where marker pairs should be considered. If NULL (default), all markers are considered.

mrk.order

marker order. Only has effect if 'diag.markers' is not NULL

ncpus

number of parallel processes (i.e. cores) to spawn (default = 1)

diagnostic.plot

if TRUE produces a diagnostic plot

breaks

number of cells for the histogram

Details

thresh.LOD.ph should be set in order to only select recombination fractions that have LOD scores associated to the linkage phase configuration higher than thresh_LOD_ph when compared to the second most likely linkage phase configuration. That action usually eliminates markers that are unlinked to the set of analyzed markers.

Value

A filtered object of class mappoly.sequence. See make_seq_mappoly for details

Author(s)

Marcelo Mollinari, mmollin@ncsu.edu with updates by Gabriel Gesteira, gdesiqu@ncsu.edu

References

Mollinari, M., and Garcia, A. A. F. (2019) Linkage analysis and haplotype phasing in experimental autopolyploid populations with high ploidy level using hidden Markov models, _G3: Genes, Genomes, Genetics_. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1534/g3.119.400378")}

Examples

    all.mrk <- make_seq_mappoly(hexafake, 1:20)
    red.mrk <- elim_redundant(all.mrk)
    unique.mrks <- make_seq_mappoly(red.mrk)
    all.pairs <- est_pairwise_rf(input.seq = unique.mrks,
                               ncpus = 1,
                               verbose = TRUE)

    ## Full recombination fraction matrix
    mat.full <- rf_list_to_matrix(input.twopt = all.pairs)
    plot(mat.full)

    ## Removing disruptive SNPs
    tpt.filt <- rf_snp_filter(all.pairs, 2, 2, 0.07, probs = c(0.15, 1))
    p1.filt <- make_pairs_mappoly(input.seq = tpt.filt, input.twopt = all.pairs)
    m1.filt <- rf_list_to_matrix(input.twopt = p1.filt)
    plot(mat.full, main.text = "LG1")
    plot(m1.filt, main.text = "LG1.filt")


mmollina/MAPPoly documentation built on March 8, 2024, 2:04 a.m.