plotGSEA: plot multiple significant pathways with enhanced...

View source: R/richGSEA.R

plotGSEAR Documentation

plot multiple significant pathways with enhanced customization

Description

plot multiple significant pathways with enhanced customization

Usage

plotGSEA(
  object,
  gseaRes,
  mycol = NULL,
  pathways = NULL,
  pathway_pattern = NULL,
  category = NULL,
  min_genes = NULL,
  max_genes = NULL,
  top = 10,
  pvalue = 0.05,
  padj = NULL,
  gseaParam = 1,
  ticksSize = 0.2,
  plot_title = "GSEA Enrichment Plot",
  show_pathway_names = FALSE,
  pathway_name_size = 10,
  line_alpha = 0.8,
  point_alpha = 0.6,
  return_data = FALSE,
  interactive = FALSE
)

Arguments

object

Annot object

gseaRes

GSEAResult object

mycol

a vector indicate the colors used for the figure

pathways

specific pathway names to display (if NULL, use top/pvalue/padj filtering)

pathway_pattern

regex pattern for pathway matching

category

pathway category filter

min_genes

minimum gene set size filter

max_genes

maximum gene set size filter

top

number of terms you want to display (used when pathways is NULL)

pvalue

cutoff value of pvalue (if padj set as NULL, used when pathways is NULL)

padj

cutoff value of p adjust value (used when pathways is NULL)

gseaParam

GSEA parameter for enrichment score calculation

ticksSize

size of the tick marks

plot_title

title for the plot

show_pathway_names

whether to show pathway names on plot

pathway_name_size

size of pathway name text

line_alpha

transparency of lines

point_alpha

transparency of points

return_data

whether to return plot data along with plot

interactive

whether to create interactive plot using plotly

Author(s)

Kai Guo

Examples

## Not run: 
set.seed(123)
hsako<-buildAnnot(species="human",keytype="SYMBOL",anntype = "KEGG")
name=sample(unique(hsako$GeneID),1000)
gene<-rnorm(1000)
names(gene)<-name
res<-richGSEA(gene,object = hsako)
# Plot top 10 significant pathways
plotGSEA(object = hsako, gseaRes = res)
# Plot specific pathways
plotGSEA(object = hsako, gseaRes = res,
         pathways = c("MAPK signaling pathway", "PI3K-Akt signaling pathway"))
# Plot pathways matching pattern
plotGSEA(object = hsako, gseaRes = res, pathway_pattern = "signaling")
# Interactive plot
plotGSEA(object = hsako, gseaRes = res, interactive = TRUE)

## End(Not run)

guokai8/richR documentation built on June 10, 2025, 4:51 a.m.