API

Import Squidpy as:

import squidpy as sq

Graph

gr.spatial_neighbors(adata[, spatial_key, …])

Create a graph from spatial coordinates.

gr.nhood_enrichment(adata, cluster_key[, …])

Compute neighborhood enrichment by permutation test.

gr.co_occurrence(adata, cluster_key[, …])

Compute co-occurrence probability of clusters.

gr.centrality_scores(adata, cluster_key[, …])

Compute centrality scores per cluster or cell type.

gr.interaction_matrix(adata, cluster_key[, …])

Compute interaction matrix for clusters.

gr.ripley(adata, cluster_key[, mode, …])

Calculate various Ripley’s statistics for point processes.

gr.ligrec(adata, cluster_key[, …])

Perform the permutation test as described in [Efremova et al., 2020].

gr.spatial_autocorr(adata[, …])

Calculate Global Autocorrelation Statistic (Moran’s I or Geary’s C).

gr.sepal(adata, max_neighs[, genes, n_iter, …])

Identify spatially variable genes with Sepal.

Image

im.process(img[, layer, library_id, method, …])

Process an image by applying a transformation.

im.segment(img[, layer, library_id, method, …])

Segment an image.

im.calculate_image_features(adata, img[, …])

Calculate image features for all observations in adata.

Plotting

pl.nhood_enrichment(adata, cluster_key[, …])

Plot neighborhood enrichment.

pl.centrality_scores(adata, cluster_key[, …])

Plot centrality scores.

pl.interaction_matrix(adata, cluster_key[, …])

Plot cluster interaction matrix.

pl.ligrec(adata[, cluster_key, …])

Plot the result of a receptor-ligand permutation test.

pl.ripley(adata, cluster_key[, mode, …])

Plot Ripley’s statistics for each cluster.

pl.co_occurrence(adata, cluster_key[, …])

Plot co-occurrence probability ratio for each cluster.

pl.extract(adata[, obsm_key, prefix])

Create a temporary anndata.AnnData object for plotting.

Datasets

datasets.four_i([path])

Pre-processed subset 4i dataset from Gut et al.

datasets.imc([path])

Pre-processed subset IMC dataset from Jackson et al.

datasets.seqfish([path])

Pre-processed subset seqFISH dataset from Lohoff et al.

datasets.merfish([path])

Pre-processed MERFISH dataset from Moffitt et al.

datasets.mibitof([path])

Pre-processed MIBI-TOF dataset from Hartmann et al.

datasets.slideseqv2([path])

Pre-processed SlideseqV2 dataset from Stickles et al.

datasets.sc_mouse_cortex([path])

Pre-processed scRNA-seq mouse cortex.

datasets.visium_hne_adata([path])

Pre-processed 10x Genomics Visium H&E dataset.

datasets.visium_hne_adata_crop([path])

Pre-processed subset 10x Genomics Visium H&E dataset.

datasets.visium_fluo_adata([path])

Pre-processed 10x Genomics Visium Fluorecent dataset.

datasets.visium_fluo_adata_crop([path])

Pre-processed subset 10x Genomics Visium Fluorescent dataset.

datasets.visium_hne_image([path])

H&E image from 10x Genomics Visium dataset.

datasets.visium_hne_image_crop([path])

Cropped H&E image from 10x Genomics Visium dataset.

datasets.visium_fluo_image_crop([path])

Cropped Fluorescent image from 10x Genomics Visium dataset.