stlearn.tl.cci.grid¶
- stlearn.tl.cci.grid(adata, n_row: int = 10, n_col: int = 10, use_label: str | None = None, n_cpus: int | None = None, verbose: bool = True)[source]¶
- Creates a new anndata representing a gridded version of the data; can be
used upstream of CCI pipeline. NOTE: intended use is for single cell spatial data, not Visium or other lower resolution tech.
- Parameters:
adata (AnnData) – The data object.
n_row (int) – The number of rows in the grid.
n_col (int) – The number of columns in the grid.
use_label (str) – The cell type labels in adata.obs to join together & save as deconvolution data.
n_cpus (int) – Number of threads to use or if None use os.cpu_count()
- Returns:
grid_data – Equivalent expression data to adata, except values have been summed by cells that fall within defined bins.
- Return type:
AnnData