celldisect.CellDISECT.add_cluster_covariate
- classmethod CellDISECT.add_cluster_covariate(adata: anndata.AnnData, normalize_counts: bool = True)[source]
Run PCA on the gene expression matrix and run Leiden clustering on the PCA components to create a cluster covariate to be added to the adata.obs.
- Parameters:
adata (AnnData) – AnnData object containing the single-cell RNA sequencing data.
normalize_counts (bool, optional) – If True, takes the counts from the adata.layers[‘counts’] and log normalizes them, by default True.
- Return type:
None