calour.amplicon_experiment.AmpliconExperiment.add_terms_to_features

AmpliconExperiment.add_terms_to_features(dbname, use_term_list=None, field_name='common_term', term_type=None, ignore_exp=None)[source]

Add a field to the feature metadata, with most common term for each feature

Create a new feature_metadata field, with the most common term (out of term_list) for each feature in experiment. It adds annotations in-place.

Parameters:
  • use_term_list (list of str or None, optional) – Use only terms appearing in this list None (default) to use all terms
  • field_name (str, optional) – Name of feature_metadata field to store the annotatiosn.
  • term_type (str or None, optional) – type of the annotation summary to get from the database (db specific) None to get default type
  • ignore_exp (list of int or None, optional) – list of experiments to ignore when adding the terms
Returns:

with feature_metadata field containing the most common database term for each feature

Return type:

Experiment