omicverse.micro.Alpha

Contents

omicverse.micro.Alpha#

omicverse.micro.Alpha(adata: ad.AnnData, rarefy_depth: int | None = None, seed: int = 0)[source]#

Compute and store per-sample alpha-diversity metrics on adata.obs.

Parameters:
  • adata – Samples × features AnnData with int counts. The class does NOT modify X; pass rarefy_depth if you want rarefaction applied only for the diversity calculation.

  • rarefy_depth (default: None) – If set, subsample to this depth (without replacement) before computing each metric. None → use raw counts.

  • seed (default: 0) – Random seed for rarefaction.