calour.amplicon_experiment.AmpliconExperiment.filter_mean_abundance

AmpliconExperiment.filter_mean_abundance(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).

Parameters:
  • 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()