Question: I would like to download list of Heatmap.
0
gravatar for junghyunshim
9 months ago by
junghyunshim0 wrote:

Hi, I have made successfully a heatmap of gene expression comprising of about 600 genes. The 600 genes were clustered and the order is changed from input data list. In the heatmap, I can't see the order because the 600 gene names are overlapped. Now I would like to see or download the new list of the genes in excel or text. Kindly let me know how to do it. Thanks!^^

snp rna-seq R gene • 272 views
ADD COMMENTlink modified 9 months ago • written 9 months ago by junghyunshim0

Which heatmap function did you use? This is important. For example, here is how to do it with pheatmap: A: extract dendrogram cluster from pheatmap

ADD REPLYlink written 9 months ago by Kevin Blighe52k

Thanks for your reply. I used the script as below.

heat2<-heatmap.2(as.matrix(Shoot2), density.info="none", scale="row", trace="none", dendrogram="row", Rowv=T, Colv=FALSE,cexRow=1, col=myPalette, margins=c(11,24))

And I followed the script which you attached, I don't get anything.

    rownames(Shoot2[heat2$tree_row[["order"]],])

character(0)
ADD REPLYlink modified 9 months ago by genomax75k • written 9 months ago by junghyunshim0

I used the heatmap.2 as below.

heat2<-heatmap.2(as.matrix(Shoot2), density.info="none", scale="row", trace="none", dendrogram="row", Rowv=T, Colv=FALSE,cexRow=1, col=myPalette, margins=c(11,24))

I got it using below.

colnames(dat)[out$colInd]

I can get the list only. How can I get all the matrix according to the list? I copied and pasted the list to excel and get the matrix data from the original file using v-lookup. It took a while for re-arranging the list from R to one column of excel. Thanks!!!

ADD REPLYlink modified 9 months ago by genomax75k • written 9 months ago by junghyunshim0

Okay, cool, so, everything is now okay?

ADD REPLYlink written 9 months ago by Kevin Blighe52k

Thanks. it is getting better.

However I can get the list only. How can I get all the matrix according to the list?

I copied and pasted the list to excel and get the matrix data from the original file using v-lookup. It took a while for re-arranging the list from R to one column of excel.

ADD REPLYlink written 9 months ago by junghyunshim0

You mean to re-order the data matrix based on the indices? The indices relate to your original matrix. So, you should be able to do something like:

dat[,out$colInd]
ADD REPLYlink written 9 months ago by Kevin Blighe52k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 700 users visited in the last hour