MyNixOS website logo
Description

'C++' Implementations of Functional Enrichment Analysis.

Fast implementations of functional enrichment analysis methods using 'C++' via 'Rcpp'. Currently provides Over-Representation Analysis (ORA) and Gene Set Enrichment Analysis (GSEA). The multilevel GSEA algorithm is derived from the 'fgsea' package. Methods are described in Subramanian et al. (2005) <doi:10.1073/pnas.0506580102> and Korotkevich et al. (2021) <doi:10.1101/060012>.

enrichit: C++ Implementations of Functional Enrichment Analysis

The enrichit package provides fast, efficient, and lightweight implementations of common functional enrichment analysis methods, including Over-Representation Analysis (ORA) and Gene Set Enrichment Analysis (GSEA). The core algorithms are implemented in C++ using Rcpp to ensure high performance, making it suitable for analyzing large datasets or running simulations.

Installation

You can install the development version of enrichit from GitHub using devtools:

# install.packages("devtools")
devtools::install_github("YuLab-SMU/enrichit")

Features

  • High Performance: Core calculations are written in C++.
  • ORA: Standard hypergeometric test for over-representation analysis.
  • GSEA:
    • Multilevel: Efficient p-value estimation for high-significance results (similar to fgsea).
    • Permutation: Standard permutation-based p-value calculation.
    • Adaptive: Adaptive permutation approach.
  • GSON Support: Native support for GSON objects for gene set management.
  • Standardized Output: Returns enrichResult and gseaResult objects compatible with the clusterProfiler ecosystem.

Usage

Over-Representation Analysis (ORA)

library(enrichit)

# Example gene sets
gene_sets <- list(
  pathway1 = paste0("Gene", 1:50),
  pathway2 = paste0("Gene", 51:100)
)

# Define a universe and a list of significant genes
universe <- paste0("Gene", 1:1000)
sig_genes <- paste0("Gene", 1:20) # Significant genes

# Run ORA
ora_res <- ora(gene = sig_genes, 
               gene_sets = gene_sets, 
               universe = universe)

print(ora_res)

Gene Set Enrichment Analysis (GSEA)

library(enrichit)

# Generate a ranked gene list
set.seed(123)
geneList <- sort(rnorm(1000), decreasing = TRUE)
names(geneList) <- paste0("Gene", 1:1000)

# Define gene sets
gene_sets <- list(
  pathway1 = paste0("Gene", 1:50),  # Enriched at top
  pathway2 = paste0("Gene", 951:1000) # Enriched at bottom
)

# Run GSEA
gsea_res <- gsea(geneList = geneList, 
                 gene_sets = gene_sets, 
                 method = "multilevel")

print(gsea_res)
Metadata

Version

0.1.3

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows