calour.transforming.center_log_ratio

calour.transforming.center_log_ratio(exp: calour.experiment.Experiment, method=<function <lambda>>, centralize=False, inplace=False)[source]

Performs a clr transform to normalize each sample.

Note

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

Parameters:
  • exp (Experiment) – Input experiment object.
  • method (callable, optional) – An optional function to specify how the pseudocount method should be handled (to deal with zeros in the matrix)
  • centralize (bool, optional) – centralize feature-wise to zero or not
  • inplace (bool, optional) – False (default) to create a new experiment, True to normalize in place
Returns:

The normalized experiment. Note that all features are clr normalized.

Return type:

Experiment

See also

skbio.stats.composition.clr(), skbio.stats.composition.centralize()