AmpliconExperiment.
aggregate_by_metadata
(field, agg='mean', axis=0, inplace=False)[source]¶aggregate all samples/features that have the same value in the given field.
Group the samples (axis=0) or features (axis=1) that have the same value in the column of given field and then aggregate the data table of the group with the given method.
The number of samples/features in each group and their IDs are stored in new metadata columns ‘_calour_merge_number’ and ‘_calour_merge_ids’, respectively
Warning
It will convert the Experiment.data
from the sparse matrix to dense array.
Parameters: |
|
---|---|
Returns: | |
Return type: |