run_gsea: Performs gene set enrichment analysis with fgsea on a table...

Description Usage Arguments Value

View source: R/gsea_functions.R

Description

Performs gene set enrichment analysis with fgsea on a table of gene stats

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
run_gsea(
  gene_stats,
  term2gene,
  gene_var = "Gene",
  rank_var = "logFC",
  dir = "both",
  method = "fgsea",
  min_size = 1,
  max_size = 500
)

Arguments

gene_stats

a table of gene level stats.

term2gene

a table of gene_sets in term2gene format.

gene_var

name of the column containing gene names.

rank_var

name of the column containing gene stats.

dir

direction(s) to consider. Options are ("both","pos","neg")

method

GSEA methods. Options are ("fgsea").

min_size

minimal size of a gene set to test.

max_size

maximal size of a gene set to test. Defaults to 500.

Value

A table with the following columns:

term: gene set name.
p_value: enrichment p-value.
p_adjust: BH-adjusted p-value.
ES: enrichment score.
NES: enrichment score normalized to mean enrichment of random samples of the same size.
direction: enrichment direction. Options are ("both","pos","neg").
size: size of the gene set.
leading_edge: vector with indexes of leading edge genes that drive the enrichment.


broadinstitute/cdsr_gsea documentation built on Sept. 1, 2020, 5:39 a.m.