zoom.sc_tool.downstream_region_enrich

zoom.sc_tool.downstream_region_enrich(adata: anndata.AnnData, df_res: pandas.DataFrame, alpha: float, min_score: float, group: int, region_col: str, batch_col: str, dataset: list, indvd_col: str | None = None) anndata.AnnData[source]

Computes region enrichment for cell groups containing significant cells based on predefined statistical results.

Parameters:
  • adata (ad.AnnData) – The AnnData object containing expression data. - adata.X should have underwent gene specificity score normalization.

  • df_res (pd.DataFrame) – Results of single-cell SBP-relevant enrichment scores and other statistics.

  • alpha (float) – Significance level indicating significant cell subpopulations.

  • min_score (float) – Minimum enrichment score for significant cell subpopulations.

  • group (str) – Column name indicating the cell groups, based on which significant cells and non-significant cells are compared, must be present in adata.obs.

  • region_col (str) – Column name indicating the brain region the cell came from. must be present in adata.obs.

  • batch_col (str) – Column name indicating the biological batch the cell came from. must be present in adata.obs.

  • dataset (list) – List of subset of dataset to perform region enrichment analysis on.

  • indvd_col ({None, str}, optional) – Column name indicating biological replicates, must be present in adata.obs. If provided, region enrichment score will be presented as mean and standard error across biological replicates.

Returns:

adata – The AnnData object with adata.uns[‘Region Enrichment’], where the region enrichment analysis results for each cell group are stored.

Return type:

ad.AnnData

References

Yang, L. et al. Projection-TAGs enable multiplex projection tracing and multi-modal profiling of projection neurons. Nat. Commun. 16, 5557 (2025).