Re: [R] heatmap.2, adding a legend at bottom

2018-10-04 Thread Ding, Yuan Chun
ot;Legend", xpd=TRUE) David L Carlson Department of Anthropology Texas A University College Station, TX 77843-4352 -Original Message- From: R-help On Behalf Of Ding, Yuan Chun Sent: Thursday, October 4, 2018 1:19 PM To: r-help@r-project.org Subject: Re: [R] heatmap.2,

Re: [R] heatmap.2, adding a legend at bottom

2018-10-04 Thread David L Carlson
ot;Legend", xpd=TRUE) David L Carlson Department of Anthropology Texas A University College Station, TX 77843-4352 -Original Message- From: R-help On Behalf Of Ding, Yuan Chun Sent: Thursday, October 4, 2018 1:19 PM To: r-help@r-project.org Subject: Re: [R] heatmap.2, adding a lege

Re: [R] heatmap.2, adding a legend at bottom

2018-10-04 Thread Ding, Yuan Chun
Hi All, I generated the attached heatmap using the following R code and attached testfile. I tried to move the legend to the bottom, Can anyone help me? I have played for 3 hours and can not resolve the problem. I realized that in the last email, I forgot to include the "Group" variable

[R] heatmap.2, adding a legend at bottom

2018-10-04 Thread Ding, Yuan Chun
Hi All, I generated the attached heatmap using the following R code and attached testfile. I tried to move the legend to the bottom, Can anyone help me? I have play for 3 hours and can not resolve the problem. Thank you, Ding

Re: [R] Heatmap.2 error

2015-06-19 Thread Adams, Jean
Pijush, The error is a result of you having repeated color values. The warnings can be addressed by changing the arguments that you use. Attachments are removed from posts to R Help, so I used different data to show you an example. Jean library(gplots) data(mtcars) x -

[R] Heatmap.2 error

2015-06-19 Thread Pijush Das
Dear Sir, Please help me solving the error occurring during the execution of the code given below. library(openxlsx) library(gplots) library(RColorBrewer) rix - read.xlsx(file.choose(), sheet = 1, colNames = TRUE,rowNames = TRUE) rawdata - data.matrix(rix) colors =

Re: [R] heatmap.2 problem

2013-01-13 Thread Uwe Ligges
On 12.01.2013 23:40, Peter Davidsen wrote: Dear List, I'm trying to generate a simple heatmap that has each row and column separated by a black line. However, for some reason this only happens for the first and last color. The middle color in my colorpanel() command has an addition horizontal

Re: [R] heatmap.2 problem

2013-01-13 Thread Peter Davidsen
Sorry, I should have added library(gplots) in the beginning of my code On Sun, Jan 13, 2013 at 5:04 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: mycol - colorpanel(n=3,green,grey,red) - - - Peter K Davidsen | MSc, PhD stud. | Centre for Systems Biology | Univ. of Liverpool |

[R] heatmap.2 problem

2013-01-12 Thread Peter Davidsen
Dear List, I'm trying to generate a simple heatmap that has each row and column separated by a black line. However, for some reason this only happens for the first and last color. The middle color in my colorpanel() command has an addition horizontal and vertical line that I would like to get rid

[R] heatmap.2 clustering and adding add.expr

2012-06-06 Thread Tanu Soni
Hi , I am trying to plot a heatmap with a correlation matrix and trying to highlight significant correlations . i am using my matrix d874n has 78 columns ex2-corAndPvalue(data.matrix(d874n),use = pairwise.complete.obs) ##creating a matrix of true false using p values sig-ex2$p0.05 nx=78 ny=78

[R] heatmap.2 (blurred output heatmap)

2011-11-29 Thread Stuart
Hi I used to make heatmaps using following commands but now some thing has changed as I get library(gplots) heatmap. 2(qtl.map,Rowv=F,dendrogram=column,col=colorRampPalette(c(blue,lightblue,black,black,yellow,red)),breaks=seq(-4.01,4.01,length.out=51), density.info=none, ) following error and

Re: [R] heatmap.2 (blurred output heatmap)

