Filter differential methylation results by significance thresholds
Source:R/results_methods.R
filterResults.RdA convenience wrapper around results that filters sites by
adjusted p-value and absolute effect size.
Usage
filterResults(object, ...)
# S4 method for class 'commaData'
filterResults(object, padj = 0.05, delta_beta = 0.1, mod_type = NULL, ...)Arguments
- object
A
commaDataobject on whichdiffMethylhas been run.- ...
Ignored.
- padj
Numeric. Maximum adjusted p-value threshold (inclusive). Default
0.05.- delta_beta
Numeric. Minimum absolute effect size threshold (\(|\Delta\beta|\)) (inclusive). Default
0.1. Set to0to disable filtering on effect size.- mod_type
Character string or
NULL. Passed toresultsfor optional modification type filtering.
Value
A data.frame (same format as results) containing
only sites where dm_padj <= padj and
abs(dm_delta_beta) >= delta_beta. Sites with NA values in
either column are excluded.
Examples
data(comma_example_data)
dm <- diffMethyl(comma_example_data, formula = ~ condition, mod_type = "6mA")
sig <- filterResults(dm, padj = 0.05, delta_beta = 0.2)
nrow(sig)
#> [1] 7