BuildHeatmap {metadeconfoundR}R Documentation

BuildHeatmap

Description

BuildHeatmap summarizes MetaDeconfound output in a heatmap or cuneiform plot

Usage

BuildHeatmap(
  metaDeconfOutput,
  q_cutoff = 0.1,
  d_cutoff = 0.01,
  cuneiform = FALSE,
  coloring = 0,
  showConfounded = TRUE,
  intermedData = FALSE,
  featureNames = NULL,
  metaVariableNames = NULL,
  d_range = "fit",
  d_col = c("blue", "white", "red"),
  keepMeta = NULL,
  keepFeature = NULL,
  trusted = c("OK_sd", "OK_nc", "OK_d", "AD"),
  tileBordCol = "black",
  reOrder = "both"
)

Arguments

metaDeconfOutput

output of a metadeconfound run

q_cutoff

optional FDR-value cutoff used to remove low-significance entries from data

d_cutoff

optional effect size cutoff used to remove low effect size entries from data

cuneiform

optional logical parameter, plot cuneiform instead of heatmap when cuneiform = TRUE

coloring

optional, can be 0,1,2; 0: color all tiles according to effectsize ; 1: don't color not significant tiles 2: like 1 but also don't color confounded signal tiles

showConfounded

optional logical parameter; set to FALSE to remove significance markers from confounded signals

intermedData

only return intermediate data for plotting, default = FALSE

featureNames

optional two-column-dataframe containing corresponding "human-readable" names to the "machine-readable" feature names used as row.names in metaDeconfOutput. These human readable names will be displayed in the final plot. First column: machine-readable, second column: human-readable.

metaVariableNames

optional two-column-dataframe containing corresponding "human-readable" names to the "machine-readable" metadata names used as column names in metaDeconfOutput. These human readable names will be displayed in the final plot. First column: machine-readable, second column: human-readable.

d_range

range of effect sizes shown; "full": (default) range from -1 to +1; "fit": range reduced according to maximum and minimum effect size present in resulting plot

d_col

set color range for effect size as c(minimum, middle, maximum), default c("red", "white", "blue")

keepMeta

character vector of metavariable names (corresponding to names in metaDeconfOutput), that should be shown in resulting plot, even when they have no associations passing d_cutoff and q_cutoff

keepFeature

character vector of metavariable names (corresponding to names in metaDeconfOutput), that should be shown in resulting plot, even when they have no associations passing d_cutoff and q_cutoff

trusted

character vector of confounding status labels to be treated as trustworthy, not-confounded signal. default = c("OK_sd", "OK_nc", "OK_d", "AD")

tileBordCol

tile border color of heatmap tiles, default: "black"

reOrder

reorder features and/or metadata? possible options: c("both", "feat", "meta", "none"), default: "both"

Details

for more details and explanations please see the package vignette.

Value

ggplot2 object

Examples

data(reduced_feature)
data(metaMatMetformin)

example_output <- MetaDeconfound(featureMat = reduced_feature,
                                  metaMat = metaMatMetformin,
                                  logLevel = "ERROR")

plotObject <- BuildHeatmap(example_output)

alternativePlot <- BuildHeatmap(example_output, coloring = 2, showConfounded = FALSE)



[Package metadeconfoundR version 1.0.2 Index]