Python reference
Normalisation
Fit the SpaNorm model and return normalised data.
| spanorm | Spatially-dependent normalisation of spatial transcriptomics counts (R SpaNorm). |
SVG & PCA
Spatially variable genes and GLM-based PCA.
| spanorm_svg | Model-based spatially variable gene (SVG) calling (R SpaNormSVG). |
| top_svgs | The top SVGs from :func:spanorm_svg (R topSVGs). |
| spanorm_pca | GLM-based (SpaNorm) PCA (R SpaNormPCA). |
Polishing
Per-gene convergence of a fitted model.
| polish_spanorm | Converge each gene of a SpaNorm fit to its own optimum (R polishSpaNorm). |
| polish_nb | Converge every gene of a shared NB fit to its own optimum (R polishNB). |
| nb_profile_psi | Profile-ML dispersion at fixed coefficients, blocked over genes (R nbProfilePsi). |
| nb_mu_floor | The floor on a fitted negative binomial mean, exp(-30) (R nbMuFloor). |
| is_polished | Does the fit carry a per-gene polish (R isPolished)? |
Low-level
Building blocks for custom models.
| fit_nb | Fit a per-gene NB GLM over an arbitrary design (R fitNB). |
| calculate_mu | Fitted means exp(gmean + alpha @ W.T + offset) with optional row winsorisation. |
| filter_genes | Flag genes expressed in at least prop of the spots. |
| fast_size_factors | Library-size factors (R fastSizeFactors), written to obs["spanorm_size_factors"]. |
Plotting
| pl.plot_spatial | Plot spots at their spatial coordinates (R plotSpatial). |
| pl.plot_covariate | Spatially plot the library-size, biology or batch effect modelled for a gene (R plotCovariate). |
| pl.covariate_values | log2 fitted mean of one covariate, spots x genes (R normaliseMeanBio/LS/Batch at scale 1). |
Backend
Package-wide settings.
| settings |