2011-11-29 Thread Uwe Ligges
example(heatmap.2) works for me, hence it is either your data, your version of some package or your version of R that causes the problems, we do not have information of any of these although the posting guide asks you to provide this for each posting. So we cannot help. Uwe Ligges On

[R] heatmap.2 with colsep and sepwidth

2011-09-21 Thread Christian Ruckert
I am using attributes colsep and sepwidth from heatmap.2 function, however when using larger values for sepwidth the following columns are not moved to the right but the seperator is covering the column(s) with a white bar and the column labels and ColSideColors remain at their positions, is

Re: [R] heatmap.2 - change column row locations; angle / rotate

2011-04-18 Thread Karl Brand
Hi Chakravarthy, [dont forget to Cc the list for useRs with the same Q.] If you're trying to reuduce the isze of your row or column labels, i think the following arguments of heatmap.2 {gplots} is what you want to adjust- 'cexCol' and 'cexRow'. Specifically on my question that you ask

[R] heatmap.2

2010-11-29 Thread Martin Knapp
Dear List! I'm using R2.8.1 with windows. In my Analysis I use the heatmap.2 function. That works quite well except there is one little detail I can't change. I like to make the key a bit smaller than default. So I pass in keysize=1 into the function. The key is smaller, but the main and the x y

[R] heatmap.2() yielding an inappropriate key?

2010-07-19 Thread Karl Brand
Esteemed R-users, heatmap.2() is yielding an inappropriate key based on my colors and break-points. In the reproducible example below, the key is inappropriate (to me) because- 1. 'Orange' is simply not represented in the key, despite its prescence in the heatmap. 2. The proportions of the

Re: [R] heatmap.2() yielding an inappropriate key?

2010-07-19 Thread Karl Brand
I see now my error, several in fact: The 'breaks' specified need to be of a similar range to the data range, and they should be equally spaced. So in my example: breaks = seq(0, 0.2, 0.001) If one needs uneqaully spaced coloring, as i do, then this is achieved by specifying the approprate

[R] heatmap.2 - change column row locations; angle / rotate

2010-07-18 Thread Karl Brand
Esteemed R user's, I'm struggling to achieve some details of a heatmap using heatmap.2(): 1. Change label locations, for both rows columns from the default right bottom, to left and top. Can this be done within heatmap.2()? Or do i need to suppress this default behavior (how) and call a new

[R] heatmap.2

2010-04-28 Thread carol white
Hi, Does heatmap.2 function combine all variables into a single overall measure of dissimilarity (regardless of dissimilarity) between two observations as explained in The elements of statistical learning, Hastie et al, 2001, pp457? Does this function calculate the dissimilarity between

[R] heatmap.2 - ColSideColors question

2010-03-16 Thread Tim Smith
Hi, I wanted to make more than one side color bar. For example, I can make one side color bar (col1) with the following code: --- library(gplots) mat - matrix(sample(1:100,40),nrow=5) class1 - c(rep(0,4),rep(1,4)) col1 - ifelse(class1 == 0,blue,red) class2 -

Re: [R] heatmap.2 - ColSideColors question

2010-03-16 Thread Rainer Machne
On 03/16/2010 04:06 PM, Tim Smith wrote: Hi, I wanted to make more than one side color bar. The function heatmap.plus (library: heatmap.plus) can do that, just combine the different color vectors with cbind(col1,col2). Unfortunately the arguments required for heatmap, heatmap.2 and

[R] heatmap.2 color range

2010-01-26 Thread evgeny55
Hi, I'm trying to create a heatmap with color ranges for different values in my matrix. For example: If x 5 , use orange gradient if x 1.5, use red gradient . Right now I have the following: orgPal-brewer.pal(3,Oranges) bluPal-brewer.pal(3,Blues) redPal-brewer.pal(3,Reds) grad -

Re: [R] heatmap.2 color range

2010-01-26 Thread Dieter Menne
evgeny55 wrote: I'm trying to create a heatmap with color ranges for different values in my matrix. For example: If x 5 , use orange gradient if x 1.5, use red gradient . Right now I have the following: orgPal-brewer.pal(3,Oranges) bluPal-brewer.pal(3,Blues)

Re: [R] heatmap.2 color range

