run_hyper: Performs over representation analysis with fisher's exact...

Description Usage Arguments Value

View source: R/gsea_functions.R

Description

Performs over representation analysis with fisher's exact test on a gene list or table of gene stats

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
run_hyper(
  gene_stats,
  term2gene,
  gene_var = "Gene",
  rank_var = "logFC",
  universe = NULL,
  n_genes = 100,
  dir = "both",
  p_adjust_method = "BH",
  min_size = 1,
  max_size = Inf
)

Arguments

gene_stats

a small list of significant genes or table of gene level stats.

term2gene

a table of gene_sets in term2gene format.

gene_var

if gene_stats is table, name of the column containing gene names.

rank_var

if gene_stats is table, name of the column containing gene stats to rank by.

universe

an optional list of genes that represent the universe. Defaults to genes if gene_stats is a table. Defaults to all genes if gene_stats is a list.

n_genes

if gene_stats is table, number of genes to select after ranking by rank_var.

dir

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

p_adjust_method

Method for p-value adjustment. Defaults to BH

min_size

minimal size of a gene set to test.

max_size

maximal size of a gene set to test.

Value

A table with the following columns:

term: gene set name.
p_value: enrichment p-value.
p_adjust: adjusted p-value.
odds_ratio: the odds ratio the genes being in the set vs not in the set.
direction: enrichment direction.
size: size of the gene set.
overlap_size: size of the overlap between the gene set and significant genes list.
overlap: genes in both the gene set and significant genes list.


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