# Gneiss dendrogram\_heatmap, metadata, and white space

**URL:** <https://forum.qiime2.org/t/gneiss-dendrogram-heatmap-metadata-and-white-space/898>\
**Category:** Ideas and Suggestions\
**Tags:** gneiss\
**Created:** [July 26, 2017, 5:10pm UTC](https://forum.qiime2.org/t/gneiss-dendrogram-heatmap-metadata-and-white-space/898 "2017-07-26T17:10:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![five](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/f/eb8c5e/32.png) [@five](https://forum.qiime2.org/u/five)\
**Post date:** [July 26, 2017, 5:10pm UTC](https://forum.qiime2.org/t/gneiss-dendrogram-heatmap-metadata-and-white-space/898/1 "2017-07-26T17:10:59Z")

</div>

Hello,

A small suggestion on the heatmaps generated by gneiss dendrogram heatmaps. When processing subsets of my data (filtering with feature-table filter-samples) and provided with my complete metadata file, the generated heatmaps contain large areas of white space:

 ![](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/1X/34dde6602ecde7d84d97500d52b3222acc210794.PNG)

However by generating a reduced file with only the metadata for the relevant samples, I can reduce white space:

 ![](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/1X/d14cca24a67591b88704648e6b059d95e9bec08f.PNG)

I suggest that it would be beneficial if the generated heatmaps automatically only contained space for the samples within the FeatureTable[Composition] as opposed to for all samples within the metadata file.

Thanks,

---

<div class="post-metadata">

**Author:** ![mortonjt](https://forum.qiime2.org/user_avatar/forum.qiime2.org/mortonjt/32/3488_2.png) [@mortonjt](https://forum.qiime2.org/u/mortonjt)\
**Post date:** [July 31, 2017, 1:04am UTC](https://forum.qiime2.org/t/gneiss-dendrogram-heatmap-metadata-and-white-space/898/2 "2017-07-31T01:04:01Z")

</div>

Hi @five. Thanks for reporting this -- this would be certainly advantageous to have resolved. Could you specify the input files / command used to generate this plot?

---

<div class="post-metadata">

**Author:** ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)\
**Post date:** [July 31, 2017, 3:07pm UTC](https://forum.qiime2.org/t/gneiss-dendrogram-heatmap-metadata-and-white-space/898/3 "2017-07-31T15:07:26Z")

</div>

I think I found a corresponding [open issue](https://github.com/qiime2/q2-gneiss/issues/5) on the q2-gneiss issue tracker. It sounds like if the sample metadata is a superset of the samples in the table, those extra metadata samples can be filtered out by q2-gneiss -- this is generally how we're handling metadata supersets in QIIME 2 (QIIME 1 often behaved this way too). @gregcaporaso is working on adding an API on the QIIME 2 `Metadata` object to help with this so it should be an easy fix.

We'll follow up here when it's fixed in an upcoming release!

---

<div class="post-metadata">

**Author:** ![five](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/f/eb8c5e/32.png) [@five](https://forum.qiime2.org/u/five)\
**Post date:** [August 1, 2017, 12:43pm UTC](https://forum.qiime2.org/t/gneiss-dendrogram-heatmap-metadata-and-white-space/898/4 "2017-08-01T12:43:17Z")

</div>

Hello @mortonjt, as @jairideout described on the issue tracker, the metadata for my first plot (upper in original post), is a superset of the samples used in the analysis.

The commands used to generate the two plots followed the form of:

> With white space  
> qiime gneiss dendrogram-heatmap \  
> --i-table Data/Table.qza \  
> --i-tree Data/correlated\_hierarchy.qza \  
> --m-metadata-file Data/metadata.tsv \  
> --m-metadata-category Treatment \  
> --p-method log \  
> --o-visualization Data/treatment\_heatmap\_log.qzv

> Without white space  
> qiime gneiss dendrogram-heatmap \  
> --i-table Data/Table.qza \  
> --i-tree Data/correlated\_hierarchy.qza \  
> --m-metadata-file Data/alt\_metadata.txt \  
> --m-metadata-category Treatment \  
> --p-method log \  
> --o-visualization Data/altmeta\_treatment\_heatmap\_log.qzv

The only difference between generating the plots was the provision of a different metadata file, which I reduced (outside of Qiime2) to only the relevant samples. The other inputs (table, correlated hierarchy) were the identical.

Thanks

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [August 2, 2017, 6:21pm UTC](https://forum.qiime2.org/t/gneiss-dendrogram-heatmap-metadata-and-white-space/898/7 "2017-08-02T18:21:33Z")

</div>

Thanks @five, we will update you as these suggestions become available in the future!! 🎉

---

<div class="post-metadata">

**Author:** ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)\
**Post date:** [August 30, 2017, 9:02pm UTC](https://forum.qiime2.org/t/gneiss-dendrogram-heatmap-metadata-and-white-space/898/8 "2017-08-30T21:02:30Z")

</div>

The QIIME 2 2017.8 release is live and includes the q2-gneiss metadata filtering bug fix! 🎉
