DRaCOoN offers a powerful, data-driven approach to uncover differential gene relationships across conditions, efficiently handling large datasets through various analysis modes. It generates networks by identifying gene pairs with changing associations.
- Computes differential association and differential regulatory networks.
- Optimized for large datasets.
- Supports multiple working modes based on available data and analysis goals.
- Internal parallelization for faster computation.
- Utilizes Numba for just-in-time (JIT) compilation, accelerating the analysis process.
- Python 3.x
- Additional Python libraries as specified in
requirements.txt
DRaCOoN is published on PyPI as dracoonpy (current release: 0.1.3):
pip install dracoonpygit clone https://github.com/fmdelgado/DRaCOoNpy.git
cd DRaCOoN/app
pip install -r requirements.txt# if installed from pip
import dracoon
# if installed from source
from app.dracoon import dracoonThe algorithm operates in several major steps:
-
Data Input: Accepts an expression dataset (microarray or RNA-Seq) with multiple samples across two conditions. A minimum of 20 samples per condition is recommended for meaningful results.
-
Background Model Estimation: Computes a permutation test-based background model for significance estimation.
-
Differential Metrics Calculation: Calculates two differential metrics, absolute difference (Δr) and shift difference (s), for network edges.
-
Significance Testing: Assigns p-values based on the background model and adjusts for multiple testing.
DRaCOoN assesses the change in condition-specific correlations between pairs of genes. It utilizes different association metrics like, Pearson's r and Spearman's ρ correlation coefficients or an entropy-based metric. Then it computes differential metrics based on these values.
- absdiff: Absolute difference in the association between two genes across two conditions, estimated as:
- shift: The relative change in association between two genes across two conditions with respect to their condition-agnostic association, estimated as:
-
permutation: Only available when
matrixform = False. For each evaluated gene pair, shuffles their values to create a distribution of ( n ) random values for both absdiff and shift. -
background: Uses a background distribution estimated from ( n ) random pairs of genes that have been shuffled randomly.
-
fitted_background: Fits a set of known distribution to the previous background model and uses the best-fitting distribution to estimate p-values analytically.
Then, p-values for both absdiff and shift are adjusted using one of the multiple methods available at statmodels. By default,. p-value adjustment method is Benjamini/Hochberg (fdr_bh).
The final output of DRaCOoN includes those relationships whose absdiff or shift is lower than a significance threshold, 0.05 by default.
-
Mode 1: Differential Co-expression (DC) for all possible gene-gene associations. Produces an undirected network.
-
Mode 2: User-defined associations for differential examination (Pathway-level DC or Differential Regulation). Produces a directed network.
For more detailed information on the algorithm, please refer to the academic paper (see Citation).
- cond_data: The condition data frame.
- biom_data: The gene expression data frame.
- DRaCOoN_program: Either
DRfor differential regulation,DCfor differential correlation. - associations_df: Only for
DRmode. InDRassociations_df is a dataframe containing the set of source-target interactions to evaluate, containing columns source and target. - significance: The significance level to use as a threshold for adjusted p-values, 0.05 by default.
- association_measure: The association measure to use, either
entropy,pearsonorspearman. By defaultentropy. - pval_method: Either
permutation,backgroundorfitted_background. By defaultfitted_background. - distributions_to_fit: If using
fitted_background, the distributions to fit. By default:- best_dists_absdiff = ['expon', 'logistic', 'rayleigh', 'norm', 'gumbel_r', 'pareto', 'laplace', 'kstwobign', 'moyal', 'halfnorm']
- best_dists_shift = ['logistic', 'norm', 'laplace', 'gumbel_l', 'gumbel_r', 'uniform', 'expon', 'rayleigh', 'hypsecant']
- See other available distributions at the fitter documentation.
- timeout_fitter: If using
fitted_background, the maximum time to fit a distribution, by default 60 seconds. - pvalue_adjustment_method:
fdr_bhby default. - iters: If running permutation tests, the number of iterations, by default 10 000.
- association_pvalue_filter: (Optional) filters conditional relationships based on the adjusted p-value of the condition-specific associations.
- matrixform: Recommended for small datasets (<1000 genes, <1000 samples). Default
True. - verbose: If
True, shows the algorithmic progress. By defaultFalse.
The main method of DRaCOoN is run(). This method sequentially runs the following methods:
preprocessing()estimate_background_model()calculate_correlations()threshold_results()
For more detailed information on the algorithm, please refer to the academic paper (see Citation).
If you use DRaCOoN in your research, please cite:
Delgado-Chaves FM, Spurny F, Laske T, Oubounyt M, Baumbach J. DRaCOon: a novel algorithm for pathway-level differential co-expression analysis in transcriptomics. BMC Bioinformatics 26(1):137 (2025). doi: 10.1186/s12859-025-06162-9. PMID: 40419963.
@article{DelgadoChaves2025DRaCOoN,
title = {{DRaCOon}: a novel algorithm for pathway-level differential co-expression analysis in transcriptomics},
author = {Delgado-Chaves, Fernando M. and Spurny, Ferdinand and Laske, Tanja and Oubounyt, Mhaned and Baumbach, Jan},
journal = {BMC Bioinformatics},
volume = {26},
number = {1},
pages = {137},
year = {2025},
doi = {10.1186/s12859-025-06162-9},
pmid = {40419963},
url = {https://doi.org/10.1186/s12859-025-06162-9}
}If you find any bugs or wish to propose new features, please let us know.

