Entering edit mode
mictadlo
▴
10
@mictadlo-10885
Last seen 5.1 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,
Actually logCPM already had those row names when you created it. Then you removed the row names by
That removes the row names because you don't have any annotation column called "genes".