stlearn.spatial.sme.pseudo_spot¶
- stlearn.spatial.sme.pseudo_spot(adata: AnnData, tile_path: Path | str = PosixPath('/tmp/tiles'), use_data: str = 'raw', crop_size: str | int = 'auto', platform: Literal['Visium', 'Old_ST'] = 'Visium', weights: Literal['weights_matrix_all', 'weights_matrix_pd_gd', 'weights_matrix_pd_md', 'weights_matrix_gd_md', 'gene_expression_correlation', 'physical_distance', 'morphological_distance'] = 'weights_matrix_all', copy: Literal['pseudo_spot_adata', 'combined_adata'] = 'pseudo_spot_adata') AnnData | None[source]¶
Improve spatial resolution by imputing (creating) new spots from existing ones using spatial, morphological, and expression (SME) information.
- Parameters:
adata – Annotated data matrix.
use_data – Input data, can be raw counts, log transformed data or dimension reduced space(X_pca and X_umap)
tile_path – Path to save spot image tiles
crop_size – Size of tiles if auto, automatically detect crop size
weights – Weighting matrix for imputation. if weights_matrix_all, matrix combined all information from spatial location (S), tissue morphological feature (M) and gene expression (E) if weights_matrix_pd_md, matrix combined information from spatial location (S), tissue morphological feature (M)
platform – Visium or Old_ST
copy – Return Anndata if pseudo_spot_adata, imputed Anndata if combined_adata, merged Anndata of original data imputed Anndata.
- Return type:
Anndata