calour.amplicon_experiment.AmpliconExperiment.filter_taxonomy

AmpliconExperiment.filter_taxonomy(values, negate=False, inplace=False, substring=True)[source]

filter keeping only observations with taxonomy string matching taxonomy

if substring=True, look for partial match instead of identity. Matching is case insensitive

Parameters:
  • values (str or list of str) – the taxonomy string/strings to filter (can be partial if substring is True)
  • negate (bool, optional) – False (default) to keep matching taxonomies, True to remove matching taxonomies
  • inplace (bool, optional) – do the filtering on the original Experiment object or a copied one.
  • substring (bool, optional) – True (default) to do partial (substring) matching for the taxonomy string, False to do exact matching
Returns:

With only features with matching taxonomy

Return type:

AmpliconExperiment