Learn R Programming

VariantTools (version 1.14.1)

qaVariants: QA Filtering of Variants

Description

Filters a tally GRanges through a series of simple checks for strand and read position (read position) biases.

Usage

qaVariants(x, qa.filters = VariantQAFilters(...), ...) VariantQAFilters(fisher.strand.p.value = 1e-4, min.mdfne = 10L)

Arguments

x
A tally GRanges as output by tallyVariants.
qa.filters
The filters used for the QA process, typically constructed with VariantQAFilters, see arguments below.
...
Arguments passed to VariantQAFilters, listed below.
fisher.strand.p.value
p-value cutoff for the Fisher's Exact Test for strand bias (+/- counts, alt vs. ref). Any variants with p-values below this cutoff are discarded.
min.mdfne
Minimum allowed median distance of alt calls from their nearest end of the read.

Value

For qaVariants, a tally GRanges of the variants that pass the QA checks.For VariantQAFilters, a FilterRules object with the QA and sanity filters.

Details

There are currently two QA filters:
  • Median distance of alt calls from nearest end of the read is required to be >= min.mdfne, which defaults to 10.
  • Fisher's Exact Test for strand bias, using the +/- counts, alt vs. ref. If the null is rejected, the variant is discarded.

Examples

Run this code
bams <- LungCancerLines::LungCancerBamFiles()
tally.param <- TallyVariantsParam(gmapR::TP53Genome(), 
                                  high_base_quality = 23L,
                                  which = gmapR::TP53Which())
tally.variants <- tallyVariants(bams$H1993, tally.param)
qaVariants(tally.variants, fisher.strand.p.value = 1e-4)

Run the code above in your browser using DataLab