2010-01-26 Thread evgeny55
as a followup, I tried using the rainbow function to create the gradients but is there a way to do a reverse rainbow, ie. normally if I do: pie(rep(1,6), col=rainbow(6,start=0, end=.07)) I'll get a gradient from dark red to orangish but what if I want it to go the other way thanks -- View

Re: [R] heatmap.2 color range

2010-01-26 Thread evgeny55
thanks, I think I got the color ranges down, however, I just realized that the colors don't match the data. When I execute: grad - ifelse(randMat 5,yelPal,ifelse(randMat1.5,redPal,bluPal)) the grad matrix contains the correct hex codes corresponding to the randMat data matrix but when I

Re: [R] heatmap.2 color range

2010-01-26 Thread evgeny55
also, can you point me to some example of how to omit colors from a palette -- View this message in context: http://n4.nabble.com/heatmap-2-color-range-tp1293498p1311031.html Sent from the R help mailing list archive at Nabble.com. __

[R] heatmap.2 adapting the colour scale and text overlay

2009-11-23 Thread Daniel Brewer
Hello, I am using heatmap.2 from the gplots library to plot a small symmetrical matrix. This is the command: heatmap.2(tempHeat,symm=T,trace=none,cexRow=0.7,cexCol=0.7,col=redgreen,density.info=none) I have a couple of questions: 1) The range is from -0.2 to 0.4 and the colour scheme I am

Re: [R] heatmap.2 adapting the colour scale and text overlay

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 10:02 AM, Daniel Brewer wrote: Hello, I am using heatmap.2 from the gplots library to plot a small symmetrical matrix. This is the command: heatmap. 2 (tempHeat ,symm = T ,trace =none,cexRow=0.7,cexCol=0.7,col=redgreen,density.info=none) I have a couple of

Re: [R] heatmap.2

2009-10-14 Thread Dieter Menne
John Celniker wrote: ... when I try to change the breaks to: br2 [1] 0.000 0.5337751 1.0675502 1.6013253 2.1351003 3.000 3.500 4.000 4.500 [10] 4.8039758 I get the correct heatmap representation but the color key does not update correctly to reflect changes in

[R] heatmap.2

