stereo.algorithm.spa_track.SpaTrack.get_ot_matrix¶
- SpaTrack.get_ot_matrix(data_type, alpha1=0.5, alpha2=0.5, spatial_key=None, n_pcs=50, pca_res_key=None)[source]¶
Calculate transfer probabilities between cells.
Using optimal transport theory based on gene expression and/or spatial location information.
- Parameters:
data_type (
str) – The type of sequencing data. * -spatial: for the spatial transcriptome data. * -single-cell: for the single-cell sequencing data.alpha1 (
int) – The proportion of spatial location information, defaults to 0.5.alpha2 (
int) – The proportion of gene expression information, defaults to 0.5.spatial_key (
Optional[str]) – The key to get position information of cells, by default, thedata.spatial_keywill be used.n_pcs (
int) – _description_, defaults to 50pca_res_key (
Optional[str]) – The number of used pcs to be calculated, defaults to None
The transfer matrix stored with the key
transindata.tl.result.