Exporting Diversity Core Metrics Distances and non-.qzv results


I passed the following command to complete diversity analyses. I am able to view the emperor plots but I would like to obtain the distance matrices so I can generate heatmaps and other plots in R.

(qiime2-2017.12) bash-3.2$ qiime diversity core-metrics-phylogenetic --i-phylogeny 20180204__pilot_VSearch_OpenRef_99per_Clustered_Seqs_filtered__NoSg_10min_ROOTED_TREE.qza --i-table 20180204__pilot_VSearch_OpenRef_99per_Clustered_Table_NoSg_10min.qza --p-sampling-depth 11769 --m-metadata-file Pilot_QIIME_MapFile_noSg.txt --output-dir 20180208_Core_Div_Metrics_results

I tried to use QIIME 2 view but can only see the Provenance Graph and File type info. How do I export a usable txt file with the distances?

Thank you,


1 Like

Hi @Sara_Jeanne08,

The distance matrices you are looking for are within the distance artifacts themselves (ex. bray_curtis_distance_matrix.qza).
You can export this file by following the qiime tools extract command, see here. Alternatively you can simply unzip the .qza files with your preferred tool and navigate to the ‘data’ subfolder.

Good luck!

p.s depending on what you are planning on doing you can make heatmaps in qiime2 using gneiss.


Thanks @Mehrbod_Estaki, great answer!

Just a quick note, usually qiime tools export is the easier command, since you only get the /data/ directory of the artifact, and not everything else (although I tend to use unzip personally). Also, I think q2-feature-table has a heatmap method as well!


Thank you both for your help. The qiime tools export command helped me a lot… I haven’t been able to unzip the qza files on my mac.



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