2009-10-13 Thread John Celniker
Hi folks, I have been working with the ellipse library and trying to use the heatmap.2 function. I have called the function as follows hh - heatmap.2(DATA, Rowv= F, trace = none, colsep=seq(1, 4), rowsep = seq(1,dim(GENES)[1]), col = brewer.pal(9, YlOrRd), lmat=rbind( c(3,

[R] heatmap.2

2009-10-13 Thread John Celniker
Hi folks, I have been working with the ellipse library and trying to use the heatmap.2 function. I have called the function as follows hh - heatmap.2(DATA, Rowv= F, trace = none, colsep=seq(1, 4), rowsep = seq(1,dim(GENES)[1]), col = brewer.pal(9, YlOrRd), lmat=rbind( c(3, 4,0),

[R] heatmap.2

2009-10-13 Thread John Celniker
Hi folks, I have been working with the ellipse library and trying to use the heatmap.2 function. I have called the function as follows hh - heatmap.2(DATA, Rowv= F, trace = none, colsep=seq(1, 4), rowsep = seq(1,dim(GENES)[1]), col = brewer.pal(9, YlOrRd), lmat=rbind( c(3, 4,0),

[R] heatmap.2() problems with re-ordering of rows and columns

2009-09-17 Thread bioinformatics_guy
I have a file of the following form -11 -10 -9 -8 -10 -9 -8 NA -9 -7NA NA -8NA NA NA So basically a NxN matrix of log scores. I want to get a heatmap of these log scores but I'm having a problem. I'm using the following code library(gplots)

Re: [R] heatmap.2() problems with re-ordering of rows and columns

2009-09-17 Thread Schalk Heunis
Hi bioinformatics_guy I think you are looking for the image function: image(mat) The heatmap.2 function does hierarchical clustering on rows and columns and then orders the rows and columns according to the results of the clustering. Image simply plots the matrix. HTH Schalk Heunis On Thu,

Re: [R] heatmap.2() problems with re-ordering of rows and columns

2009-09-17 Thread bioinformatics_guy
Schalk, Thats a great function! The only question is, is it as flexible as heatmap.2? I figured out how to get it from rearranging the rows and columns but I can't figure out how to label the rows and columns? What I like about the heatmap.2 is that it gives a grid and histogram of the heatmap

Re: [R] heatmap.2() problems with re-ordering of rows and columns

2009-09-17 Thread Schalk Heunis
Try placing the column names into labCol and the rownames into labRow e.g.heatmap.2(mat,dendrogram=c(none), Rowv=F, Colv=F, labRow = seq(-7.5,7.5,by=5), labCol=seq(-3,3,by=2)) Schalk Heunis On Thu, Sep 17, 2009 at 3:53 PM, bioinformatics_guy wwwhite...@gmail.comwrote: Schalk, Thats a great

Re: [R] heatmap.2: question regarding the raw z-score

2009-07-09 Thread Chrysanthi A.
Thanks a lot..! What exactly the sweep function is doing? Also, is there a possibility instead of using the mean of the whole row to get only the mean of a group of the row values? So the values in the matrix (heat map) used in the comparison are z-scores and not the intensities of the gene

Re: [R] heatmap.2: question regarding the raw z-score

2009-07-09 Thread James W. MacDonald
Hi Chrysanthi, Chrysanthi A. wrote: Thanks a lot..! What exactly the sweep function is doing? Also, is there a possibility instead of using the mean of the whole row to get only the mean of a group of the row values? So the values in the matrix (heat map) used in the comparison are z-scores

[R] heatmap.2: question regarding the raw z-score

2009-07-08 Thread Chrysanthi A.
Hi, I am analysing gene expression data using the heatmap.2 function in R and I was wondering what is the formula of the raw z-score bar which shows the colors for each pixel. According to that post: https://mailman.stat.ethz.ch/pipermail/r-help/2006-September/113598.html, it is the (actual

Re: [R] heatmap.2: question regarding the raw z-score

2009-07-08 Thread James W. MacDonald
Hi Chrysanthi, Chrysanthi A. wrote: Hi, I am analysing gene expression data using the heatmap.2 function in R and I was wondering what is the formula of the raw z-score bar which shows the colors for each pixel. According to that post:

[R] heatmap.2 does not accept dendogram passed to Rowv param

2009-04-25 Thread Mark Borowsky
heatmap.2() from gplots does not seem to accept a dendrogram produced by the stats package function heatmap(): testHeatmap=heatmap(test[,1:40],Colv=NA,col=bluewhitered(256),labRow=testL,keep.dendro=TRUE) # draws expected image # to prove this dendro is OK, redraw with same function:

Re: [R] heatmap.2 no reordering of the columns and rows

2009-04-07 Thread James W. MacDonald
Hi Tanuja, Tanuja Bompada wrote: Hi, I need to generate a heatmap on a square matrix and wouldn't want to reorder the columns and the rows on the heatmap display. I have used the options Rowv=NULL and Colv=NULL but doesn't seem to work. Following is a snippet of the heatmap function i am

Re: [R] heatmap.2 no reordering of the columns and rows

2009-04-07 Thread Tanuja Bompada
Thanks James. That worked. Tanuja --- On Tue, 4/7/09, James W. MacDonald jmac...@med.umich.edu wrote: From: James W. MacDonald jmac...@med.umich.edu Subject: Re: [R] heatmap.2 no reordering of the columns and rows To: Tanuja Bompada tanujabomp...@yahoo.com Cc: r-help@r-project.org Date: Tuesday

[R] heatmap.2 no reordering of the columns and rows

2009-04-06 Thread Tanuja Bompada
Hi,   I need to generate a heatmap on a square matrix and wouldn't want to reorder the columns and the rows on the heatmap display.    I have used the options Rowv=NULL and Colv=NULL but doesn't seem to work. Following is a snippet of the heatmap function i am using. args - commandArgs();

Re: [R] heatmap.2 color issue

2009-01-21 Thread Matthias Kohl
the heatmapCol function of package MKmisc might help ... try: library(MKmisc) example(heatmapCol) Best Matthias Liu, Hao [CNTUS] wrote: Dear All: I tried to use heatmap.2 to generate hierarchical clustering using the following command: heatmap.2(datamatrix, scale=row, trace=none,

[R] heatmap.2 color issue

2009-01-20 Thread Liu, Hao [CNTUS]
Dear All: I tried to use heatmap.2 to generate hierarchical clustering using the following command: heatmap.2(datamatrix, scale=row, trace=none, col=greenred(256), labRow=genelist[,1], margins=c(10,10), Rowv=TRUE, Colv=TRUE) datamatrix is subset of a RMA normalized data subset by a genelist.

Re: [R] heatmap.2 and three colours for specific ran gesþ

2009-01-07 Thread YH Deng
] heatmap.2 and three colours for specific rangesþ Hi, I hope to show a heatmap with thre colours, no gradation. How to specify heatmap.2 to map green for values less than -1, gray for values between -1 and 1, and red for values greater than 1 ? Thanks [[alternative HTML version deleted

[R] heatmap.2 and three colours for specific r anges‏

2009-01-06 Thread Daren Tan
Hi, I hope to show a heatmap with thre colours, no gradation. How to specify heatmap.2 to map green for values less than -1, gray for values between -1 and 1, and red for values greater than 1 ? Thanks [[alternative HTML version deleted]] __

[R] heatmap.2 question

2008-11-03 Thread Fu Sheng
Hi, there, I am planning to use heatmap.2 function to draw some heatmaps. However, I don't want to use default set manhattan distance and complete linkage in heatmap.2. How should I change parameters distfun and hclustfun? Thank you. ys [[alternative HTML version deleted]]

Re: [R] heatmap.2 dendogram algorithm

2008-06-17 Thread James W. MacDonald
RobertsLRRI wrote: Hello does anyone know what algorithm is used to produce the hierarchical clustering in the gplots package using the function heatmap.2? I think it may be the complete linkage clustering algorithm, but I can't find a source that seems reliable. Did you look at the help

[R] heatmap.2 dendogram algorithm

2008-06-16 Thread RobertsLRRI
Hello does anyone know what algorithm is used to produce the hierarchical clustering in the gplots package using the function heatmap.2? I think it may be the complete linkage clustering algorithm, but I can't find a source that seems reliable. Thank you and sorry if I posted this in the wrong

Re: [R] Heatmap.2 - eliminate cluster and dendrogram

2008-05-15 Thread Matthias Kohl
Dear Peter, heatmap.2(z, dendrogram = none, Rowv = FALSE, Colv = FALSE) should do what you want. Best, Matthias Peter Scacheri wrote: Using the heatmap.2 function, I am trying to generate a heatmap of a 2 column x 500 row matrix of numeric values. I would like the 1st column of the matrix

Re: [R] Heatmap.2 - eliminate cluster and dendrogram

2008-05-15 Thread Peter Scacheri
Thanks Matthias, I tried that, but received the following error message: Error in image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 + : dimensions of z are not length(x)(+1) times length(y)(+1) -Peter At 10:18 AM +0200 5/15/08, Matthias Kohl wrote: Dear Peter,

Re: [R] Heatmap.2 - eliminate cluster and dendrogram

2008-05-15 Thread James W. MacDonald
heatmap.2(z, col = greenred(100), dendrogram = none, Rowv = FALSE) NULL isn't one of the accepted values for the dendrogram argument. See ?heatmap.2 Best, Jim Peter Scacheri wrote: Using the heatmap.2 function, I am trying to generate a heatmap of a 2 column x 500 row matrix of numeric

Re: [R] Heatmap.2 - eliminate cluster and dendrogram

2008-05-15 Thread Matthias Kohl
Dear Peter, the call works for me; e.g. x - matrix(rnorm(100), ncol = 4) heatmap.2(x, dendrogram=none, Colv = FALSE, Rowv = FALSE) There seems to be something wrong with your matrix z ... Best, Matthias Peter Scacheri wrote: Thanks Matthias, I tried that, but received the following error

[R] Heatmap.2 - eliminate cluster and dendrogram

2008-05-14 Thread Peter Scacheri
Using the heatmap.2 function, I am trying to generate a heatmap of a 2 column x 500 row matrix of numeric values. I would like the 1st column of the matrix sorted from the highest to the lowest values - so that the colors reflected in the first column of the heatmap (top to bottom) go from