SOAPy_st.tl.cal_sparkX

SOAPy_st.tl.cal_sparkX(adata: AnnData, gene_name: list | str | None = None, num_core: int = 5, spatial_in_obsm: str = 'spatial') DataFrame

Calculate SPARK-X analysis on spatial omics data. Doi: 10.1186/s13059-021-02404-0 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.

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-X analysis.