Skip to main content

scINTILLA

PyPI Tests Docs Codecov Preprint Licence

Single-Cell INTegrated Inference, Labelling, and Landscape Analysis.

Cell-type labels in a single-cell RNA-seq dataset are rarely checked. scINTILLA scores each label by how well it can be recovered from the expression data. An unsupervised arm clusters the cells with a panel of algorithms and measures neighbourhood confusion and fragmentation; a supervised arm trains classifiers and measures their agreement, entropy and confidence. A low score marks a label that hides several populations or has been applied inconsistently, which makes it a good place to look first.

Around that core the package benchmarks the methods used at each stage of an analysis (normalisation, feature selection, dimensionality reduction, clustering, classification, differential expression, annotation and batch correction), reporting bootstrap intervals, effect sizes and rank aggregation so that you can tell whether a difference between two methods is real.

scINTILLA works on AnnData and follows the scanpy conventions (pp, tl, pl, key_added, copy, random_state), so it fits into an existing scverse workflow. The method is described in the preprint.

Installation

The package is published on PyPI as scintilla-py. The import name and the command-line tool are both scintilla; the PyPI project called scintilla is an unrelated package. Python 3.11 or newer is required.

pip install scintilla-py            # core
pip install "scintilla-py[full]"    # with the optional methods listed below

With uv, either add it to an analysis project or install into an existing environment:

uv add "scintilla-py[full]"
uv pip install "scintilla-py[full]"

To work on the code, clone the repository and let uv build the environment from the lock file:

git clone https://github.com/soumickmj/scINTILLA.git
cd scINTILLA
uv sync --locked --extra full --extra test
uv run pytest

Optional methods

The core install covers PCA, the main clustering methods (k-means, hierarchical, DBSCAN, spectral), the classifiers in scikit-learn, differential expression, annotation, and ComBat. The full extra adds the methods that need a further package. A benchmark leaves out any method whose package is missing.

Package What it enables
leidenalg, python-igraph Leiden clustering and graph layouts
louvain Louvain clustering
hdbscan HDBSCAN clustering
umap-learn UMAP
harmonypy, bbknn, scanorama Harmony, BBKNN and Scanorama batch correction
xgboost, lightgbm Gradient-boosted classifiers
shap SHAP feature importance
Boruta, mrmr-selection Boruta and mRMR feature selection
scikit-misc The Seurat v3 highly variable gene method (the default)
scikit-posthocs Dunn's post-hoc test (also the stats extra)
mudata Reading .h5mu files
kneed, psutil Automatic DBSCAN eps and memory profiling

Quick start

The shortest route is the label-quality score, shown here on a small example dataset that ships with scanpy:

import scanpy as sc
import scintilla as si

adata = sc.datasets.pbmc68k_reduced()
scores = si.tl.label_quality(adata, cell_type_col="bulk_labels", fast=True)
scores["scintilla_composite_frag_silhouette"].nsmallest(5)   # the labels to review first

The result has one row per label. Every score is oriented so that higher means a better label, and the documentation explains what each variant measures and how it was validated. The same analysis runs from the command line:

scintilla label-quality data.h5ad --cell-type-col cell_type --output scores.csv

A fuller analysis

The individual steps can also be run one at a time. Raw counts stay in adata.X; each transformation writes a layer, and everything else is stored under a name you choose with key_added:

adata = si.io.load_h5ad("data/pbmc3k.h5ad")                 # or .csv / .h5mu via si.io.auto_detect_format

si.pp.log_shift_size_factor(adata)                          # writes adata.layers["log_shift_size_factor"]
adata.X = adata.layers["log_shift_size_factor"]
si.pp.pca(adata, n_comps=30)                                # adata.obsm["X_pca"]

clustering = si.tl.unsupervised_analysis(adata, cell_type_col="cell_type")
print(clustering["best_method"])                            # best labels: adata.obs["scintilla_cluster"]

classification = si.tl.supervised_analysis(adata, target_col="cell_type")
print(classification["best_model_name"])

Three presets control how much work is done. AnalysisConfig.fast() runs a few quick methods, AnalysisConfig() is the default panel, and AnalysisConfig.robust() adds bootstrap confidence intervals, rank aggregation and adaptive settings for publication-quality comparisons:

cfg = si.AnalysisConfig.robust()
clustering = si.tl.unsupervised_analysis(adata, cell_type_col="cell_type", config=cfg)

A configuration can be written to YAML with scintilla generate-config and passed back with --config. The whole pipeline is also available as a single command:

scintilla run-all data/pbmc3k.h5ad --target-col cell_type --output-dir results/
scintilla run-all data/pbmc3k.h5ad --target-col cell_type --fast --output-dir results/

What is in the package

Namespace Contents
si.pp Fourteen normalisations and transformations, PCA (with Gavish-Donoho and Marchenko-Pastur rules for the number of components), highly variable genes, batch correction (ComBat, Harmony, BBKNN, Scanorama)
si.tl k-means, hierarchical, DBSCAN, HDBSCAN, spectral, Leiden, Louvain and consensus clustering; UMAP, t-SNE, diffusion maps and force-directed layouts; classifiers; label quality; differential expression (Wilcoxon, t, permutation, pseudobulk, scanpy's rank_genes_groups); marker-based annotation, label transfer and over-representation analysis
si.pl Plots for every benchmark and for label quality
si.benchmark Benchmarks for normalisation, clustering, classifiers, feature selection, embeddings, differential expression and batch correction, plus seed-stability and scalability tests
si.stats Bootstrap and permutation tests, effect sizes, multiple-testing correction, rank aggregation, ANOVA, Kruskal-Wallis, Box's M and Dunn's test
si.eda and si.io Dataset summaries; reading and writing .h5ad, CSV and .h5mu

Every analysis function accepts a dense or a sparse matrix. A few steps cannot avoid building a dense array (some classifiers, the per-gene tests and hierarchical clustering among them); scINTILLA warns before allocating more than si.settings.dense_warning_gb (4 GiB by default), and the usual remedy is to work on a PCA representation with use_rep="X_pca". The manual says which functions are affected.

Documentation

Citation

If you use scINTILLA, please cite the preprint (see also CITATION.cff):

Kanannejad S, Bongiorni N, Nordera E, Redaelli S, Rusconi I, Zanin R, Giustacchini A, Chatterjee S. scINTILLA: Single-Cell Integrated Inference, Labelling, and Landscape Analysis for Cell-Type Annotation Quality Assessment. bioRxiv (2026). doi:10.64898/2026.07.27.740477

Licence

Apache-2.0. See LICENSE.

Metadata

Release files for scintilla-py 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scintilla-py 0.2.1
File Size Uploaded Provenance Actions
scintilla_py-0.2.1.tar.gz 264.4 kB With provenance Details for scintilla_py-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scintilla-py 0.2.1
File Interpreter ABI Platform Actions
scintilla_py-0.2.1-py3-none-any.whl Python 3 none any Details for scintilla_py-0.2.1-py3-none-any.whl

Total release size: 488.2 kB

Release files / scintilla_py-0.2.1.tar.gz

Download URL scintilla_py-0.2.1.tar.gz
Size 264.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2e59a937fb1cdb0128cf3c4af2574725e452aeec06928b26770e2bc07f2fb9bd
BLAKE2b-256 checksum
How to use checksums
2e307e89786d753b29f23bc2bb6b3b54272db9dbd5b163b6f7e98446e1cbe5ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 9, 2026.

Transparency log

Release files / scintilla_py-0.2.1-py3-none-any.whl

Download URL scintilla_py-0.2.1-py3-none-any.whl
Size 223.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6b94fde4f4751dd9569180474b5360e847ab2b91cbf35fc340f5266210ce017
BLAKE2b-256 checksum
How to use checksums
b2a8a1699cb27c7d571017e4414fd65647869ac8caa78aa7cc02afc37a61c556
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 9, 2026.

Transparency log

Security for scintilla-py 0.2.1

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.

Select from 2 files

Attestation for scintilla_py-0.2.1.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 Oct 9, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page