Ronald Robertson

Sanjay Singh

Scientist/Writer
  • Emailsanjaysingh765@gmail.com
  • Socail@lampatlex
  • VisitorSince 1982
  • LocationKentucky, USA



Draw a heatmap with Custom Symbol in Cell





Heatmap is a good way to save some space when you want to compose a figure with lots of panels. I got some gene expression data which were supposed to insert in a big figure. Although I can easily create a bar graph for that, but I choose the draw a heatmap to save some space. The easiest way was to create this heatmap by the Excel but I choose ggplot2 R package to draw the heatmap because it was easy to handle the big data and customize the annotation. My aim was to draw the heatmap and annotate the cell where the difference of gene expression is statistically significantly from the control.  I choose star (*) to show the cells which are significantly different from control.



Prerequisite


We need the following R libraries to run the script


  • ggplot2 

  • plyr 

  • scales






Cheat Sheet to Install and work with R on Ubuntu HERE


Sample data










ggplot2_heatmap.R










Comments