heatmapPaths: Visualization of the gene set enrichment meta-analysis...

View source: R/heatmapPaths.R

heatmapPathsR Documentation

Visualization of the gene set enrichment meta-analysis results

Description

It allows to see how the different significant gene sets are expressed in the different samples

Usage

heatmapPaths(
  objectMApath,
  resMA,
  scaling = c("zscor", "rscale", "swr", "none"),
  regulation = c("all", "up", "down"),
  breaks = c(-2, 2),
  fdrSig = 0.05,
  comES_Sig = 0.5,
  numSig = "all",
  color = colorRampPalette(rev(brewer.pal(n = 7, name = "RdYlBu")))(100),
  na_col = "darkgrey",
  legend = TRUE,
  cluster_cols = FALSE,
  cluster_rows = FALSE,
  show_rownames = TRUE,
  show_colnames = FALSE,
  fontsize = 10,
  fontsize_row = fontsize,
  fontsize_col = fontsize
)

Arguments

objectMApath

A list of list. Each list contains two elements. The first element is the Gene Set matrix (gene sets in rows and samples in columns) and the second element is a vector of zeros and ones that represents the state of the different samples of the Gene Sets matrix. 0 represents one group (controls) and 1 represents the other group (cases).

resMA

Output generated by the function that performs meta-analysis (metaAnalysisESpath).

scaling

Character variable to choose between different scaling approaches. See "Details" for more information.

regulation

Character variable that indicates whether we want the heatmap to show all significant paths ("all"), only the up-regulated paths ("up") or only the down-regulated paths("down")

breaks

Numeric vector of length 2 that contains the extreme values (minimum and maximum) of the range of values in which the heatmap color scale will be distributed. Default a vector By default a vector of -2 and 2 as extreme values.

fdrSig

Adjusted p-value from which a gene set is considered significant. Default 0.05

comES_Sig

In absolute value. Combine effect size threshold from which gene sets are considered. Default 0.5

numSig

The number of most significant paths to be represented. If numSig = "all", all significant paths that meet the selected parameters will be represented.

color

vector of colors used in heatmap.

na_col

color of the NA cell in the heatmap.

legend

logical to determine if legend should be drawn or not.

cluster_cols

boolean values determining if columns should be clustered.

cluster_rows

boolean values determining if rows should be clustered.

show_rownames

boolean specifying if row names are be shown.

show_colnames

boolean specifying if column names are be shown.

fontsize

base fontsize for the plot

fontsize_row

fontsize for rownames (Default: fontsize)

fontsize_col

fontsize for colnames (Default: fontsize)

Details

Scaling approaches that can be used are:

  • "rscale": it applies rescale function of scales package. Values will be between -1 and 1)

  • "zscor": It calculates a z-score value for each gene, that is, the mean gene expression from each gene is subtracted from each gene expression value and then it is divided by the standard deviation

  • "swr": it applys scaling relative to reference dataset approach

  • "none": any scaling approach it is applied.

Value

The matrix represented in the heatmap

Author(s)

Juan Antonio Villatoro Garcia, juanantoniovillatorogarcia@gmail.com

References

Hadley Wickham and Dana Seidel (2020). scales: Scale Functions for Visualization. R package version 1.1.1. https://CRAN.R-project.org/package=scales

Lazar, C, Meganck, S, Taminau, J, and et al. 2013. “Batch Effect Removal Methods for Microarray Gene Expression Data Integration: A Survey,” 469–90.

Raivo Kolde 2019. pheatmap: Pretty Heatmaps. R package version 1.0.12. https://CRAN.R-project.org/package=pheatmap

See Also

createObjectMApath, metaAnalysisESpath

Examples


data("simulatedData")
resultsMA <- metaAnalysisESpath(objectMApathSim, typeMethod="REM")
heatmapPaths(objectMA=objectMApathSim, resultsMA,
    scaling = "zscor", regulation = "all",breaks=c(-2,2),
    fdrSig = 0.05, comES_Sig = 1.5, numSig=20)


GSEMA documentation built on Oct. 14, 2024, 5:09 p.m.