r – Filter phyloseq sequence table using information from sample_data and tax_table

I have phyloseq object where sequence table were builded by using the function mergeSequenceTables from DADA2 package, to merge ten sequence tables from different runs.
The sample_data consist of two columns 1)containing sample names same as sequence table column names and 2)study name from which samples comes from.

Using this information I want to filter the genera from all phyloseq object to have at least 3 studies the average abundance > 10%.

It is important to mention that sequence table sequences can be assigned to same genus in tax_table.

Does anyone have any pointers?

Read more here: Source link