HIDE-deconv
A framework for characterizing cellular remodeling from bulk RNA-seq data through hierarchical cell-type deconvolution.
Note: HIDE-deconv is not the same method as our previously published HIDE (Bioinformatics, 2025). HIDE-deconv uses a new model for hierarchical deconvolution that jointly optimizes all hierarchy levels.
Key Features
- Bulk RNA-seq cell-type deconvolution using annotated single-cell references
- Hierarchical estimation of cell-type compositions across multiple annotation levels
- Characterization of cellular remodeling across cell populations and biological conditions
- Configurable domain-transfer and library-size correction
- Downstream analysis of deconvolution results, including PCA, UMAP, clustering, survival analysis, and differential composition analysis
- Python API and command-line interface for reproducible workflows
- Supports AnnData based single-cell workflows, with ability to directly search and download data from CELLxGENE
- Local execution suitable for secure research environments
For a detailed overview of all features and usage, please read the Userguide. The API documentation can be found on GitHub Pages.
Real world performance: Morandini
As an additional evaluation on real world data, HIDE-deconv was benchmarked on the Morandini bulk RNA-seq dataset using the HaoSub single-cell reference, following the evaluation procedure of the deconvBench framework from Dietrich et al. (2026).
| Method | Pearson R | RMSE |
|---|---|---|
| AutoGeneS | 0.819 | 0.182 |
| BayesPrism | 0.254 | 0.295 |
| Bisque | 0.872 | 0.122 |
| CIBERSORTx | 0.648 | 0.193 |
| DWLS | 0.909 | 0.103 |
| MuSiC | 0.319 | 0.275 |
| Scaden | 0.795 | 0.150 |
| SCDC | 0.468 | 0.239 |
| CSsingle | 0.767 | 0.159 |
| HIDE-deconv v0.1.10 | 0.926 | 0.098 |
| HIDE-deconv v0.4.0 | 0.933 | 0.094 |
Both HIDE-deconv runs were trained and evaluated using a three-level cell-type hierarchy, analogous to the hierarchical aggregation used for the FACS benchmarking. HIDE-deconv v0.1.10 corresponds to the version used in the preprint.
HIDE-deconv was evaluated independently. Benchmark scripts and results for further configurations, including runs without a cell-type hierarchy, are available in the benchmark repository. Results for the methods written in italics are taken from Dietrich et al. (2026). CSsingle (Shen et al (2026)) was run using version 0.1.0.
Installation
Installation with Bioconda
conda install hide-deconv
Installation with PIP
# Create and activate a new virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate
# Install HIDE-deconv
pip install hide-deconv
Necessary Data
- Single-cell data: Annotated AnnData (.h5ad) file with gene names in
adata.var_namesand cell type annotations for each desired layer inadata.obs(at least one layer of cell type annotations is necessary). - Bulk RNA-seq data: CSV file, genes as row index, samples as columns. Gene IDs must match single-cell data.
- Sample sheet (optional): CSV with sample meta-information (e.g., cohort, survival time, event).
- Data Normalization: We recommend to use raw counts for all datasets.
Public annotated datasets can be searched and downloaded directly from CELLxGENE using the following command
hide-deconv download
Command Line Workflow
Deconvolution (standard workflow):
hide-deconv run --path <project_dir>
This initializes the project, preprocesses data, trains the model, and runs deconvolution.
Difference in composition & survival analysis:
hide-deconv analyze diff --path <project_dir>
hide-deconv analyze survival --path <project_dir>
- For difference analysis, the sample sheet must contain columns for sample ID and cohort.
- For survival analysis, the sample sheet must contain columns for sample ID, survival time and event. Values in the event column must be either "1": event occured or "0": no event.
Command overview:
hide-deconv help
This displays a short introduction to the command line interface and gives an overview of all available commands.
Tutorials
Quick Deconvolution API Example
HIDE-deconv contains a "lazy" API for users who want quick access to deconvolution.
Both API examples run on a synthetic example dataset, which can be created with hide-deconv example or from hide_deconv import generate_example.
import anndata as ad
import pandas as pd
from hide_deconv import deconvolution
adata = ad.read_h5ad("single_cells.h5ad")
bulk = pd.read_csv("bulk.csv", index_col=0) # genes x samples
# Reduced settings for the example data. For real data we recommend the
# defaults of 5000 genes and at least 10000 training bulks.
results = deconvolution(adata, bulk, celltype_cols=["cell_type", "major"], n_genes=1000, n_train_bulks=5000) # Two layer hierarchy
# results = deconvolution(adata, bulk, celltype_cols="major") # Deconvolution only on major level
# results is a list of pandas DataFrames, one per hierarchy layer
# results[0] is the finest layer, results[1] the next coarser layer
If you only pass adata and bulk, celltype_cols defaults to "cell_type".
Extended API Example
For experienced users offers HIDE-deconv a highly customizable API, where they can integrate their own preprocessing steps into the pipeline. An example is given below. For a detailed description of the API we refer to GitHub Pages
import anndata as ad
import pandas as pd
import numpy as np
import scanpy as sc
from hide_deconv.preprocessing import create_reference, create_bulks, reduce_genes
from hide_deconv.models import HIDE
from hide_deconv.statistic import run_kruskal_wallis
from hide_deconv.preprocessing.bulk_preprocessing import get_domain_transfer_factor
from hide_deconv.pipelines.deconvolve_hide_pipeline import normalize_bulk_to_cpm
# 1. Load single-cell, bulk and sample sheet data
adata = ad.read_h5ad("single_cells.h5ad")
bulk = pd.read_csv("bulk.csv", index_col=0) # genes x samples
sample_sheet = pd.read_csv("sample_sheet.csv") # sample IDs in column "SampleID"
# Calculate library sizes on the raw counts of the complete single-cell gene set
library_sizes = (
adata.obs.assign(library_size=np.asarray(adata.X.sum(axis=1)).ravel())
.groupby("cell_type")["library_size"]
.median()
)
# Normalize single cells on the complete gene set before simulating bulks
sc.pp.normalize_total(adata, target_sum=1e4)
# Use healthy samples as reference domain and deconvolve the remaining samples
healthy_ids = sample_sheet.loc[sample_sheet["disease"] == "healthy", "SampleID"]
bulk = normalize_bulk_to_cpm(bulk)
healthy_bulk = bulk.loc[:, healthy_ids]
bulk = bulk.drop(columns=healthy_ids)
common_genes = adata.var_names.intersection(bulk.index).intersection(healthy_bulk.index)
adata = adata[:, common_genes].copy()
# Reduce to the most informative genes (for real data we recommend 5000 genes)
adata = reduce_genes(adata, 1000, ct_col="cell_type")
healthy_bulk = healthy_bulk.loc[adata.var_names]
bulk = bulk.loc[adata.var_names]
# 2. Create reference profiles and hierarchy (single layer example)
X_sub = create_reference(adata, celltype_col="cell_type")
A_l = [pd.DataFrame(np.eye(X_sub.shape[1]), index=X_sub.columns, columns=X_sub.columns)]
X_l = [X_sub]
# 3. Simulate training bulks (for real data we recommend at least 10000 bulks)
Y_train, C_train = create_bulks(adata, n_bulks=5000, n_cells_per_bulk=100, celltype_col="cell_type")
# 4. Initialize and train model
hide = HIDE(X_l, A_l)
hide.train(Y_train, C_train, iter=1000)
# 5. Calculate domain-transfer factors from the healthy bulk reference
Y_domain, _ = create_bulks(
adata,
n_bulks=1000,
n_cells_per_bulk=100,
celltype_col="cell_type",
)
alpha = get_domain_transfer_factor(healthy_bulk, Y_domain)
alpha_inv = (1 / alpha).replace([np.inf, -np.inf], 0).fillna(1.0)
bulk = bulk.mul(alpha_inv, axis=0)
# 6. Deconvolution on the batch-corrected bulk data
results = hide.predict(
bulk.loc[hide.gene_labels],
norm=True,
library_sizes=library_sizes,
)["prediction"]
# 7. Optional: Difference in composition between medications
diff = run_kruskal_wallis(results[0], sample_sheet, sample_id_col="SampleID", cohort_col="medication")
Citation
If you use HIDE-deconv, please cite the following preprint.
HIDE-Deconv: A hierarchical deconvolution framework for multiscale characterization of cellular remodeling
Dennis Voelkl, Sarah Bolz, Austin Rayford, Thomas Stevenson, Thomas Sterr, Malte Mensching-Buhr, Nicole Seifert, Julia Arp, Cornelia Schuster, Jana Tausche, Laurenz Engel, Helena U. Zacharias, Michael Altenbuchinger, Franziska Görtler bioRxiv 2026.08.24.746754; doi: https://doi.org/10.64898/2026.08.24.746754
License
This project is licensed under the MIT License.
Contact
For questions, support or scientific collaboration:
- Dennis Voelkl: dennis.k.voelkl(at)uib.no
- Franziska Goertler: Franziska.Gortler(at)uib.no
Metadata
Release files for hide-deconv 0.4.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hide_deconv-0.4.5.tar.gz | 88.3 kB | With provenance | Details for hide_deconv-0.4.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hide_deconv-0.4.5-py3-none-any.whl | Python 3 | none | any | Details for hide_deconv-0.4.5-py3-none-any.whl |
Total release size: 204.7 kB
Release files / hide_deconv-0.4.5.tar.gz
| Download URL | hide_deconv-0.4.5.tar.gz |
|---|---|
| Size | 88.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc4973bb7c602204e171d7a3e84ac089900c8c04675f0b071c9ad446b2df2306
|
|
BLAKE2b-256 checksum How to use checksums |
f5a02a123f28a7ecb083e26247d54e6066b1827dd4ebcace034bcb11d6cd7ea5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / hide_deconv-0.4.5-py3-none-any.whl
| Download URL | hide_deconv-0.4.5-py3-none-any.whl |
|---|---|
| Size | 116.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03d6f270e0efee80c7fbc7c6c6a8817d0ce1935e2cd1ca6d2b202f8dc5911c7c
|
|
BLAKE2b-256 checksum How to use checksums |
3b33db7621fcdc2af3420e0bf4799116a58114c613667e9ceaafd43c225ed7df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for hide-deconv 0.4.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hide_deconv-0.4.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.