Now I have two tables; feature table and taxonomy table. I want to rarefy OTU table for further analyses. If I rarefy only feature table then rarefied table is different from taxonomy table in terms of OTUs. I am very confused, am I doing right or not? How Can I rarefy both feature and taxonomy table at the same time?
By “taxonomy table”, I assume you mean the output of classifying your features? If thats the case, you don’t need to do anything else in rarefaction, or if you filter. The features in the taxonomy object can be a superset of whats in your feature table.
If you mean that you used the taxonomy to collapse the ASVs to genus level (as an example), then you either need to re-rarify which might give you two seperate tables, or you need to collapse the rarefied table again.
It is worth noting, however, that rarefaction is the suggested normalization for certain distance metrics, but not for differential abundance testing.
Thanks again for your suggestion.
Many papers are suggesting to use rarefied OTU table for diversity analysis. So I am getting confused here.
I used following steps for analysis:
a) Imported data
c) Taxonomy classifying
So I have feature table and taxonomy (classifying my features) table and OTUs ID are same in both tables. After this, If I rarefy feature table then OTUs Id are different from taxonomy table. Suppose after rarefying I get 4000 OTUs but in taxonomy table there are 10000 OTUs. So I am bit confused here that how to use theses 2 tables if I want to do some analysis in R?
OR as you suggested, I should collapse feature table and taxonomy table together. And I should rarefy this collapsed table and should use for further analysis?
I think you’re missing what the taxonomy object represents. The taxonomy is a type of metadata which describes the ASVs (if you did DADA2, you have amplicon sequence variants [ASVs]; if you do clustering like vsearch, you have Operational Taxonomic Units [OTUs]). When you rarify your ASV table, it changes the ASV counts, but not the taxonomic labels. You can also have a taxonomic label for ASVs that aren’t present in the table; in QIIME 2, it doesn’t affect the way these objects relate to eachother. If it’s a problem in R, you can always filter your two dataframe (or equivalent objects) so the labels match. I think thats as simple as setting your row names and then using the indexing stuff, but again, Im not an R person.
All that said, you don’t need taxonomy for ASV-level diversity analyses (and Im a big proponent of ASV-level diversity analyses… there are some discussions here and here as to why.) I would recommend a phylogenetic tree. You should only collapse and rarify (or rarify then collapse) if you have a good reason to collapse your taxonomy.
Thanks for elaborated explanation. Now I understand that within Qiime2 platform there is no problem for analysis.
However, if I want to make two dataframes with similar ASV labels (only for some outsource analysis) then I think I can use following command:
qiime feature-table filter-seqs --i-data rep-seqs.qza --i-table rarefied-table.qza --o-filtered-data Filtered-rep-seqs.qza
I think that based on rarefied table, I can also filter sequences and then assign taxonomy so that both dataframes would have same ASV labels. And then I can use for further analysis. Please correct me if I am wrong.
Thanks and best regards,
My rule of thumb is always to generate once, fitler as much as needed. So, my advice for exporting would still be to avoid reclassifying your rep seqs and instead just filter the dataframe in your external tools. You can cross filter, but it seems like a lot of computation and an opportunity for things to change (unlikely, but possibly).
Now things are getting clear. Thanks for your support.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.