AnnData-native deep learning baselines for single-cell data.
Project description
scDLKit
Train, evaluate, compare, and visualize baseline deep-learning models for single-cell data without writing PyTorch from scratch.
Why scDLKit
- AnnData-native workflow for single-cell users.
- Baseline-first model zoo: AE, VAE, DAE, Transformer AE, and MLP classification.
- Built-in training, evaluation, comparison, and plotting.
- Reproducible reports and notebooks for portfolio-ready demonstrations.
- Extensible registry-based architecture for custom models and future tasks.
Supported platforms
- Linux: supported
- macOS: supported
- Windows: supported
Installation
Primary public install path:
python -m pip install scdlkit
Optional extras:
python -m pip install "scdlkit[scanpy]"
python -m pip install "scdlkit[notebook]"
python -m pip install "scdlkit[dev,docs]"
Quickstart
Smallest package-level run:
import numpy as np
import pandas as pd
from anndata import AnnData
from scdlkit import TaskRunner
X = np.random.rand(120, 32).astype("float32")
obs = pd.DataFrame({"cell_type": ["T-cell"] * 60 + ["B-cell"] * 60})
adata = AnnData(X=X, obs=obs)
runner = TaskRunner(
model="vae",
task="representation",
latent_dim=8,
epochs=5,
batch_size=16,
label_key="cell_type",
)
runner.fit(adata)
metrics = runner.evaluate()
runner.plot_losses()
Repo examples
If you cloned the repository, the easiest end-to-end demo is:
python examples/first_run_synthetic.py
This writes a report, checkpoint, loss curve, and latent PCA plot to artifacts/first_run/.
If you want the beginner notebook after cloning the repo:
python -m pip install "scdlkit[notebook]"
jupyter notebook examples/first_run_synthetic.ipynb
The heavier notebooks still need Scanpy:
python -m pip install "scdlkit[scanpy]"
Optional contributor Conda environment
Conda is kept for contributors and demos. It is not the primary public install path for v0.1.0.
Official installers:
- Miniconda install guide: https://www.anaconda.com/docs/getting-started/miniconda/install
- Anaconda Distribution download: https://www.anaconda.com/download
From the repo root:
conda env create -f environment.yml
conda activate scdlkit
Core APIs
High-level:
from scdlkit import TaskRunner
Lower-level:
from scdlkit import Trainer, create_model, prepare_data
Comparison:
from scdlkit import compare_models
benchmark = compare_models(
adata,
models=["autoencoder", "vae", "transformer_ae"],
task="representation",
shared_kwargs={"epochs": 10, "label_key": "cell_type"},
output_dir="artifacts/compare",
)
Supported models
autoencodervaedenoising_autoencodertransformer_aemlp_classifier
Supported tasks
representationreconstructionclassification
Documentation
Project documentation is configured for GitHub Pages with MkDocs Material:
- Docs site: https://uddamvathanak.github.io/scDLKit/
- API reference:
docs/api.md - Example notebooks:
examples/
GitHub Pages setup
The docs workflow expects GitHub Pages to be enabled once at the repository level.
- Open
Settings -> Pagesfor this repo:https://github.com/uddamvathanak/scDLKit/settings/pages - Under
Build and deployment, setSourcetoGitHub Actions. - Save the setting.
- Re-run the
docsworkflow.
Without that one-time setting, GitHub returns a 404 when actions/configure-pages or actions/deploy-pages tries to access the Pages site.
Optional automatic Pages enablement
If you want the workflow to bootstrap Pages automatically instead of doing the one-time manual setup:
- Create a repository secret named
PAGES_ENABLEMENT_TOKEN. - Use a Personal Access Token with
reposcope or Pages write permission. - Re-run the
docsworkflow.
Release flow
- Stage to TestPyPI first with
release-testpypi.yml. - Publish the final release from a
v*tag withrelease.yml. - Use trusted publishing instead of long-lived PyPI API tokens.
- See
RELEASING.mdfor the full checklist.
Examples
examples/first_run_synthetic.ipynbis the easiest notebook walkthrough.examples/first_run_synthetic.pyis the easiest script walkthrough.examples/train_vae_pbmc.ipynbexamples/compare_models_pbmc.ipynbexamples/classification_demo.ipynb
Roadmap
v0.1
- Expanded core workflow with training, evaluation, reporting, and plotting.
- Staged TestPyPI and PyPI publishing.
- Cross-platform smoke validation and reproducible notebooks.
v0.2
- CLI and YAML config support.
- Graph-based models and richer benchmarking helpers.
- More task-specific extensions.
Citation
If you use scDLKit, cite the software entry in CITATION.cff.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scdlkit-0.1.0.tar.gz.
File metadata
- Download URL: scdlkit-0.1.0.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80121e794f7ed848ed73e0b5da3c69a1cec46b4db3a2c49fa1cd5ef5bc1fae93
|
|
| MD5 |
7d5a7c367643924e6cb935bf174f0fbf
|
|
| BLAKE2b-256 |
ada4fc1bf52fb44069e0975356d880ef2b89d9d58d80e3fa5ee894a9fab3b69d
|
Provenance
The following attestation bundles were made for scdlkit-0.1.0.tar.gz:
Publisher:
release.yml on uddamvathanak/scDLKit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scdlkit-0.1.0.tar.gz -
Subject digest:
80121e794f7ed848ed73e0b5da3c69a1cec46b4db3a2c49fa1cd5ef5bc1fae93 - Sigstore transparency entry: 1096647042
- Sigstore integration time:
-
Permalink:
uddamvathanak/scDLKit@ef41952c91032eb63f10cc6e2b0fd846dab4c142 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/uddamvathanak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ef41952c91032eb63f10cc6e2b0fd846dab4c142 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scdlkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scdlkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bdcde3dfdb50b60d35b681b21a5ca5653f26003671ea43ff6f7c21dd852c7a1
|
|
| MD5 |
125515f0aae3a8dac4dafabd2d84b8cb
|
|
| BLAKE2b-256 |
db4c449655c164ca5644a14d515ba461ffcd69e0a289dfed6572cb21945ed6a2
|
Provenance
The following attestation bundles were made for scdlkit-0.1.0-py3-none-any.whl:
Publisher:
release.yml on uddamvathanak/scDLKit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scdlkit-0.1.0-py3-none-any.whl -
Subject digest:
8bdcde3dfdb50b60d35b681b21a5ca5653f26003671ea43ff6f7c21dd852c7a1 - Sigstore transparency entry: 1096647045
- Sigstore integration time:
-
Permalink:
uddamvathanak/scDLKit@ef41952c91032eb63f10cc6e2b0fd846dab4c142 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/uddamvathanak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ef41952c91032eb63f10cc6e2b0fd846dab4c142 -
Trigger Event:
push
-
Statement type: