Hi all! I'm new in bioinformatics and I'm trying to understand how the pipeline works for 16S metabarcoding and what to do with the data.
I have a feature table with 87 samples and a lot of different OTUs. I'd like to collapse the OTUs that have a relative abundance <1%, but I have a feature table with all my samples as colums and I want this to be done for every sample. I will then produce a barplot but at the current state my barplot is really noisy due to the various OTUs with low abundance!
Is there a way to do it? I hope that there's a faster way than dividing the feature table per every sample and then collapsing the features under 1% manually with excel!
Thank you for your help!
Hello and Welcome to the forum!
There are several options to solve it.
- You don't need to separate each sample in the table to calculate the relative abundance. Just divide each value in the column by the sum of that column and you will get the relative abundance. If you need %, then additionally multiply each resulted value by 100.
- You can convert feature table to relative abundances (1% = 0.01). Check the documentation to find the right plugin for it.
- In the "noisy" barplot, click on the colored square in the legend, that is located next to the taxonomy annotation. It will hide all other feature from the barplot. Then click all the taxa you want to keep in the barplot (by abundance or just top 10, 15 or 20.
Best,
Thank you for your quick answer!
I don't "just" want the relative abundance, I want features under 1% to collapse in a "new taxon" called "Others" and I want it to be done for every sample in a FeatureTable. The problem is that if I collapse the features of a sample that are under 1% I do not know if the same features are more abundant in another sample and I don't want to lose data, so I want it to be done separately for every sample.
Maybe I could have said it in a better way, sorry for my English, I hope it's clear now!
Hi @gio0310,
I'd recommend dokdo. You can install this package into your QIIME 2 environment, and follow the taxa plotting tutorials. There are several examples of placing taxa within "others". Basically, you specify how many taxa you'd like to reveal.
The github repo is here.
Thank you so much, I'll try it immediately!