calour.amplicon_experiment.AmpliconExperiment.join_experiments_featurewise

AmpliconExperiment.join_experiments_featurewise(other, field_name='_feature_origin_', origin_labels=('exp1', 'exp2'))[source]

Combine two Experiment objects into one.

An example of user cases is to combine the 16S and ITS amplicon data together.

Warning

If a sample has only features in one Experiment

object and not the other, the sample will be dropped from joining.

Parameters:
  • other (Experiment) – The Experiment object to combine with the current one. If both experiments contain the same feature metadata column and there is a conflict between the two, the value will be taken from exp and not from other.
  • field_name (None or str (optional)) – Name of the new feature_metdata field containing the experiment each feature is coming from. If it is None, don’t add such column.
  • labels (tuple of (str, str) (optional)) – The text to label which experiment the feature is originated from.
Returns:

A new experiment with samples from both experiments concatenated, features from both experiments merged.

Return type:

Experiment