API
Alignment
|
Returns a mapping \(( \Pi = [\pi_{ij}] )\) between spots in one slice and spots in another slice while preserving gene expression and spatial distances of mapped spots, where \(\pi_{ij}\) describes the probability that a spot i in the first slice is aligned to a spot j in the second slice. |
|
Infers a "center" slice consisting of a low rank expression matrix \(X = WH\) and a collection of \(\pi\) of mappings from the spots of the center slice to the spots of each input slice. |
|
Computes the optimal mappings \(\Pi^{(1)}, \ldots, \Pi^{(t)}\) given W (specified features) and H (coefficient matrix) by solving the pairwise slice alignment problem between the center slice and each slices separately |
|
Finds two low-rank matrices ( W ) (feature matrix) and ( H ) (coefficient matrix) that approximate expression matrices of all slices by minimizing the following objective function: |
|
Computes a transport plan to align two weighted spatial distributions based on expression dissimilarity matrix and spatial distances, using the Gromov-Wasserstein framework. |
|
Solve the linesearch in the fused wasserstein iterations for partially overlapping slices |
Visualization
|
Align spatial coordinates of sequential pairwise slices. |
Align spatial coordinates of a list of slices to a center_slice. |
|
|
Plots slice spatial coordinates. |
Finds and applies optimal rotation between spatial coordinates of two layers (may also do a reflection). |
Model Selection
|
Generates a graph using the networkx library where each node represents a spot from the given slice object, and edges are formed between each node and its closest neighbors based on spatial distance. |
Computes the edge inconsistency score for a convex hull formed by the aligned spots |
|
Selects the optimal overlap fraction between two slices, a_slice and b_slice, using a pairwise alignment approach. |
Miscellaneous
|
Calculates the Kullback-Leibler divergence (KL) or generalized KL divergence between two distributions. |
|
Computes the distance between two distributions after reducing dimensionality using GLM-PCA. |
|
Computes pairwise distances between two distributions slices after dimensionality reduction using PCA. |
|
Computes the Kullback-Leibler (KL) divergence between two distribution using genes with highest UMI counts. |
|
Normalizes and centers spatial coordinates by subtracting the mean and scaling by the minimum pairwise distance |
|
Returns common genes from multiple slices |
Matches spatial coordinates between two datasets using either optimal transport or bipartite matching based on spatial proximity. |
|
|
Computes a dissimilarity matrix between two distribution using a specified metric. |