Summarize Heatmap

Hello! I'm trying to visualize my data properly. I want to see if there is a shift in bacterial composition in my 2 different samples (larvae vs adult). One way I can think of is by using heatmap. I have tried generating one with this code:
qiime feature-table heatmap
--i-table 0523/CCS-filtered-table.qza
--p-cluster both
--p-no-normalize True
--p-metric braycurtis
--p-color-scheme Pastel1_r
--m-sample-metadata-file 0523/CCS-merged-manifest.tsv
--m-sample-metadata-column Subgroup
--o-visualization 0523/heatmap.qzv

And here's the result:

What I'm trying to visualize is an x-axis with only 2 columns (1 for larvae and 1 for mother, merged features above) and species on the y-axis.

So side questions,

  1. How to merge replicates?
  2. How to convert features into genus names?

How should I tweak the codes/parameters above so I can achieve my desired heatmap?

Hello!

You can group your samples according to metadata column (each sample should have a category larvae/mother in the metadata file). Note that after grouping a table you will need to create a new metadata file with group information (larvae/mother) instead of sample-IDs.

Here you can either use feature metadata with taxonomy annotations like in the description:

--m-feature-metadata-file METADATA
  --m-feature-metadata-column COLUMN  MetadataColumn[Categorical]
                         Annotate the feature IDs with these feature metadata
                         values. When metadata is present and
                         `cluster`='sample', features will be sorted by the
                         metadata values.                           [optional]

..., which will annotate features with corresponding taxa, or collapse your feature table to genus level before clustering to heatmap.

Best,

3 Likes

Thank you so much @timanix ! Great help! :smiling_face:

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