0
0
Entering edit mode
2.3 years ago

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!^^

gene rna-seq RNA-Seq SNP R • 458 views
0
Entering edit mode

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

0
Entering edit mode

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 REPLY 0 Entering edit mode 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!!!

0
Entering edit mode

Okay, cool, so, everything is now okay?

0
Entering edit mode

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.

0
Entering edit mode

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]