Skip to contents

This function performs enrichment analysis using KEGG, Reactome, GO, or a custom universal method. It accepts a set of genes and background genes for enrichment.

Usage

run_enrichment(
  genes,
  bg,
  res.name,
  TERM2GENE = NULL,
  res.list = list(),
  method = c("KEGG", "Reactome", "GO", "universal"),
  species = c("human", "mouse"),
  ont = c("BP", "MF", "CC", "ALL"),
  OrgDb = "org.Hs.eg.db",
  id.type = "ENSEMBL",
  ...
)

Arguments

genes

Character vector of gene IDs for simple enrichment. Default is NULL.

bg

Character vector of gene IDs to be used as background for simple enrichment. Default is NULL.

res.name

Output prefix name for results.

TERM2GENE

data.frame of two columns, the first for the term and the second for the gene ID. Each gene in each geneset gets its own row (long format). Gene identifiers should be ENTREZID. Required if method is "universal".

res.list

Named list to which enrichment results should be added. Default is an empty list.

method

Enrichment method to use. Options are "KEGG", "Reactome", "GO", or "universal".

species

Species to use. Options are "human" or "mouse". This determines the organism values for KEGG and Reactome.

ont

Character vector of GO ontologies to test, options include "BP", "MF", "CC", and "ALL". Default is c("BP", "MF", "CC", "ALL").

OrgDb

Annotation database to use (default: "org.Hs.eg.db").

id.type

Type of gene ID used (default: "ENSEMBL").

...

Additional arguments passed to the enrichment functions.

Value

Named list of enrichment results.

Details

This function will not return results for analyses with no significant results.

Author

Jared Andrews