calour.filtering.filter_samples

calour.filtering.filter_samples(exp: calour.experiment.Experiment, field, values, negate=False, inplace=False)[source]

Shortcut for filtering samples.

Note

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

Parameters:
  • exp (Experiment) – Input experiment object.
  • field (str) – the column name of the sample metadata tables
  • values – keep the samples with the values in the given field
  • negate (bool, optional) – discard instead of keep the samples if set to True
  • inplace (bool, optional) – return the filtering on the original Experiment object or a copied one.
Returns:

the filtered object

Return type:

Experiment