Reordering samples in RF heatmap output

I'm trying to make a heatmap of random forest features that is grouped both by diet (one metadata column) and by study day (another metadata column). In order to do this, I organized my feature table and metadata in the order I wanted for the output. However, my heatmap output seems to be in a random order (I'm not sure where the order is coming from)? I was hoping someone had input for how I can change the order around in the output. Here's what I ran:

source activate qiime2-2019.10

qiime sample-classifier heatmap
--i-table mzmine_0914202_quant_qiime2_filtered_ordered4-47.qza
--i-importance mzmine_0914202_quant_qiime2_RandFor_FeatureImportance_days4-47.qza
--m-sample-metadata-file gnps_metadata_for_job_4_days4-47.txt
--m-sample-metadata-column ATTRIBUTE_Diet
--p-feature-count 20
--p-metric braycurtis
--p-cluster features
--p-color-scheme RdBu
--o-heatmap mzmine_0914202_quant_qiime2_heatmapImpFt_days4-47_reordered.qzv
--o-filtered-table mzmine_0914202_quant_qiime2_heatmapImpFt_filteredTablenonorm_days4-47_reordered.qza

Hello @Allegra_Aron,

Take a look at the docs for this plugin. I think with a few changes to your settings, you can get the output you want:

I think the --p-no-group-samples flag is turning off sample grouping, but it sounds like you might want --p-group-samples instead. The two --m-sample-metadata-* flags look good to me, but it's always helpful to double check!

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