calour.filtering.filter_mean_abundance

calour.filtering.filter_mean_abundance(exp: calour.experiment.Experiment, cutoff=0.01, field=None, **kwargs)[source]

Filter features with a mean at least cutoff of the mean total abundance/sample

For example, to keep features with mean abundance of 1% use filter_mean_abundance(cutoff=0.01).

Note

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

Parameters:
  • exp (Experiment) – Input experiment object.
  • cutoff (float, optional) – The minimal mean abundance (in fraction) for a feature in order to keep it. Default is 0.01 - keep features with mean abundance >= 1% over all samples.
  • field (str or None, optional) – The column in the sample_metadata. If it is not None, the data set are divided into groups according to the sample metadata column. The features that has mean abundance lower than the cutoff in ALL sample groups will be filtered away. If it is None, the mean abundance is computed over the whole data set.
Keyword Arguments:
 

negate (bool) – negate the predicate for selection

Returns:

Return type:

Experiment

See also

filter_by_data()