I am working on generating a heatmap using Qiime 2 in Virtualbox. I would like to show only data at the genus level for 6 samples. Firstly, I used qiime taxa filter-table to retain only features that were at annotated to the genus level. Then, I used ** qiime taxa collapse** to collapse features by their taxonomy at the genus level. Finally, I used ** qiime feature-table heatmap** to generate the heatmap. However, the x-axis still showing other taxa that only can annotate at order or family level. Also, in my output .qzv file, the taxa name is k_bacteria: p bacteroidetes:c sphingobacteria,o_ sphingobacteriales:f_ chitinophagaceae:g_arachidicoccus__, for example. I would like to show up the only genus name (e.g. arachidicoccus). I was wondering if qiime2 have any plugin that has this function. Below is the code I used to generate the heatmap.
qiime taxa filter-table
qiime taxa collapse
qiime feature-table heatmap
This is the picture of the heatmap.
Thank you so much for spending your time reading my post.
I was searching for the same function and did not find it. But you have some options:
- Download heatmap as .svg file and edit with svg editor or script. Worked not very well for me.
- Export genera-taxonomy-table.qza as a biom then convert it to .tsv and edit taxa manually or with a script to show only genera, convert to biom and import it back to .qza file and then create a heatmap. Exporting, importing and converting commands can be found on this forum, but feel free to ask for it, I will provide them as soon as I will be able to reach my working PC.
Thank you so much for your help. I will try with the second option . I would very appreciate if you could send me the commands for exporting, importing and converting.
Have a nice day.
Export and convert
qiime tools export \
--input-path table.qza \
biom convert -i Biom/feature-table.biom -o Biom/feature-table.tsv --to-tsv
Here you will have a .tsv table that you can edit manually or with script, after it import back
biom convert -i Biom/feature-table.tsv -o Biom/feature-table.biom --table-type="OTU table" --to-hdf5
qiime tools import \
--input-path Biom/feature-table.biom \
--type 'FeatureTable[Frequency]' \
--input-format BIOMV210Format \
Those taxa are actually classified at genus level, but the database annotation only consists of “g__” (i.e., unknown genus). So you are in fact getting what you are telling QIIME 2 to do — select all taxa classified at genus level.
qiime taxa filter-table command you could use `–p-exclude ‘f__;g__’ to exclude any classifications with unknown family and genus.
You could then use
qiime taxa filter-table a second time with
--p-mode exact and then indicate specific taxa that you want to exclude that are not filtered out with that first filter.
Thank you so much . I tried based on your suggestion and I could get the desired heat map.
Thank you so much for your suggestion. I will try the command you mentioned.
Have a nice day.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.