Fast implementations of functional enrichment analysis methods using 'C++' via 'Rcpp'.
Currently provides Over-Representation Analysis (ORA), Gene Set Enrichment Analysis (GSEA),
design-aware GSEA on RNA-seq counts with per-sample gene set scoring, Weighted Enrichment
Analysis for ORA and GSEA, Network-based Set Enrichment Analysis (NSEA), multi-layer
network-based enrichment, and multi-omics integration workflows. Additional
features include early fusion at the feature level, late fusion at the pathway level,
multi-omics contribution tracing, topology-aware explanation helpers, Bayesian term
selection, and extremely fast Random Walk with Restart (RWR) using 'RcppEigen'. The
enrichment methods build on GSEA by Subramanian et al. (2005)
enrichit provides C++ implementations of functional enrichment analysis methods and S4 result classes used by the clusterProfiler family. It supports ORA, GSEA, design-aware GSEA on RNA-seq counts, weighted enrichment, network-based enrichment, multilayer network workflows, and multi-omics aggregation and contribution analysis.
You can install the development version of enrichit from GitHub using devtools:
# install.packages("devtools")
devtools::install_github("YuLab-SMU/enrichit")
enrichit organizes its functions around five components:
dsea() for enrichment on a count matrix plus a design (rank by the requested contrast, then GSEA), and dsea_scores()/ssgsea_scores() for per-sample gene set scores.nsea() and multi-layer mnsea() workflows based on Random Walk with Restart.enrichplot.C++ via Rcpp, with sparse network propagation using RcppEigen.dsea() takes a count matrix or a DESeqDataSet plus a design from model.matrix() (rownames must match the sample names), variance-stabilises the counts (vst or rlog), ranks genes by the requested contrast, and runs the GSEA engine already in the package. It returns a plain data.frame -- GSEA's table plus padj and contrast -- so it can be filtered and plotted like any other GSEA result. dsea_scores() and ssgsea_scores() are the other half: a gene set x sample score matrix for analyses that need samples rather than one contrast.as_ranked() and as_genes() turn DESeqResults and fitted DESeqDataSet objects into a ranking or a gene vector, so a dsea() analysis can start from an existing DESeq2 result; extra arguments are passed on to DESeq2::results(), so the contrast uses its c("factor", "numerator", "denominator") form. DESeq2 is suggested, not imported.ora_gson() and gsea_gson() interfaces for structured gene set collections.nsea() and nsea_gson() for network-ranked enrichment on a single graph, including mode = "signed" for bidirectional propagation.mnsea() and mnsea_gson() for multiplex or heterogeneous network propagation across multiple layers.aggregate_omics(), harmonize_ids(), and select_features_for_ora() for feature-level integration before enrichment.aggregate_enrichment() for pathway-level aggregation of multiple enrichment results.get_omics_contribution(), classify_omics_pattern(), and get_mnsea_contribution() for contribution summaries.extract_mnsea_subnetwork() for pathway-specific node/edge tables that can be passed to downstream visualization packages.bayes_enrich() and bayes_summary() for posterior-based term prioritization.ora(), ora_gson()gsea(), gsea_gson()gseaScores()ora(..., weight = )ora_gson(..., weight = )gsea(..., weight = )gsea_gson(..., weight = )dsea()dsea_scores(), ssgsea_scores()as_ranked(), as_genes()prepare_network()nsea(), nsea_gson()prepare_multilayer_network()propagate_multilayer()collapse_multilayer_scores()mnsea(), mnsea_gson()aggregate_omics()harmonize_ids()select_features_for_ora()aggregate_enrichment()get_omics_contribution()classify_omics_pattern()get_mnsea_contribution()extract_mnsea_subnetwork()The package returns the following S4 result classes:
enrichResult for ORA-like workflowsgseaResult for ranked enrichment workflowsnseaResult for single-network propagation plus enrichmentmnseaResult for multi-layer propagation, collapsed scores, and cached explanation tablesdsea() is the exception on the other side: it returns a plain data.frame rather than a gseaResult. dsea_scores() and ssgsea_scores() return a DseaScores object, an S3 list holding the gene set x sample score matrix ($scores) and the metadata it was built with ($meta).
These classes are used across the clusterProfiler family:
enrichit handles core computation, algorithm implementation, and contribution data preparationclusterProfiler provides high-level biological interpretation workflows and general enrichment analysis interfacesenrichplot handles visualizationgson provides a structured gene set resource layer for managing and exchanging gene set collections across the familyDOSE, ReactomePA, meshes, and MicrobiomeProfiler provide domain-specific annotation and interpretation layers