Oh that actually worked, thank you very much Daiana!!
Hi, I am doing DE miRNA analysis using EdgeR and I need to make a heatmap for the top 50 DE miRNAs, or the most VARIABLE ones.
EdgeR userguide suggests: logcounts <- cpm(y, log=TRUE)
where y is the DGEList object.
The problem is with labelling, I want the names of miRNAs to show on the heatmap but " y" object takes no names, only counts matrix, and I'm not sure how to annotate it with the miRNA names. Any help?
2 answers
Hi,
Have you tried adding rownames to your matrix as row.names(y)<-gene_names_array?
Best,
Daiana
Just add whatever gene names you want the heatmap to show as row.names of logcounts. See the Section Heatmap clustering of the
edgeR QL workflow
for a complete worked example. The workflow uses coolmap but the same advice would apply for any heatmap function. By default, the row.names of logcounts will be the gene IDs.
That's the problem, by default the row names of logcount is not gene ID, it's just numbers 1,2,3....etc. So after few processing steps I no more know what genes are there, I just have a matrix of values.
The row.names are gene IDs by default. But if you don't supply any row names when the DGEList is created then the IDs will be set to 1, 2, 3 etc.
Log in to answer this question.
I cannot follow. With
yI guess you mean the DGEList object? Please try to explain better what the problem is, best would be to show code.The output from your command should have row names containing the gene names, assuming you provided that information when you made the DGEList. What are you using to make the heatmap? Pretty much any heatmap package will have a parameter to show the row names.
The resulting heatmap shows some random numbers as gene names instead of my gene names: