R reference

Normalisation

HumanDLPFC Human dorsolateral prefrontal cortex (DLPFC) visium sample
SpaNorm Spatially-dependent normalisation for spatial transcriptomics data
SpaNormFit An S4 class to store a SpaNorm model fit

SVGs and PCA

getSVGResults Get SVG results from a SpatialExperiment object
SpaNormPCA GLM-based (SpaNorm) PCA
SpaNormSVG Model-based spatially variable gene (SVG) calling
topSVGs Export top SVG results to a data frame

Polishing

isPolished Does a SpaNormFit carry a converged per-gene polish?
nbBlockDesign A design with a per-group block, in compact form
nbMuFloor The floor on a fitted negative binomial mean
nbNewtonSolver Penalised NB Newton solvers and batched grams (for package developers)
nbProfilePsi Profile-ML dispersion at fixed coefficients, blocked over genes
polishNB Converge every gene of a shared negative binomial fit to its own optimum
polishSpaNorm Converge each gene of a SpaNorm fit to its own optimum

Model fitting and helpers

calculateMu Compute fitted means from a negative binomial GLM fit
fastSizeFactors Filter genes based on expression
filterGenes Filter genes based on expression
fitNB Fit a per-gene negative binomial GLM
nbDevianceMoments First two moments of the NB unit deviance, by direct summation
nbUnitDeviance NB unit deviance
qlDispersion Per-gene quasi-likelihood dispersion
qlMomentTable A shared table of NB deviance moments
tpsBasis Thin-plate-style tensor spline basis over spatial coordinates

Plotting

plotCovariate Diagnostic plot of predicted expression for a covariate
plotSpatial Plot spatial transcriptomic annotations per spot

GPU and backend

add_vec_mat_gpu Broadcast-add a vector to a matrix, GPU-aware
checkGPU Is an accelerated (GPU) torch device in use?
diag_mat Build a diagonal matrix from a vector, GPU-aware
dnbinom_gpu Negative binomial density (mean/size parameterisation), GPU-aware
getBackendDevice Resolve the active torch backend device
getBackendDtype Resolve the active torch backend dtype
getGPUMemoryBudget Determine the accelerator memory budget for blocked fitting
gpuDtypeBytes Bytes per element for the active backend dtype
hasBadValues Does an object hold any NA/NaN/Inf?
invert_mat Invert a symmetric positive-definite matrix
invert_mat_batched Invert a batch of symmetric positive-definite matrices
is_torch_tensor Is an object a torch tensor?
matmul_gpu Tensor-aware matrix multiplication
mult_vec_mat_gpu Broadcast-multiply a vector and a matrix, GPU-aware
resetGPUCache Clear the cached GPU device/memory-budget state
rowSums_gpu Row sums, GPU-aware
setGPUMemoryBudget Set the accelerator memory budget for blocked fitting
tcrossprod_gpu Tensor-aware tcrossprod
toGPUMatrix Convert a matrix to a torch tensor on the active backend
toGPUVector Convert a vector to a torch tensor on the active backend
toRMatrix Convert a torch tensor (or R object) to a base R matrix