Perform Enrichment Analysis for a Single Gene Set

enrichment(
  input_genes,
  genes_by_term = pathfindR.data::kegg_genes,
  term_descriptions = pathfindR.data::kegg_descriptions,
  adj_method = "bonferroni",
  enrichment_threshold = 0.05,
  sig_genes_vec,
  background_genes
)

Arguments

input_genes

The set of gene symbols to be used for enrichment analysis. In the scope of this package, these are genes that were identified for an active subnetwork

genes_by_term

List that contains genes for each gene set. Names of this list are gene set IDs (default = kegg_genes)

term_descriptions

Vector that contains term descriptions for the gene sets. Names of this vector are gene set IDs (default = kegg_descriptions)

adj_method

correction method to be used for adjusting p-values. (default = 'bonferroni')

enrichment_threshold

adjusted-p value threshold used when filtering enrichment results (default = 0.05)

sig_genes_vec

vector of significant gene symbols. In the scope of this package, these are the input genes that were used for active subnetwork search

background_genes

vector of background genes. In the scope of this package, the background genes are taken as all genes in the PIN (see enrichment_analyses)

Value

A data frame that contains enrichment results

See also

p.adjust for adjustment of p values. See run_pathfindR for the wrapper function of the pathfindR workflow. hyperg_test for the details on hypergeometric distribution-based hypothesis testing.

Examples

enrichment(
  input_genes = c('PER1', 'PER2', 'CRY1', 'CREB1'),
  sig_genes_vec = 'PER1',
  background_genes = unlist(pathfindR.data::kegg_genes)
)
#>                ID      Term_Description Fold_Enrichment      p_value
#> hsa04710 hsa04710      Circadian rhythm        978.7647 9.077243e-13
#> hsa04713 hsa04713 Circadian entrainment        343.0722 9.582370e-08
#>                 adj_p non_Signif_Snw_Genes
#> hsa04710 3.095340e-10    PER2, CRY1, CREB1
#> hsa04713 3.267588e-05          PER2, CREB1