Hi,
Sorry to post this again-this is from a previous thread, I tried to order my samples in the heatmap, I seem to be stuck somewhere I cannot understand.
I did what @thermokarst suggested in this post: disabled the --p-cluster option, however, my sample ids are not in the order they are in the sample metadata file.
Please let me mention my exact flow of operations:
- Created a tabulated feature metadata .qzv file using qiime metadata tabulate
- From visualization of the .qzv file, I prepared the feature-table tab separated file . Columns were id, feature (the sequence), taxonomy, confidence values
- I edited this sheet manually to separate the taxonomy into phyla, class etc. columns. All these columns are categorical
- I next use qiime feature-table group to group at phyla level by summing the values. Here is the command:
qiime feature-table group
–i-table my-table.qza
–p-axis ‘feature’
–m-metadata-file feature-metadata-edit.tsv
–m-metadata-column Phyla
–p-mode ‘sum’
–o-grouped-table grouped-phyla-feature-metadata-edit
–verbose
- Finally, I ran the heatmap script:
qiime feature-table heatmap
–i-table grouped-phyla-feature-metadata-edit.qza
–p-color-scheme ‘ocean_r’
–o-visualization HEAT-MAPS/feature-metadata-edit.qzv
PS: I tried all variations of the --p-cluster command (including not mentioning it), yet the order of sample ids in the heatmap is the same.
So, I tried visualizing the grouped table using:
qiime metadata tabulate
–m-input-file grouped-phyla-feature-metadata-edit.qza
–o-visualization HEAT-MAPS/example-feature-metadata.qzv
Guess what: the sample ids in the grouped feature table are the same as they are in the heatmap, which makes sense. So I was wondering if there is no way to change this order
Attempt 2: I ran this command:
qiime feature-table heatmap
–i-table grouped-phyla-feature-metadata-edit.qza
–m-sample-metadata-file sample-metadata.tsv
–m-sample-metadata-column Day
–p-cluster ‘features’
–p-color-scheme ‘ocean_r’
–o-visualization HEAT-MAPS/example-feature-metadata-2.qzv
Here as well I tried changing --p-cluster to ‘none’, but it does not work. I also referred to earlier posts in the forum.
So here are my inferences:
- either I am not understanding the --p-cluster command usage, OR
- I fail to understand why changing the order in the sample metadata file is not seen in the heatmap.
- I also tried to match feature-ids (in the feature metadata) to sample-ids (in the sample metadata) to see if I could change the order in the feature-table itself, yet couldn’t do that too!
- Tried to change the grouped-table artifact-not happening (sigh!)
I am sorry this is very long post. Believe me I tried to troubleshoot this-I went back to provenance of each of the commands to see file-paths etc. yet there is somewhere I am missing out. If you could help (some hint), that would be greatly appreciated 
Merci!
Anirban