plotPathwayHeatmap: Plot pathways heatmap plot from pathway/geneset/meta analysis...

View source: R/plot-pathway-heatmap.R

plotPathwayHeatmapR Documentation

Plot pathways heatmap plot from pathway/geneset/meta analysis results

Description

pathways heatmap plot from pathway/geneset/meta analysis results.

Usage

plotPathwayHeatmap(
  resultsList,
  yAxis = c("ID", "name"),
  negLog10pValueLims = c(0, 5),
  useFDR = TRUE,
  selectedPathways = NULL
)

Arguments

resultsList

A named list of dataframes from pathway analysis, geneset analysis, and/or meta analysis results. The columns are ID, name, description, p.value, pFDR, size, nDE, score and normalizedScore.

yAxis

The column to use for the y-axis.

negLog10pValueLims

A vector of length 2 specifying the minimum and maximum -log10(p-value) to plot.

useFDR

Logical to indicate whether to use FDR or p-value.

selectedPathways

A vector of pathways ID, which is in the same format as ID column in the pathway analysis result, to be included in the plot. If it is NULL, all pathways will be included.

Value

A ggplot2 object for presenting the heatmap of the pathways.

Examples


library(RCPA)
affyFgseaResult <- loadData("affyFgseaResult")
agilFgseaResult <- loadData("agilFgseaResult")
RNASeqFgseaResult <- loadData("RNASeqFgseaResult")
metaPAResult <- loadData("metaPAResult")

PAResults <- list(
    "Affymetrix - GSE5281" = affyFgseaResult,
    "Agilent - GSE61196" = agilFgseaResult,
    "RNASeq - GSE153873" = RNASeqFgseaResult,
    "Meta-analysis" = metaPAResult
)

selectedPathways <- c("path:hsa05010", "path:hsa05012", "path:hsa05014", 
                      "path:hsa05016", "path:hsa05017", "path:hsa05020", 
                      "path:hsa05022", "path:hsa04724", "path:hsa04727", 
                      "path:hsa04725", "path:hsa04728", "path:hsa04726", 
                      "path:hsa04720", "path:hsa04730", "path:hsa04723", 
                      "path:hsa04721", "path:hsa04722")
                      
resultsToPlot <- lapply(PAResults, function(df) df[df$ID %in% selectedPathways,])

plotObj <- RCPA::plotPathwayHeatmap(resultsToPlot, yAxis = "name")



RCPA documentation built on Nov. 21, 2023, 5:08 p.m.