Skip to main content

PyPI Downloads

chrysalis is a powerful and lightweight method designed to identify and visualise tissue compartments in spatial transcriptomics datasets, all without the need for external references. chrysalis achieves this by identifying spatially variable genes (SVGs) through spatial autocorrelation. It then employs dimensionality reduction and archetypal analysis to locate extremal points in the low-dimensional feature space, which represent pure tissue compartments. Each observation (i.e. capture spot) in the gene expression matrix is subsequently represented as a proportion of these distinct compartments. chrysalis features a unique approach based on maximum intensity projection, allowing the simultaneous visualization of diverse tissue compartments. Moreover, it seamlessly integrates into scanpy based pipelines.

If you like chrysalis, consider citing our preprint.

chrysalis can define distinct tissue compartments and cellular niches with specific gene expression signatures, highlighted with specific colors. For instance, in the V1_Human_Lymph_Node dataset, chrysalis identifies various regions, such as germinal centers (yellow), B cell follicles (dark orange), and T cell compartments (lime). You can find more examples in the gallery section.

Package

chrysalis can be used with any pre-existing anndata snapshot of 10X Visium, Slide-seqV2 and Stereo-seq datasets generated with scanpy, and on new samples without the need of preprocessing. It is designed to be as lightweight as possible, however currently it relies on libpysal for its fast implementation of Moran's I.

chrysalis requires the following packages:

  • numpy
  • pandas
  • matplotlib
  • scanpy
  • pysal
  • archetypes
  • scikit_learn
  • scipy
  • tqdm
  • seaborn

To install chrysalis:

pip install chrysalis-st

Documentation, Tutorials and API details

User documentation is available on: https://chrysalis.readthedocs.io/

Basic tutorials covering the main functionality of chrysalis are available on the documentation site.

Usage

import chrysalis as ch
import scanpy as sc
import matplotlib.pyplot as plt

adata = sc.datasets.visium_sge(sample_id='V1_Human_Lymph_Node')

sc.pp.calculate_qc_metrics(adata, inplace=True)
sc.pp.filter_cells(adata, min_counts=6000)
sc.pp.filter_genes(adata, min_cells=10)

ch.detect_svgs(adata)

sc.pp.normalize_total(adata, inplace=True)
sc.pp.log1p(adata)

ch.pca(adata)

ch.aa(adata, n_pcs=20, n_archetypes=8)

ch.plot(adata)
plt.show()

Reference

Chrysalis: decoding tissue compartments in spatial transcriptomics with archetypal analysis
Demeter Turos, Jelica Vasiljevic, Kerstin Hahn, Sven Rottenberg, Alberto Valdeolivas
doi: https://doi.org/10.1101/2023.08.17.553606

Metadata

Release files for chrysalis-st 0.2.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 chrysalis-st 0.2.0
File Size Uploaded Provenance
chrysalis_st-0.2.0.tar.gz 16.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for chrysalis-st 0.2.0
File Interpreter ABI Platform
chrysalis_st-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.6 kB

Release files / chrysalis_st-0.2.0.tar.gz

Download URL chrysalis_st-0.2.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c9f83fe788e52c3686c52df5a17be81fb4710551b491f4bda5e3c8ef6ebd55ef
BLAKE2b-256 checksum
How to use checksums
d508ed838b32baf68c563e89c02696f27b9381ddafdbb11ce7cc8deba5687efe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.13

Release files / chrysalis_st-0.2.0-py3-none-any.whl

Download URL chrysalis_st-0.2.0-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ee7754a9817191b5226901fad1cbebc84e78a5989c7d801ba7eb227b65946d9
BLAKE2b-256 checksum
How to use checksums
06add81f1f3869458e61915b1bf632734086a99eea86cd16295edc6b93fed281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.13

Security for chrysalis-st 0.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.0 This release

2 release files No 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