Heatmap for methytmle objects

methyheat(x, ..., n_sites = 25, type = "raw")

Arguments

x

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

...

Additional arguments passed to superheat. Consult the documentation of the superheat package for a list of options.

n_sites

Numeric indicating the number of CpG sites to be shown in the plot. If the number of sites analyzed is greater than this cutoff, sites to be displayed are chosen by ranking sites based on their raw (marginal) p-values.

type

Whether to plot the original data (M-values or Beta-values) for the set of top CpG sites or to plot the measurements after applying a transformation into influence curve space (with respect to the target parameter of interest). The latter uses the fact that the parameters have asymptotically linear representations to obtain a rotation of the raw data into an alternative space; moreover, in this setting, the heatmap reduces to visualizing a supervised clustering procedure.

Value

Nothing. This function is called for its side-effect of outputting a heatmap to the graphics device. The heatmap is constructed using the superheat package.

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
methyheat(methyvim_out_ate, type = "raw")
#> Error in methyheat(methyvim_out_ate, type = "raw"): object 'methyvim_out_ate' not found