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:
Hi, I'm confused-- I have the Matrix of miRNA data, and I produced a distance matrix using an implementation of Jensen-Shannon. How do I use this with hclust and heat map?
Thanks!
As in the example code I gave: rowJSdist stands for the distance matrix which contains distances between the rows of your data matrix. If you computed the distances between the columns then just replace Rowv by Colv in heatmap(). hclust will produce a dendrogram but it is a hclust object so it may need to be coerced into a dendrogram object for use by heatmap().