- spac.transformations.get_cluster_info(adata, annotation, features=None, layer=None)[source]
Retrieve information about clusters based on specific annotation.
- Parameters:
adata (anndata.AnnData) – The AnnData object.
annotation (str) – Annotation in adata.obs for cluster info.
features (list of str, optional) – Features (e.g., markers) for cluster metrics. Defaults to all features in adata.var_names.
layer (str, optional) – The layer to be used in the aggregate summaries. If None, uses adata.X.
- Returns:
DataFrame with metrics for each cluster including the percentage of each cluster to the whole sample.
- Return type:
pd.DataFrame