Chapter 4 Taxonomic Analysis

4.1 Taxonomic analysis - taxa barplots

$ qiime taxa barplot \
--i-table DADA2_denoising_output/table.qza \
--i-taxonomy taxonomy/classified_rep_seqs.qza \
--m-metadata-file metadata.txt \
--o-visualization taxonomy/taxa_barplots.qzv

This provides taxonomic barplots which I can then download as SVG (also allows for download as csv, which act as input for LefSe). Downloaded csvs and have placed in fig/taxa_barplots/ folder.

4.2 Generate heatmap

$ mkdir collapsed-tables
$ mkdir heatmaps

$ qiime taxa collapse \
--i-table DADA2_denoising_output/table.qza \
--i-taxonomy taxonomy/classified_rep_seqs.qza \
--p-level 7 \
--o-collapsed-table collapsed-tables/collapsed-table-l7.qza

$ qiime feature-table heatmap \
--i-table collapsed-tables/collapsed-table-l7.qza \
--m-sample-metadata-file metadata.txt \
--m-sample-metadata-column treatment \
--o-visualization heatmaps/heatmap-l7.qzv

# output heatmap as png/svg
$ qiime tools export \
--input-path heatmap-l7.qzv \ 
--output-path heatmap-l7

Note: As multiple people have noted on the qiime forums, loading the qzv into qiime2view and then trying to export the heatmap figure doesn’t seem to work (at least I’ve never got it to work). So that’s why I add in that export command at the end.