DGEAR: Differential Gene Expression Analysis with R

View source: R/DGEAR.R

DGEARR Documentation

Differential Gene Expression Analysis with R

Description

Main orchestration function that runs five statistical tests (Welch t-test, one-way ANOVA, Dunnett's test, Half's modified t-test, and Wilcoxon-Mann-Whitney U-test) on a gene expression matrix, combines their BH-adjusted p-values with Fisher's combined probability method, and identifies differentially expressed genes (DEGs) by majority voting.

Usage

DGEAR(
  dataframe,
  con1,
  con2,
  exp1,
  exp2,
  alpha = 0.05,
  votting_cutoff = 3,
  annot_df = NULL
)

Arguments

dataframe

A numeric matrix or data.frame of gene expression values (rows = genes, columns = samples). Raw intensity / count values are automatically log2-transformed when they appear to be on a linear scale.

con1

Integer. Index of the first control column.

con2

Integer. Index of the last control column.

exp1

Integer. Index of the first experiment column.

exp2

Integer. Index of the last experiment column.

alpha

Numeric significance threshold for BH-adjusted p-values (default 0.05).

votting_cutoff

Integer. Minimum number of tests (out of 5) that must independently declare a gene significant for it to be included in the majority-vote DEG list (default 3). Must be between 1 and 5.

annot_df

Optional annotation data.frame with columns ID and Gene.Symbol (or Gene.symbol) that maps probe/row identifiers to gene symbols. When NULL (default) row names of dataframe are used directly as gene identifiers. Typical source: a GEO SOFT family file parsed with read.delim().

Details

The function internally calls:

  • perform_t_test — Welch two-sample t-test

  • perform_anova — one-way ANOVA

  • perform_dunnett_test — Dunnett's test

  • perform_h_test — Half's modified t-test

  • perform_wilcox_test — Wilcoxon rank-sum test

Each test independently assigns an FDR flag (1 = significant, 0 = not). The five flags are summed per gene; genes whose sum meets or exceeds votting_cutoff are reported as DEGs (majority voting, Boyer & Moore 1991). Combined p-values across all five tests are computed with Fisher's method via parallelFisher.

Annotation via annot_df is entirely optional. When supplied, the first gene symbol listed for each probe (delimited by /// ) is used. When absent, row names serve as identifiers, making the function fully self-contained without GEO annotation files.

Value

A named list with four elements:

DEGs

Data.frame of gene identifiers that passed majority voting.

FDR_Table

Wide data.frame with BH-adjusted p-values from every test, the Fisher-combined FDR, the ensemble voting score, and log2 fold change for every gene.

Results_Table

Concise data.frame with G_Symbol, CombineFDR, log2FC, and Ensemble score.

IndividualTests

Named list of the raw output from each of the five test functions (each containing a Table and a DEGs element).

References

Boyer, R.S. and Moore, J.S. (1991). MJRTY — A Fast Majority Vote Algorithm. In Automated Reasoning: Essays in Honor of Woody Bledsoe, pp. 105–117. Springer, Dordrecht. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-94-011-3488-0_5")}

Examples

library(DGEAR)
data("gene_exp_data")

## Basic usage — no annotation file needed
result <- DGEAR(dataframe    = gene_exp_data,
                con1         = 1,
                con2         = 10,
                exp1         = 11,
                exp2         = 20,
                alpha        = 0.05,
                votting_cutoff = 2)
result$DEGs
head(result$FDR_Table)

## With an optional annotation data.frame (GEO SOFT format)
## annot <- read.delim("GSExxxxx_family.soft")
## result <- DGEAR(dataframe = gene_exp_data,
##                 con1 = 1, con2 = 10, exp1 = 11, exp2 = 20,
##                 annot_df = annot)

DGEAR documentation built on July 3, 2026, 9:07 a.m.