Skip to main content

Powerful and lightweight package to identify tissue compartments in spatial transcriptomics datasets.

Project description

chrysalis is a spatial domain detection and visualization tool that generates neat and meaningful visual representations of spatial transcriptomics datasets. It achieves this by leveraging PCA, archetypal analysis and spatially variable gene detection. Moreover, it seamlessly integrates into scanpy based pipelines.

By combining PCA with AA, chrysalis can define distinct tissue compartments and cellular niches, which can be highlighted with specific colors. For instance, in the V1_Human_Lymph_Node dataset, chrysalis can identify and highlight 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

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()

Documentation and API details

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

Gallery

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

chrysalis_st-0.1.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

chrysalis_st-0.1.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file chrysalis_st-0.1.1.tar.gz.

File metadata

  • Download URL: chrysalis_st-0.1.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for chrysalis_st-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1e0c82f37d3c21670c9307c5a58b5ee5ab83fb0c89196ba6c6c287b6fe8ac10c
MD5 bdc5d7b591a6833cef33423929733eac
BLAKE2b-256 3b1b483d249e220c934d7b261e9786603bd379ff9763c899aa35ae36d39a06e6

See more details on using hashes here.

File details

Details for the file chrysalis_st-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: chrysalis_st-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for chrysalis_st-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0af3281536e57baf85d964796fdad7ff2554760962663b214a1e840ad40b1a0f
MD5 83e8f5eb27d8ba0fdcad2d11caa94220
BLAKE2b-256 b6941b6fdca668a15816eb8f68e07785e3e9fea22097857df1d03a9fd89cd3bf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page