SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
RNA-seq, RPKM and heatmap??? sdwy2008 RNA Sequencing 10 07-14-2011 10:41 PM
ncRNA heatmap with next gen sequencing NicoBxl Bioinformatics 2 11-23-2010 01:12 AM
'heatmap' tool Livi81 General 0 07-14-2010 03:07 PM
Bowtie and Color Space cutcopy11 SOLiD 9 02-05-2010 02:50 AM
direct mapping of color-space data against color-space begsch SOLiD 1 09-09-2009 09:25 PM

Reply
 
Thread Tools
Old 06-13-2011, 02:09 PM   #1
akolman
Junior Member
 
Location: Cambridge, MA

Join Date: Jun 2011
Posts: 7
Default R: heatmap color palette

Hello,

I am using R to get the correlation matrix for some gene expression data. I have the correlation matrix, and I want to use a heatmap to visualize it.

I would like to use a different color palette than the default from the heatmap, something ranging from blue to red, what is the easiest way to do this?

Thanks in advance.
akolman is offline   Reply With Quote
Old 06-13-2011, 03:14 PM   #2
ECO
--Site Admin--
 
Location: SF Bay Area, CA, USA

Join Date: Oct 2007
Posts: 1,358
Default

Maybe this will help. You can set the high:low colors at will:

http://learnr.wordpress.com/2010/01/...tmap-plotting/
ECO is offline   Reply With Quote
Old 06-14-2011, 05:43 AM   #3
mgogol
Senior Member
 
Location: Kansas City

Join Date: Mar 2008
Posts: 197
Default

You can use RColorBrewer... there's a number of pre-made palettes, one of which is called RdBu and goes from Red to White to Blue.

hmcol<-brewer.pal(11,"RdBu")
heatmap(data,col=hmcol)

You can also use something like
hmcols<-colorRampPalette(c("red","white","blue"))(256)

to get more creative with your colors.
mgogol is offline   Reply With Quote
Old 06-14-2011, 08:47 AM   #4
severin
Genome Informatics Facility
 
Location: Iowa @isugif

Join Date: Sep 2009
Posts: 105
Default R heatmap.2

I am a big fan of heatmap.2 in R that you can download from CRAN gplots.

heatmap.2(as.matrix(your data),col =
colorRampPalette(c("white","green","green4","violet","purple"))(100))

This color code is also color blind friendly.
severin is offline   Reply With Quote
Old 06-15-2011, 07:30 AM   #5
Joann
Senior Member
 
Location: Woodbridge CT

Join Date: Oct 2008
Posts: 231
Default A handy guide to picking colors to work in gray scale

For many cases in facilitating the further use of published data presented in color, here is a technique for making your color choices so they live on in black and white 2nd gen copy.

See illustration:
"To pick colors easily discernible from each other, whether in color or converted to grayscale, spiral through the color wheel."

Bang Wong Nature Methods 7:573 (2010)
doi: 10.1038/nmeth0810-573
Joann is offline   Reply With Quote
Old 06-16-2011, 11:51 AM   #6
Deli Çoban
Junior Member
 
Location: evde

Join Date: May 2011
Posts: 6
Default

Quote:
Originally Posted by ECO View Post
Maybe this will help. You can set the high:low colors at will:

http://learnr.wordpress.com/2010/01/...tmap-plotting/
Really thanks for your valuable contribution..
Deli Çoban is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 06:18 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO