I have a samll RNA-Seq sample data as show below:
>hsa-let-7a-5p 2209192 2451725
>hsa-let-7b-5p 2602079 2662024
>hsa-let-7f-5p 1053355 982221
>hsa-let-7e-5p 246609 308765
>hsa-let-7c-5p 281729 300213
>hsa-miR-320a 185702 241361
>hsa-miR-29a-3p 154804 104144
>hsa-let-7d-5p 53230 67939
>hsa-miR-423-5p 99983 78185
>hsa-miR-199a-3p 60100 88733
>hsa-miR-199b-3p 60100 88733
>hsa-miR-221-3p 64926 67229
>hsa-let-7g-5p 41642 45398
>hsa-miR-103a-3p 32894 29542
>hsa-miR-21-5p 11757 13865
>hsa-let-7i-5p 16907 18536
>hsa-miR-191-5p 16334 15549
>hsa-miR-185-5p 19671 17588
When I want to draw a heatmap with this database I found that there are only two colors in the pictures.
Below is my code
Anyone can give me some suggestions?
>hsa-let-7a-5p 2209192 2451725
>hsa-let-7b-5p 2602079 2662024
>hsa-let-7f-5p 1053355 982221
>hsa-let-7e-5p 246609 308765
>hsa-let-7c-5p 281729 300213
>hsa-miR-320a 185702 241361
>hsa-miR-29a-3p 154804 104144
>hsa-let-7d-5p 53230 67939
>hsa-miR-423-5p 99983 78185
>hsa-miR-199a-3p 60100 88733
>hsa-miR-199b-3p 60100 88733
>hsa-miR-221-3p 64926 67229
>hsa-let-7g-5p 41642 45398
>hsa-miR-103a-3p 32894 29542
>hsa-miR-21-5p 11757 13865
>hsa-let-7i-5p 16907 18536
>hsa-miR-191-5p 16334 15549
>hsa-miR-185-5p 19671 17588
When I want to draw a heatmap with this database I found that there are only two colors in the pictures.
Below is my code
HTML Code:
library(gplots) myheatcol <- redgreen(75) hr <- hclust(as.dist(1-cor(t(b), method="pearson")), method="complete") hc <- hclust(as.dist(1-cor(b, method="spearman")), method="complete") mycl <- cutree(hr, h=max(hr$height)/1.5); mycolhc <- rainbow(length(unique(mycl)), start=0.1, end=0.9); mycolhc <- mycolhc[as.vector(mycl)] heatmap.2(as.matrix(b), Rowv=as.dendrogram(hr), Colv=as.dendrogram(hc), col=myheatcol, scale="row", density.info="none", trace="none", RowSideColors=mycolhc,key.xlab="",margin=c(6, 6))
Anyone can give me some suggestions?
Comment