calour.transforming.normalize_compositional

calour.transforming.normalize_compositional(exp: calour.experiment.Experiment, min_frac=0.05, total=10000, inplace=False)[source]

Normalize each sample by ignoring the features with mean>=min_frac in all the experiment

This assumes that the majority of features have less than min_frac mean, and that the majority of features don’t change between samples in a constant direction

Note

This function is also available as a class method Experiment.normalize_compositional()

Parameters:
  • exp (Experiment) – Input experiment object.
  • min_frac (float, optional) – ignore features with mean (over all samples) >= min_frac.
  • total (int, optional) – The total abundance for the non-excluded features per sample
  • inplace (bool, optional) – False (default) to create a new experiment, True to normalize in place
Returns:

The normalized experiment. Note that all features are normalized (including the ones with mean>=min_frac)

Return type:

Experiment