enrich_test: enrich_test

View source: R/enrich_test.R

enrich_testR Documentation

enrich_test

Description

A function to streamline enrichment tests using of cluster marker genes in single cell seq after analysis with Seurat.

Usage

enrich_test(
  markers_df = NULL,
  p_val = 0.1,
  cats_list = NULL,
  species_x = "Homo sapiens",
  genome_genes = 23459,
  clust_list = NULL
)

Arguments

markers_df

is a data frame generated by the FindAllMarkers function in the Seurat package.

p_val

is the FDR cutoff to generate a list of cluster associated genes from the markers df.

cats_list

is a list of annotation lists created by msigdb_gsets function including BIOCARTA, KEGG, REACTOME, GO:BP, GO:MF, and GO:CC in that order. Function generates list if not provided using species_x which is human by default

species_x

species names, default is "Homo sapiens", refer to ?msigdbr::msigdbr for available species

genome_genes

should be the number of genes in your data set.

clust_list

can be a user generated list of genes associated with clusters. Must be a list of vectors.

Value

returns a list of length 2. The first object is a list of of lists of the object dervied from the enrichment tests, and the second is a data frame of the data used as input for the visulaization functions.

Examples

## Not run: 
GO_and_Reactome_results<-enrich_test(seurat_markers)

## End(Not run)

neural-stem-cell-institute/screp documentation built on Feb. 11, 2023, 10:45 a.m.