Skip to contents

A 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 commaData object on which diffMethyl has 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 to 0 to disable filtering on effect size.

mod_type

Character string or NULL. Passed to results for 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.

See also

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