Created
June 10, 2019 11:11
-
-
Save ag1805x/4e1ccc417fd0c8ec023c2c2e3a85ebf4 to your computer and use it in GitHub Desktop.
#Code to cdeate heatmap of riboswitch counts in different bacteria.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Code to cdeate heatmap of riboswitch counts in different bacteria. | |
library(pheatmap) | |
data<- as.matrix(read.csv("heat_map_table.csv", header=T, row.names=c(1))) | |
col_key = c("#800000", "#e6194B", "#3cb44b", "#ffe119", "#4363d8", "#f58231", "#911eb4", "#42d4f4", "#f032e6", "#bfef45", "#fabebe", "#469990", "#fffac8") | |
#Since max count was 12 we used 12 distinct colours | |
pheatmap(data, treeheight_row = 0, treeheight_col = 0, cluster_rows=FALSE, cluster_cols=FALSE, color=rev(col_key), cellwidth=16, cellheight=15, height=15, width=10,filename="Heatmap.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment