.impute_downshift

proteopy.pp.impute_downshift(adata, downshift=1.8, width=0.3, zero_to_nan=True, inplace=True, force=False, random_state=42)[source]

Left-censored imputation in log space with downshifted normal sampling.

Parameters:
  • adata (AnnData) – Input proteomics AnnData.

  • width (float, optional) – Standard deviation scaling factor for the normal sampler.

  • downshift (float, optional) – Number of standard deviations to shift the mean downward.

  • zero_to_nan (bool, optional) – Treat zeros as missing values before imputation.

  • inplace (bool, optional) – Modify adata in place. If False, return a copied AnnData.

  • force (bool, optional) – If False (default), raise a ValueError when data are detected as non-log. Set True to impute even when data appear non-log.

  • random_state (int or None, optional) – Seed for the random number generator.

Returns:

Modified AnnData (or a copy if inplace=False).

Return type:

AnnData