gene names disapper from heatmap.2 after adding gene descripton
1
0
Entering edit mode
mictadlo ▴ 10
@mictadlo-10885
Last seen 4.3 years ago

Hi, after I added gene description to y <- DGEList(counts=rawCountTable, group=group, genes = merged.descriptions) the gene names have replaced by numbers

> logCPM <- cpm(y, prior.count=2, log=TRUE)
> head(y$genes)
   gene_name                                    gene_description
3  sp0000003                                                <NA>
4  sp0000004                                                <NA>
5  sp0000005                                          PUA domain
6  sp0000006 Sugar efflux transporter for intercellular exchange
8  sp0000008                                                <NA>
12 sp0000012                       Ankyrin repeats (many copies)
> y$samples$group
 [1] Root_tip.1.5 Root_tip.1.5 Root_tip.1.5 Root_tip.1.5 Leaves.1.5   Leaves.1.5  
 [7] Leaves.1.5   Leaves.1.5   Root_tip.2   Root_tip.2   Root_tip.2   Root_tip.2  
[13] Leaves.2     Leaves.2     Leaves.2     Leaves.2     Root_tip.3   Root_tip.3  
[19] Root_tip.3   Root_tip.3   Leaves.3     Leaves.3     Leaves.3     Leaves.3    
Levels: Leaves.1.5 Leaves.2 Leaves.3 Root_tip.1.5 Root_tip.2 Root_tip.3
> rownames(logCPM) <- row.names(y$genes$genes)
> colnames(logCPM) <- paste(y$samples$group, 1:2, sep="-")
> o <- order(tr$table$PValue)
> logCPM <- logCPM[o[1:30],]
> logCPM <- t(scale(t(logCPM)))
> library(gplots)
> col.pan <- colorpanel(100, "blue", "white", "red")
> heatmap.2(logCPM, col=col.pan, Rowv=TRUE, scale="none",
+           trace="none", dendrogram="both", cexRow=0.6, cexCol=0.6, density.info="none")

How is it possible to get back the gene names in heatmap.2?

Best wishes,

heatmap.2 edger • 1.2k views
ADD COMMENT
0
Entering edit mode
mictadlo ▴ 10
@mictadlo-10885
Last seen 4.3 years ago

I think I found the solution rownames(logCPM) <- as.character(row.names(y)).

ADD COMMENT
0
Entering edit mode

Actually logCPM already had those row names when you created it. Then you removed the row names by

rownames(logCPM) <- row.names(y$genes$genes)

That removes the row names because you don't have any annotation column called "genes".

 

ADD REPLY

Login before adding your answer.

Traffic: 787 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