ehrapy.preprocessing.summarize_measurements(adata, layer=None, var_names=None, statistics=None)[source]#

Summarizes numerical measurements into minimum, maximum and average values.

  • adata (AnnData) – AnnData object containing measurements that

  • layer (str) – Layer to calculate the expanded measurements for. Defaults to None (use X).

  • var_names (Iterable[str] | None) – For which measurements to determine the expanded measurements for. Defaults to None (all numerical measurements).

  • statistics (Iterable[str]) – Which expanded measurements to calculate. Possible values are ‘min’, ‘max’, ‘mean’ Defaults to None (calculate minimum, maximum and mean).

Return type:



A new AnnData object with expanded X containing the specified statistics as additional columns replacing the original values.