I have recently produced an unsupervised hierarchical cluster heat map using 30 different RNA-seq samples. The x axis is labelled as the name of each sample, and the y axis displays the 100 most variable genes presented as mouse Ensembl ID's (e.g. ENSMUSG00000020573).
I was just wondering if there was a way for me to replace the Ensembl ID's with gene names (e.g. Pik3cg) before I input it into the pheatmap() function.
My input table is:
WT_Animal1 WT_Animal2 WT_Animal3
ENSMUSG00000094652 0.03463869 0.7333992 -0.29986091
ENSMUSG00000006356 -0.64264559 -0.5609578 -0.06037522
ENSMUSG00000019897 0.09159506 -0.1133322 -0.12974861
ENSMUSG00000027790 -0.25124228 1.2871582 -0.92491260
ENSMUSG00000054999 -0.58618795 1.2079283 -0.89929279
ENSMUSG00000072573 0.16812802 0.1058453 -0.16593449
I changed the column names manually using colnames(mat) <- c() but I want to know how to change the row names (Ensembl ID's) using a different function so I can reproduce it in further plots.
I have tried to read up on using biomaRt and other packages but can't seem to work out a way to do it.
Any help would be much appreciated!