squidpy-GPU: gr#

squidpy.gr is a tool for the analysis of spatial molecular data [PSK+22]. rapids_singlecell.gr accelerates some of these functions.

gr.spatial_neighbors_knn(adata, *[, ...])

Build a directed kNN graph from adata.obsm[spatial_key].

gr.spatial_neighbors_radius(adata, *, radius)

Connect observations within an inclusive radius.

gr.spatial_neighbors_delaunay(adata, *[, ...])

Build a Delaunay graph with Euclidean edge lengths.

gr.spatial_neighbors_grid(adata, *[, ...])

Build a lattice graph whose distances count shortest directed hops.

gr.spatial_neighbors_from_builder(adata, ...)

Build spatial graphs with a built-in or custom builder.

gr.SpatialNeighborsResult(connectivities, ...)

Spatial connectivity and distance matrices returned with copy=True.

gr.neighbors.GraphBuilder([transform, ...])

Base class for spatial graph construction strategies.

gr.neighbors.GraphBuilderCSR([transform, ...])

CuPy CSR strategy that builds from finite float32 coordinates.

gr.neighbors.KNNBuilder([n_neighs, ...])

Connect each observation to its n_neighs nearest other observations.

gr.neighbors.RadiusBuilder(radius[, ...])

Connect observations within a radius or an inclusive (min, max) interval.

gr.neighbors.DelaunayBuilder([radius, ...])

Connect Delaunay neighbors; a scalar radius prunes to (0, radius).

gr.neighbors.GridBuilder([n_neighs, ...])

Build a lattice graph whose distances count shortest directed grid hops.

gr.neighbors.DistanceIntervalPostprocessor(...)

Prune distances outside an inclusive interval, keeping the adjacency diagonal.

gr.neighbors.PercentilePostprocessor(percentile)

Prune distances above a percentile of all stored distances, including zeros.

gr.neighbors.TransformPostprocessor([transform])

Remove stored zeros, then apply a spectral or cosine connectivity transform.

gr.spatial_autocorr(adata, *[, table_key, ...])

Calculate spatial autocorrelation for genes in an AnnData object.

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

Compute co-occurrence probability of clusters.

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

Calculate Ripley's statistics for point processes.

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

Identify spatially variable genes with Sepal.

gr.interaction_matrix(adata, cluster_key, *)

Compute the interaction matrix for clusters.

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

Compute neighborhood enrichment by permutation test.

gr.NhoodEnrichmentResult(zscore, counts)

Result of nhood_enrichment().

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

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

gr.calculate_niche(adata, *[, table_key, ...])

Compute spatial niches on the GPU.

gr.calculate_niche_neighborhood(adata, *[, ...])

Compute spatial niches from cell-type neighborhood profiles on the GPU.

gr.calculate_niche_utag(adata, *[, ...])

Compute spatial niches from UTAG-smoothed expression on the GPU.

gr.calculate_niche_cellcharter(adata, *[, ...])

Compute spatial niches with the CellCharter approach on the GPU.