tl

Spatial domain

tl.domain_from_unsupervised(adata[, ...])

Generate spatial domains using unsupervised learning methods.

tl.cal_aucell(adata, signatures[, ...])

AUCell scores were calculated for given gene lists.

tl.domain_from_local_moran(adata, score_key)

Using the local moran method generate the spatial domain.

tl.global_moran(adata[, score_labels, k, ...])

The global Moran index is calculated based on selected genes or indicators such as AUCell score.

Mask

tl.adata_from_mask(adata, mask[, location, ...])

Generate a new adata object through the selected mask region.

tl.get_mask_from_domain(adata, clusters, KSize)

A mask image is generated according to the selected category, and the mask can be processed using morphological methods such as dilation and erosion, removal of holes, and removal of small connected components

Spatial tendency

tl.ANOVA(adata, score_label[, cluster_label])

Anova of genes or other metrics

tl.wilcoxon_test(adata, mask, radius[, ...])

Wilcoxon tests were performed using the distance from each spot(cell) to the mask boundary and the expression of a gene(protein) at each spot.

tl.spearman_correlation(adata, mask, radius)

Spearman test was performed on the expression levels of genes in each class after the samples were classified equally by distance

tl.spatial_tendency(adata, mask, radius[, ...])

We used two regression methods, Loess regression, and Polynomial regression, to study the variation of the expression with the min distance from its location to the pixel of boundary.

tl.gene_cluster(adata, k[, norm, method, ...])

The regression curves of multiple genes are clustered, and the curves can be screened by adjusting a variety of indicators

tl.cal_spatialDE(adata[, gene_name, ...])

Calculate SpatialDE analysis on spatial omics data.

tl.cal_sparkX(adata[, gene_name, num_core, ...])

Calculate SPARK-X analysis on spatial omics data.

tl.cal_spark(adata[, gene_name, method, ...])

Perform SPARK analysis on spatial omics data.

Cell type proximity

tl.neighborhood_analysis(adata[, method, ...])

Compute neighborhood enrichment Z-score by permutation test.

tl.infiltration_analysis(adata[, ...])

The infiltration score was calculated by the infiltration of non-parenchymal cells into parenchymal cells.

Niche composition

tl.get_c_niche(adata, k_max[, niche_key, ...])

The C-niche is calculated using the cell type of the neighborhood.

Spatial communication

tl.lr_pairs([lr_data, Annotation_key, ...])

Class for ligand and receptor pairs

tl.cell_level_communications(adata, lr_pairs)

A permutation test of ligand-receptor expression across every spot.

tl.cell_type_level_communication(adata, lr_pairs)

Cell type ligand-receptor algorithm composed of two indexes: affinity and strength.

Tensor decomposition

tl.TensorDecomposition()

Function: