spateo.external.STAGATE_pyG.utils¶
Functions¶
|
|
|
|
|
Construct the spatial neighbor networks. |
|
Construct the spatial neighbor networks. |
|
|
|
Clustering using the mclust algorithm. |
Module Contents¶
- spateo.external.STAGATE_pyG.utils.Batch_Data(adata, num_batch_x, num_batch_y, spatial_key=['X', 'Y'], plot_Stats=False)[source]¶
- spateo.external.STAGATE_pyG.utils.Cal_Spatial_Net(adata, rad_cutoff=None, k_cutoff=None, model='Radius', verbose=True)[source]¶
Construct the spatial neighbor networks.
- Parameters:
- adata
AnnData object of scanpy package.
- rad_cutoff
radius cutoff when model=’Radius’
- k_cutoff
The number of nearest neighbors when model=’KNN’
- model
The network construction model. When model==’Radius’, the spot is connected to spots whose distance is less than rad_cutoff. When model==’KNN’, the spot is connected to its first k_cutoff nearest neighbors.
- Return type:
The spatial networks are saved in adata.uns[‘Spatial_Net’]
- spateo.external.STAGATE_pyG.utils.Cal_Spatial_Net_3D(adata, rad_cutoff_2D, rad_cutoff_Zaxis, key_section='Section_id', section_order=None, verbose=True)[source]¶
Construct the spatial neighbor networks.
- Parameters:
- adata
AnnData object of scanpy package.
- rad_cutoff_2D
radius cutoff for 2D SNN construction.
- rad_cutoff_Zaxis
radius cutoff for 2D SNN construction for consturcting SNNs between adjacent sections.
- key_section
The columns names of section_ID in adata.obs.
- section_order
The order of sections. The SNNs between adjacent sections are constructed according to this order.
- Return type:
The 3D spatial networks are saved in adata.uns[‘Spatial_Net’].