Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

calcGseaStat

Calculates GSEA statistics for a given query gene set


Description

Takes O(k log k) time, where k is a size of 'selectedSize'.

Usage

calcGseaStat(
  stats,
  selectedStats,
  gseaParam = 1,
  returnAllExtremes = FALSE,
  returnLeadingEdge = FALSE,
  scoreType = c("std", "pos", "neg")
)

Arguments

stats

Named numeric vector with gene-level statistics sorted in decreasing order (order is not checked).

selectedStats

Indexes of selected genes in the 'stats' array.

gseaParam

GSEA weight parameter (0 is unweighted, suggested value is 1).

returnAllExtremes

If TRUE return not only the most extreme point, but all of them. Can be used for enrichment plot

returnLeadingEdge

If TRUE return also leading edge genes.

scoreType

This parameter defines the GSEA score type. Possible options are ("std", "pos", "neg")

Value

Value of GSEA statistic if both returnAllExtremes and returnLeadingEdge are FALSE. Otherwise returns list with the folowing elements:

Examples

data(exampleRanks)
data(examplePathways)
ranks <- sort(exampleRanks, decreasing=TRUE)
es <- calcGseaStat(ranks, na.omit(match(examplePathways[[1]], names(ranks))))

fgsea

Fast Gene Set Enrichment Analysis

v1.16.0
MIT + file LICENCE
Authors
Gennady Korotkevich [aut], Vladimir Sukhov [aut], Nikolay Budin [ctb], Alexey Sergushichev [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.