Hey everybody
I have a series of .csv files from RNA-seq data stored in a list and I am trying to produce a heatmap for each of them by using heatmap3
function combined with lapply
in R, after first converting each of them to a matrix.
I am try running this chunk of code, but without success:
heatmaps <- lapply(list, function(x) {
genes_heatmap <- as.matrix(x)
heatmap3(genes_heatmap, margins=c(5,8), cexRow = 0.1, cexCol = 0.8, showRowDendro = TRUE, ColSideWidth = 0.8, Colv = NA, Rowv = T)
})
it seems like it keeps running but it does not produce any result. I was expecting to obtain all the heatmaps stored in a large list returned by lapply, but it does not seem the case.
I would like to successfully generate all the heatmaps and save them as .pdf files, each of them separately.
Thanks in advance!
Thanks a lot! It worked perfectly!