Skip to content

Instantly share code, notes, and snippets.

@ag1805x
Created June 10, 2019 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ag1805x/4e1ccc417fd0c8ec023c2c2e3a85ebf4 to your computer and use it in GitHub Desktop.
Save ag1805x/4e1ccc417fd0c8ec023c2c2e3a85ebf4 to your computer and use it in GitHub Desktop.
#Code to cdeate heatmap of riboswitch counts in different bacteria.
#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