API overview
Import chrysalis as:
import chrysalis as ch
Core functions
Identifying spatially variable genes, dimensionality reduction, archetypal analysis.
Main functions required to identify tissue compartments.
|
Calculate spatial autocorrelation (Moran's I) to define spatially variable genes. |
|
Perform PCA (Principal Component Analysis) to calculate PCA coordinates, loadings, and variance decomposition. |
|
Run archetypal analysis on the low-dimensional embedding. |
Plotting
Visualization module.
Tissue compartments
Visualizations to examine the identified compartments in the tissue space.
|
Visualize tissue compartments using MIP (Maximum Intensity Projection). |
|
Visualize multiple samples from an AnnData object integrated with chrysalis.integrate_adatas in a single figure. |
|
Visualize individual tissue compartments. |
|
Visualize all compartments as individual subplots. |
Quality control
Plot quality control metrics to determine the correct number of spatially variable genes or PCs (Principal Components).
|
Plot the explained variance of the calculated PCs (Principal Components). |
|
Plot a rank-order chart displaying the Moran's I values. |
Compartment-associated genes
Generate a visualization of the top-contributing genes for each tissue compartment.
|
Plot heatmap showing the weights of spatially variable genes for each identified tissue compartment. |
|
Plot 20 top genes for each tissue compartment. |
Utility functions
Sample interation, spatially variable gene contributions.
|
Integrate multiple samples stored in AnnData objects. |
|
Integrate data using harmonypy, the Python implementation of the R package Harmony. |
|
Get spatially variable gene weights/expression values as a pandas DataFrame. |