API

Contents

API#

Core#

Cellina(adata[, n_hidden, n_latent, ...])

Cellina model with dual encoders for counts and spatial data.

CellinaGCN(adata[, n_hidden, n_latent, ...])

Cellina model with dual encoders for counts (MLP) and spatial context (GCN).

Utilities#

compute_spatial_features(adata[, ...])

Compute spatial neighbourhood features and store them in adata.obsm.

make_counterfactual_adata(adata, ...[, ...])

Create a counterfactual AnnData keeping everything from the original except .obsm[spatial_column], which is replaced with counterfactual spatial neighbourhood features.

make_neighbor_perturbation(adata, perturbations)

Apply Node perturbations to neighbour expression and re-aggregate.

make_perturbed_expression(adata[, ...])

Apply Node perturbations to counts and store the result as a layer.

spatial_neighbors(adata[, bandwidth, ...])

Generate spatial connectivity weights using Euclidean distance.