SOAPy_st.tl.cal_spark
- SOAPy_st.tl.cal_spark(adata: AnnData, gene_name: list | str | None = None, method: Literal['gaussian', 'poisson'] = 'gaussian', num_core: int = 5, spatial_in_obsm: str = 'spatial') DataFrame
Perform SPARK analysis on spatial omics data. Doi: 10.1038/s41592-019-0701-7 Github: https://github.com/xzhoulab/SPARK
Parameters
- adataanndata.AnnData
An AnnData object containing spatial omics data and spatial information.
- gene_nameUnion[list, str, None], optional
List of genes of interest or a single gene name to focus the analysis on. If None, the analysis will consider all genes in the dataset.
- methodLiteral[‘gaussian’, ‘poisson’], optional
The statistical method to be used for the analysis. Must be one of ‘gaussian’ or ‘poisson’.
- num_coreint
The number of CPU core.
- spatial_in_obsmstr
The key of spatial coordinates in adata.obsm
Returns
- pd.DataFrame
A Pandas DataFrame containing the results of the SPARK analysis.