runGeneSetAnalysis: Gene Set Enrichment Analysis

runGeneSetAnalysisR Documentation

Gene Set Enrichment Analysis

Description

This function performs gene set enrichment analysis using either ORA, fgsea, GSA, ks, or wilcox approaches.

Usage

runGeneSetAnalysis(
  summarizedExperiment,
  genesets,
  method = c("ora", "fgsea", "gsa", "ks", "wilcox"),
  ORAArgs = list(pThreshold = 0.05),
  FgseaArgs = list(sampleSize = 101, minSize = 1, maxSize = Inf, eps = 1e-50, scoreType =
    "std", nproc = 0, gseaParam = 1, BPPARAM = NULL, nPermSimple = 1000, absEps = NULL),
  GSAArgs = list(method = "maxmean", random.seed = NULL, knn.neighbors = 10, s0 = NULL,
    s0.perc = NULL, minsize = 15, maxsize = 500, restand = TRUE, restand.basis =
    "catalog", nperms = 200, xl.mode = "regular", xl.time = NULL, xl.prevfit = NULL)
)

Arguments

summarizedExperiment

The generated SummarizedExpriment object from DE analysis result.

genesets

The gene sets definition, ex. KEGG genesets from getGeneSets function.

method

The gene set enrichment analsyis method, including ORA, fgsea, GSA, ks, and wilcox.

ORAArgs

A list of other passed arguments to ORA. pThreshold is used as p.value cutoff to pick DE genes.

FgseaArgs

A list of other passed arguments to fgsea. See fgsea function.

GSAArgs

A list of other passed arguments to GSA. See GSA function.

Value

A dataframe of gene set enrichment analysis result, which contains the following columns:

  • ID: The ID of the gene set

  • p.value: The p-value of the gene set

  • pFDR: The adjusted p-value of the gene set using the Benjamini-Hochberg method

  • score: The enrichment score of the gene set

  • normalizedScore: The normalized enrichment score of the gene set

  • sampleSize: The total number of samples in the study

  • name: The name of the gene set

  • pathwaySize: The size of the gene set

The returned data frame is sorted based on the pathways' nominal p-values.

Examples



library(RCPA)

RNASeqDEExperiment <- loadData("RNASeqDEExperiment")
genesets <- loadData("genesets")

oraResult <- runGeneSetAnalysis(RNASeqDEExperiment, genesets,
                               method = "ora", 
                               ORAArgs = list(pThreshold = 0.05))
print(head(oraResult))
                                           
fgseaResult <- runGeneSetAnalysis(RNASeqDEExperiment, genesets, 
                               method = "fgsea",
                               FgseaArgs = list(minSize = 10, maxSize = Inf))
print(head(fgseaResult))



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