plotKEGGMap: Plot KEGG map with DE genes

View source: R/plot-KEGG-map.R

plotKEGGMapR Documentation

Plot KEGG map with DE genes

Description

This function plots KEGG map with DE genes.

Usage

plotKEGGMap(
  DEResults,
  KEGGPathwayID,
  statistic = "logFC",
  useFDR = TRUE,
  pThreshold = 0.05,
  statLimit = 3
)

Arguments

DEResults

A named list of data frame of DE analysis results. The columns of each data frame should be at least ID, logFC, p.value and pFDR.

KEGGPathwayID

The KEGG pathway ID.

statistic

The column name of the statistic used to plot the DE genes. If statistic is p.value or pFDR, all genes are colored. Otherwise, only DE genes are colored.

useFDR

If TRUE, DE genes are selected based on pFDR, otherwise p.value.

pThreshold

The p-value threshold to select DE genes. Only used when statistic is not p.value or pFDR.

statLimit

The absolute value of the statistic to color the DE genes. If statistic is p.value or pFDR, this parameter is the limit of -log10(p-value). Otherwise, this parameter is the limit of the absolute value of the statistic.

Value

A list with the following elements:

  • plot: A ggplot object of the KEGG map.

  • width: The width of the KEGG map.

  • height: The height of the KEGG map.

Examples


library(RCPA)
library(SummarizedExperiment)

affyDEExperiment <- loadData("affyDEExperiment")
agilDEExperiment <- loadData("agilDEExperiment")
RNASeqDEExperiment <- loadData("RNASeqDEExperiment")

DEResults <- list(
    "Affymetrix - GSE5281" = rowData(affyDEExperiment),
    "Agilent - GSE61196" = rowData(agilDEExperiment),
    "RNASeq - GSE153873" = rowData(RNASeqDEExperiment)
)

plotObj <- RCPA::plotKEGGMap(DEResults, "hsa05010", stat = "logFC", pThreshold = 1, statLimit = 1)



RCPA documentation built on July 3, 2024, 5:08 p.m.