perform_gsea: Perform Gene Set Enrichment Analysis

Description Usage Arguments Value Examples

Description

A simple interface for performing gene set enrichment analysis on multiple collections of gene-level statistics.

Usage

1
perform_gsea(gene_sets, Z, verbose = TRUE, eps = 1e-32, nproc = 0, ...)

Arguments

gene_sets

Gene set data encoded as an n x m binary matrix, where n is the number of gene sets and m is the number of genes: gene_sets[i,j] = 1 if and only if gene i is included in gene set j, and otherwise gene_sets[i,j] = 0. The rows and columns should be named. Only the rows of gene_sets matching the rows of Z will be used in the enrichment analysis.

Z

Matrix of gene-level statistics such as z-scores, with rows corresponding to genes. An enrichment analysis is performed for each column of Z. The rows and columns should be named; rows of Z matching the columns of gene_sets will be used in the enrichment analysis.

verbose

When verbose = TRUE, information about the progress of the gene set enrichment analysis is printed to the console.

eps

The lower bound for calculating p-values; smaller values of eps may give more accurate p-values at the possible cost of slightly longer computation. Passed as the eps input to fgsea.

nproc

Number of workers used to run gene set enrichment analysis. Passed as the nproc input to fgsea.

...

Additional arguments passed to fgsea.

Value

The return value is a list containing four n x k matrices of gene set enrichment analysis results, where n is the number of gene sets and k is the number of columns in Z. The matrices give the p-values (pval), enrichment scores (ES), normalized enrichment scores (NES), and expected errors (log2err). See fgseaMultilevel for more information about these outputs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Load the human gene sets and results of a differential
# expression analysis.
data(gene_sets_human)
data(pbmc_facs_z)

# Perform the gene set enrichment analysis using fgsea. This step
# may take a little while.
gsea_res <- perform_gsea(gene_sets_human$gene_sets,pbmc_facs_z)

# Create an interactive plot for exploring the results of the gene
# set enrichment analysis.
gsea_plotly(gsea_res,gene_set_info,"B",file = "gsea_b_cells.html",
            title = "B cells")

stephenslab/pathways documentation built on March 17, 2021, 11:03 p.m.