We have a matrix of miRNA expression data (example below w/ random fake data):

```
miRNA               sample 1     sample 2     sample 3
hsa-miR-10a-3p      1280         2340         4321
hsa-mir-10-5p       45           48           50
hsa-mir-10b-5p      32           19           25
```

What is the simplest way to generate a heat map + dendrogram based on the jensen-shannon metric using the above data? Do we have to perform clustering and then generate a heat map, or is there an R library that incorporates everything?

EDIT:

Provided an example of what we are looking for below:

<img alt="< image not found >" src="https://d2ufo47lrtsv5s.cloudfront.net/content/sci/338/6114/1593/F1.large.jpg" style="height:1280px; width:802px" />

<p>The R <a href="https://stat.ethz.ch/R-manual/R-devel/library/stats/html/heatmap.html" target="_blank">heatmap()</a> and <a href="http://www.inside-r.org/packages/cran/gplots/docs/heatmap.2" target="_blank">heatmap.2()</a> functions can take row and column dendrograms as input. So something like this could work:</p>

<pre>
clust&lt;-hclust(rowJSdist)
<code>heatmap(data,Rowv=as.dendrogram(clust))</code></pre>

<p>Or you could pass heatmap() the function that computes the distance (and also the one that does the clustering if you need something different from hclust).</p>
