Description Usage Arguments Details Value Author(s) Examples
View source: R/postFilterVariants.R
Applies filters to a set of called variants. The only current filter
is a cutoff on the weighted neighbor count of each variant. This
filtering is performed automatically by callVariants
, so
these functions are for when more control is desired.
1 2 | postFilterVariants(x, post.filters = VariantPostFilters(...), ...)
VariantPostFilters(max.nbor.count = 0.1, whitelist = NULL)
|
x |
A tally |
post.filters |
The filters applied to the called variants. |
... |
Arguments passed to |
max.nbor.count |
Maximum allowed number of neighbors (weighted by distance) |
whitelist |
Positions to ignore; these will always pass the filter, and are excluded from the neighbor counting. |
The neighbor count is calculated within a 100bp window centered on the variant. Each neighbor is weighted by the inverse square root of the distance to the neighbor. This was motivated by fitting logistic regression models including a term the count (usually 0, 1, 2) at each distance. The inverse square root function best matched the trend in the coefficients.
For postFilterVariants
, a tally GRanges
of the variants that
pass the filters.
For VariantPostFilters
, a FilterRules
object with the filters.
Michael Lawrence and Jeremiah Degenhardt
1 2 3 4 5 6 7 8 9 10 | bams <- LungCancerLines::LungCancerBamFiles()
## post-filters are not enabled by default during calling
data(vignette)
called.variants <- callVariants(tallies_H1993)
## but can be applied at a later time...
postFilterVariants(called.variants, max.nbor.count = 0.15)
# or enable during calling
called.variants <- callVariants(tallies_H1993,
post.filters = VariantPostFilters())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.