Get a table of feature frequency by sample


I'm hoping to get a FeatureTable[Frequency] artifact that shows the raw counts of each feature by sample. When I run

qiime feature-table summarize
--i-table Exp11_table.qza
--o-visualization Exp11_table.qzv
--m-sample-metadata-file Exp11_manifest.txt

and then

qiime tools view Exp11_table.qzv

I get a table that looks like this:

Where the total number of reads for each feature, and the number of samples that feature appears in are shown

But what I'm looking for is something that looks like this:

Where the number of reads for each feature is shown for each sample.

I think I might be able to achieve this with feature-table group, or some other method under feature-table, but I'm kind of new to this and I can't quite parse exactly what each of these methods do

It might also be nice to have a FeatureTable[RelativeFrequency] and FeatureTable[PresenceAbsence], but I can get these using an external program if necessary

I'm running qiime2 2021.11, installed with conda

Any help you can provide would be much appreciated!

What do you need is actually not a visualization, but a biom table.

First, check exporting tutorial how to export feature-table as a biom file. Then you can convert a biom file to .tsv file. You don't need any additional manipulation with feature table prior exporting to get frequencies of features by samples.
Please, let me know if you will encounter problems with finding the right commands (search by the forum will provide you with numerous posts with the same information, so you can adapt commands for your data).
For relative frequency, you can convert a feature table to relative abundances first and then export.
Presence / absence matrix can be obtained from Jaccard distances in core-metrics plugin.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.