Volcano plot for methytmle objects

methyvolc(x, param_bound = 2, pval_bound = 0.2)

Arguments

x

Object of class methytmle as produced by an appropriate call to methyvim.

param_bound

Numeric for a threshold indicating the magnitude of the size of the effect considered to be interesting. This is used to assign groupings and colors to individual CpG sites.

pval_bound

Numeric for a threshold indicating the magnitude of p-values deemed to be interesting. This is used to assign groupings and colors to individual CpG sites.

Value

Object of class ggplot containing a volcano plot of the estimated effect size on the x-axis and the -log10(p-value) on the y-axis. The volcano plot is used to detect possibly false positive cases, where a test statistic is significant due to low variance.

Examples

suppressMessages(library(SummarizedExperiment)) library(methyvimData) data(grsExample) var_int <- as.numeric(colData(grsExample)[, 1])
#> Error in (function (classes, fdef, mtable) { methods <- .findInheritedMethods(classes, fdef, mtable) if (length(methods) == 1L) return(methods[[1L]]) else if (length(methods) == 0L) { cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ") stop(gettextf("unable to find an inherited method for function %s for signature %s", sQuote(fdef@generic), sQuote(cnames)), domain = NA) } else stop("Internal error in finding inherited methods; didn't return a unique method", domain = NA)})(list(structure("DataFrame", package = "S4Vectors")), structure(function (x, use.names = FALSE, ...) standardGeneric("mcols"), generic = structure("mcols", package = "S4Vectors"), package = "S4Vectors", group = list(), valueClass = character(0), signature = c("x", "use.names"), default = `\001NULL\001`, skeleton = (function (x, use.names = FALSE, ...) stop("invalid call in method dispatch to 'mcols' (no default method)", domain = NA))(x, use.names, ...), class = structure("standardGeneric", package = "methods")), <environment>): unable to find an inherited method for function ‘mcols’ for signature ‘"DataFrame"’
methyvim_out_ate <- suppressWarnings( methyvim(data_grs = grsExample, sites_comp = 25, var_int = var_int, vim = "ate", type = "Mval", filter = "limma", filter_cutoff = 0.1, parallel = FALSE, tmle_type = "glm" ) )
#> Error in methyvim(data_grs = grsExample, sites_comp = 25, var_int = var_int, vim = "ate", type = "Mval", filter = "limma", filter_cutoff = 0.1, parallel = FALSE, tmle_type = "glm"): object 'var_int' not found
methyvolc(methyvim_out_ate)
#> Error in nrow(x): object 'methyvim_out_ate' not found