.quantify_proteoforms

proteopy.pp.quantify_proteoforms(adata, *, group_by='proteoform_id', layer=None, func='sum', inplace=True)

Aggregate intensities in adata.X (or selected layer) by .var[group_col], aggregate annotations in adata.var by concatenating unique values with ';', and set group_col as the new index (var_names).

Parameters:
  • adata (AnnData) – Input AnnData with .X (obs x vars) and .var annotations.

  • group_by (str) – Column in adata.var to group by (e.g. ‘protein_id’).

  • layer (str, optional) – Key in adata.layers; when set, quantification uses that layer instead of adata.X.

  • func ({'sum', 'median', 'max'} | Callable) – Aggregation to apply across grouped variables.

  • inplace (bool) – If True, modify adata in place; else return a new AnnData.

Returns:

Aggregated AnnData if inplace=False; otherwise None.

Return type:

AnnData | None