Skip to main content

cellink


Build License Read the Docs Test PyPI pre-commit

cellink bridges donor genotypes and single-cell profiles for end-to-end single-cell genetics

cellink brings single-cell data together with the genomes of the donors the cells come from. It reads genotypes from VCF, PLINK, BGEN and PGEN files, keeps them paired with the cells of the same donors through every selection, and runs genetic analyses on both. Established tools such as PLINK, tensorQTL, SAIGE-QTL, LDSC and MAGMA run directly on your data, and cellink takes care of the file formats and conventions each of them expects.

cellink overview

Data

cellink works on DonorData objects, which link the cells of a cohort to their donors. In cellink the donor level dd.D holds the genotypes, with one row per donor and one column per variant, and dd.C holds the cells as an AnnData or MuData. Selecting donors, variants or cells keeps both levels aligned, so genotypes and expression always describe the same people.

import cellink as cl

genotypes = cl.io.read_plink("cohort")
dd = cl.DonorData(D=genotypes, C=adata, donor_id="individual")
dd = dd[..., dd.C.obs["cell_type"] == "CD4 T", :]
cl.io.write_dd(dd, "cohort.dd.zarr")

DonorData is imported from the DonorData package and is installed with cellink. The DonorData documentation explains how these objects are built and stored, and how to add a sample level or the electronic health records of the donors.

Analyses

Association testing

Heritability, gene programs and GWAS integration

Deep learning

Variants

Getting started

Install cellink from PyPI, where it is published as cellink-tools. This also installs DonorData:

pip install cellink-tools

To install the development version from GitHub instead:

pip install git+https://github.com/theislab/cellink.git@main

The installation guide lists the optional extras for the external tools. If you are new to cellink, start with DonorData basics, which reads genotype files into an object, subsets it and saves it without running any analysis.

Documentation

Installation guide Requirements and the optional extras (pip install 'cellink-tools[extra-name]')
Tutorials Step by step guides for the analyses above
API reference Every public function and class, organized by module
DonorData documentation The DonorData object, its sample level and its file format
Contributing guide Development setup, tests and the pull request workflow
Changelog What changed in each release

Contact

If you found a bug, please use the issue tracker.

Release notes

t.b.a

Citation

t.b.a

Metadata

Release files for cellink-tools 0.1.0

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

Source distribution (sdist)

Source distribution for cellink-tools 0.1.0
File Size Uploaded Provenance Actions
cellink_tools-0.1.0.tar.gz 4.6 MB With provenance Details for cellink_tools-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cellink-tools 0.1.0
File Interpreter ABI Platform Actions
cellink_tools-0.1.0-py3-none-any.whl Python 3 none any Details for cellink_tools-0.1.0-py3-none-any.whl

Total release size: 4.9 MB

Security for cellink-tools 0.1.0

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

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