heatmap.2
3
0
Entering edit mode
@anastasia-gioti-3205
Last seen 9.6 years ago
Dear Bioconductors, i have a question about parameters of heatmap.2 function in gplots. I am plotting log10 pvalues ranging from say -40 to 20 using a redblue and want to produce a key which reflects this distribution: Negative pvalues in blue, positive in red. as the distribution is not symmetric, there seems to be a problem. The symkey parameter, if set in TRUE, makes the color key symmetric about 0). I want to assign more blue colors of the panel to negative pvalues and less colors of the red panel in positive, but I realize this is not what symkey does: the key layout is centred around zero, but the color distribution not: white (middle panel) colors are around -10, whereas after +10 the key colors are just absent Here are my parameters: heatmap.2(tabNew, Rowv=as.dendrogram(hrR), Colv=as.dendrogram(hrC), col=redblue(100)[100:1], scale="none", key=TRUE, keysize=0.7, symkey=TRUE, trace="none", cexRow=0.8, cexCol=1.1, margins=c(8,32), main=paste(name, '_', dim(tabNew)[1], ' categories', sep='') ) I work with R.2.6 version. How can I achieve this? I do not want to change my values and make them symmetric, as I d like toi reflect the unequal distribution. Any ideas? Thanks, Natassa Gioti Research Associate - Bioinformatics Institute of Healthy Ageing, and GEE Room 326, The Darwin Building University College London Gower Street, London WC1E 6BT, UK.
ASSIGN ASSIGN • 2.5k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On Tue, Dec 23, 2008 at 9:19 AM, Anastasia Gioti <a.gioti@ucl.ac.uk> wrote: > > Dear Bioconductors, > i have a question about parameters of heatmap.2 function in gplots. I am > plotting log10 pvalues ranging from say -40 to 20 using a redblue and want > to produce a key which reflects this distribution: Negative pvalues in > blue, positive in red. as the distribution is not symmetric, there seems > to be a problem. The symkey parameter, if set in TRUE, makes the color key > symmetric about 0). I want to assign more blue colors of the panel to > negative pvalues and less colors of the red panel in positive, but I > realize this is not what symkey does: the key layout is centred around > zero, but the color distribution not: white (middle panel) colors are > around -10, whereas after +10 the key colors are just absent > Here are my parameters: > heatmap.2(tabNew, Rowv=as.dendrogram(hrR), Colv=as.dendrogram(hrC), > col=redblue(100)[100:1], scale="none", key=TRUE, keysize=0.7, symkey=TRUE, > trace="none", cexRow=0.8, cexCol=1.1, margins=c(8,32), main=paste(name, > '_', dim(tabNew)[1], ' categories', sep='') ) > I work with R.2.6 version. > > How can I achieve this? I do not want to change my values and make them > symmetric, as I d like toi reflect the unequal distribution. Any ideas? > You'll want to play with the breaks argument. See the help for more details. Hope that gets you going. Sean [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On Tue, Dec 23, 2008 at 10:19 AM, Anastasia Gioti <a.gioti@ucl.ac.uk> wrote: > > > Dear Sean, > > Thanks for help. I followed your advise and with breaks=seq(-3,3,0.05997), > which gives a vector of 101, I can plot my 100 colors of the redblue > panel. However, now i loose the coloring gradient, everything is either > dark blue/ > dark red. You told heatmap.2 to use colors from -3 to 3. I think you mentioned that your data go from -40 to 20? Perhaps you could use that range instead of -3 to 3? Sean [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Max Kauer ▴ 140
@max-kauer-2254
Last seen 7.6 years ago
You can use the heatmapCol function from the Slmisc package max -------------------------------------- Maximilian Kauer CCRI - Children's Cancer Research Institute -----Urspr?ngliche Nachricht----- Von: bioconductor-bounces at stat.math.ethz.ch im Auftrag von Anastasia Gioti Gesendet: Di 23.12.2008 15:19 An: bioconductor at stat.math.ethz.ch Betreff: [BioC] heatmap.2 Dear Bioconductors, i have a question about parameters of heatmap.2 function in gplots. I am plotting log10 pvalues ranging from say -40 to 20 using a redblue and want to produce a key which reflects this distribution: Negative pvalues in blue, positive in red. as the distribution is not symmetric, there seems to be a problem. The symkey parameter, if set in TRUE, makes the color key symmetric about 0). I want to assign more blue colors of the panel to negative pvalues and less colors of the red panel in positive, but I realize this is not what symkey does: the key layout is centred around zero, but the color distribution not: white (middle panel) colors are around -10, whereas after +10 the key colors are just absent Here are my parameters: heatmap.2(tabNew, Rowv=as.dendrogram(hrR), Colv=as.dendrogram(hrC), col=redblue(100)[100:1], scale="none", key=TRUE, keysize=0.7, symkey=TRUE, trace="none", cexRow=0.8, cexCol=1.1, margins=c(8,32), main=paste(name, '_', dim(tabNew)[1], ' categories', sep='') ) I work with R.2.6 version. How can I achieve this? I do not want to change my values and make them symmetric, as I d like toi reflect the unequal distribution. Any ideas? Thanks, Natassa Gioti Research Associate - Bioinformatics Institute of Healthy Ageing, and GEE Room 326, The Darwin Building University College London Gower Street, London WC1E 6BT, UK. _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

Traffic: 946 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6