cellink: a framework for joint analysis of genotype and single-cell data#
Single-cell profiles are indexed by cell; genotype data is indexed by donor. Keeping the two
correctly paired through subsetting and filtering is easy to get wrong by hand, and each
downstream genetics tool (PLINK, MAGMA, LDSC, TensorQTL, SAIGE-QTL, and more) expects its own
file formats and conventions. cellink provides a single DonorData structure that keeps
donor- and cell-level data synchronized, and the glue to drive that surrounding tool
ecosystem directly from it.
Key Features#
1. Unified DonorData structure#
cellink introduces the DonorData class, unifying individual-level and single-cell data. It extends standard formats (AnnData, MuData) with GenoAnnData for efficient genotype (via dask) and phenotype (via ehrapy) handling.
Donor-level Data (G):
GenoAnnData, Stores individual level data such as genotypes.Cell-level Data (C):
AnnData/MuData, Stores single-cell omics data such as gene expression.
Crucially, DonorData ensures that genetic data and single-cell modalities remain synchronized, preserving their donor-cell pairing even through complex filtering operations (e.g., selecting specific cell types or patient subsets). See the DonorData on-disk format for how this is represented on disk and how to check a DonorData object against it.
2. Comprehensive toolkit#
cellink offers a streamlined suite of tools for the entire analysis workflow, organized by task:
Association testing
Heritability, gene programs & GWAS integration
Deep learning & representation learning
Scooby: single-cell-resolution sequence-to-coverage modeling & variant scoring
Built-in dataloaders for deep learning, including Multiple Instance Learning (MIL) over per-donor cell bags
Other
Variant preprocessing & annotation: quality control, annotation (VCF export/import), and selection of genetic variants.
Getting Started#
Install the latest development version directly from GitHub (cellink is not yet published
on PyPI; a future release will be published as cellink-tools, see the
installation guide for
optional extras and why):
pip install git+https://github.com/theislab/cellink.git@main
New to cellink? Start with DonorData basics: no analysis, just how to build a DonorData from your own genotype/expression data, slice it, and save it. From there, the Documentation section below is the map to everything else.
Documentation#
Requirements and every optional extra ( |
|
Step-by-step guides for every analysis workflow above |
|
Every public function and class, organized by module |
|
The versioned HDF5/Zarr schema, and how to check an object against it |
|
Dev setup, tests, and the PR workflow |
|
What changed in each release |
Contact#
If you found a bug, please use the issue tracker.