here is my script:
heatmap.2(
as.matrix(data[,2:7]),
trace="none",
dendrogram="row",
cexRow=0.5, cexCol=0.95,
)
The gene names appear as numbers as I excluded the first column that contains gene names. How can I replace the numbering by gene names?
Many thanks
if you have a matrix object (named m) and a vector of genes (named g), you can add row names like this:
rownames(m) <- g
you can similarly add the names of columns:
colnames(m) <- vector
then you can re-plot the heatmap of matrix m
Hope this helps. Cheers!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.