API#
IO: io#
Tools for loading and saving Popari data and parameters.
|
Save Popari state as AnnData object. |
|
Load AnnData object from h5ad file and reformat for Popari. |
Model#
Entry points for implementations of the Popari algorithm.
|
Popari optimization model. |
|
Load trained Popari model for downstream analysis. |
Components#
Objects that are helpful for working with Popari.
|
Wrapper around AnnData object. |
Analysis: tl#
Functions for visualizing and evaluating Popari results.
|
Normalize embeddings per each cell. |
|
Compute Leiden clustering for all datasets. |
|
Compute adjusted Rand index (ARI) score between a set of ground truth labels and an unsupervised clustering. |
|
Compute silhouette score for a clustering based on Popari embeddings. |
|
Compute the empirical spatial correlation for a feature set across all datasets. |
|
Propagate a label from the most binned layer to the least binned layer. |
|
Run GSEA on metagenes from trained model. |
|
Identify genes/features that distinguish differential metagenes within a group. |
|
Plot metagene activation heatmaps for target genes across all groups. |
|
Plot metagene activation lineplots for target genes across all groups. |
|
|
|
Compute confusion matrix for labels and predictions. |
Plotting: pl#
Functions for visualizing and evaluating Popari results.
|
Plot a categorical label across all datasets in-situ. |
|
Plot all learned metagenes in-situ across all replicates. |
|
Plot a single metagene in-situ across all datasets. |
|
Plot 2D heatmap data across all datasets. |
|
Plot 2D heatmap data across all datasets. |
|
|
|
Plot enrichment of metagene signature across categories. |
|
Plot clusters to category correspondence, based on category marker gene expression. |
Simulation#
Tools to generate simulated (multisample) spatially-resolved transcriptomics, or (m)SRT.
Container for simulation parameters. |
|
|
Simulated spatial transcriptomics dataset. |
Synthetic multireplicate dataset to model biological variation and batch effects in spatial transcriptomics data. |