heatmap.2 in gplots package

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

heatmap.2 in gplots package

Akkineni,Vasundhara
Hello all,

I am using the heatmap.2 function in the gplots package. I want to supress the reordering of the columns of the data matrix i pass to the function. I used the statement,

heatmap.2(z,Colv=FALSE,dendrogram="row",col=redgreen(75))

where z, is the matrix of data. The output i want should have the rows reordered along with the dendrogram and the columns should be in the original order without any dendrogram. For the above statement i am getting an error:

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)

I also tried using ,
heatmap.2(z,Colv=NULL,dendrogram="row",col=redgreen(75))
for which i am getting the output, but the columns are reordered. How can this be done for the way in which i want the map to appear?

Thanks,
svakki.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: heatmap.2 in gplots package

Warnes, Gregory R
Hello Akkineni,

This bug has already been reported and we have a tentative solution that we are testing.  I'll send you a copy of the modified code once we finish testing.

-G

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of
> Akkineni,Vasundhara
> Sent: Wednesday, February 22, 2006 12:09 PM
> To: [hidden email]
> Subject: [R] heatmap.2 in gplots package
>
>
> Hello all,
>
> I am using the heatmap.2 function in the gplots package. I
> want to supress the reordering of the columns of the data
> matrix i pass to the function. I used the statement,
>
> heatmap.2(z,Colv=FALSE,dendrogram="row",col=redgreen(75))
>
> where z, is the matrix of data. The output i want should have
> the rows reordered along with the dendrogram and the columns
> should be in the original order without any dendrogram. For
> the above statement i am getting an error:
>
> 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)
>
> I also tried using ,
> heatmap.2(z,Colv=NULL,dendrogram="row",col=redgreen(75))
> for which i am getting the output, but the columns are
> reordered. How can this be done for the way in which i want
> the map to appear?
>
> Thanks,
> svakki.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
----------------------------------------------------------------------
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: heatmap.2 in gplots package

Sean Davis
In reply to this post by Akkineni,Vasundhara



On 2/22/06 12:09 PM, "Akkineni,Vasundhara" <[hidden email]>
wrote:

> Hello all,
>
> I am using the heatmap.2 function in the gplots package. I want to supress the
> reordering of the columns of the data matrix i pass to the function. I used
> the statement,
>
> heatmap.2(z,Colv=FALSE,dendrogram="row",col=redgreen(75))
>
> where z, is the matrix of data. The output i want should have the rows
> reordered along with the dendrogram and the columns should be in the original
> order without any dendrogram. For the above statement i am getting an error:
>
> 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)
>
> I also tried using ,
> heatmap.2(z,Colv=NULL,dendrogram="row",col=redgreen(75))
> for which i am getting the output, but the columns are reordered. How can this
> be done for the way in which i want the map to appear?

Use Colv=1:ncol(z), I think.

Sean

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: heatmap.2 in gplots package

Akkineni,Vasundhara
In reply to this post by Akkineni,Vasundhara
I used Colv=1:ncol(z), and i got the display the way i need it. Thanks.

One more question, is there a way to increase the size of the color key in heatmap.2 so that all the tick values(for Eg.,in my case, values range between 10,000-50,000) can be seen clearly. In the normal case i am just able to see the initial tick value which is 10,000. Please suggest a better way to do this.

Thanks for the help.

svakki.

-----Original Message-----
From: Sean Davis <[hidden email]>
To: "Akkineni,Vasundhara" <[hidden email]>, r-help <[hidden email]>
Date: Wed, 22 Feb 2006 12:55:25 -0500
Subject: Re: [R] heatmap.2 in gplots package




On 2/22/06 12:09 PM, "Akkineni,Vasundhara" <[hidden email]>
wrote:

> Hello all,
>
> I am using the heatmap.2 function in the gplots package. I want to supress the
> reordering of the columns of the data matrix i pass to the function. I used
> the statement,
>
> heatmap.2(z,Colv=FALSE,dendrogram="row",col=redgreen(75))
>
> where z, is the matrix of data. The output i want should have the rows
> reordered along with the dendrogram and the columns should be in the original
> order without any dendrogram. For the above statement i am getting an error:
>
> 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)
>
> I also tried using ,
> heatmap.2(z,Colv=NULL,dendrogram="row",col=redgreen(75))
> for which i am getting the output, but the columns are reordered. How can this
> be done for the way in which i want the map to appear?

Use Colv=1:ncol(z), I think.

Sean

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: heatmap.2 in gplots package

Sean Davis



On 2/22/06 3:15 PM, "Akkineni,Vasundhara" <[hidden email]>
wrote:

> I used Colv=1:ncol(z), and i got the display the way i need it. Thanks.
>
> One more question, is there a way to increase the size of the color key in
> heatmap.2 so that all the tick values(for Eg.,in my case, values range between
> 10,000-50,000) can be seen clearly. In the normal case i am just able to see
> the initial tick value which is 10,000. Please suggest a better way to do
> this.

As far as I know there is not an easy way to do this without hacking the
heatmap.2 code, but I could be wrong.  For the purposes of making final
plots, I typically find that the best thing to do is to make a PDF of the
plot and then edit using Adobe or some such thing.

Sean

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html