Creating averaged ASV tables

Hi all,

I am trying to create an ASV table where the abundances of my replicates are averaged. However, I haven't figured out how to do this. This was possible in phyloseq with merge_samples(phyloseq_object,"variable", fun = mean ) but now fun=mean doesn't work. You can only get the sum of the abundances.

Any idea how I can do this in R?

Also, how do we get an averaged ASV table if we want to perform any transformations like log transformation prior to averaging?

Any help is greatly appreciated!

Many thanks in advance,

Hi @uth ,
I can tell you how to do this in QIIME 2. If you have your replicates in a single table, you can use qiime feature-table group to group these samples together (based on a sample metadata column that specifies the samples that each replicate belongs to). You can take the mean, median, or sum of the grouped samples.

This action only works on FeatureTable[Frequency] type tables, so cannot be used with log-transformed tables.


Thank you so much @Nicholas_Bokulich for you reply. Reason why I was looking to do this in R instead of Qiime2 is that I run "decontam" on my samples in R. I prefer to get rid of the contaminants and then average the ASVs.

Thank again for your reply!