I have analysed some microarrays using limma and would like to plot a heatmap of the most differentially expressed genes, say the top 50.
I understand coolmap is the best tool for this - however when I run my code I get the following error - how should I fix this?
RG <- read.maimages(files,
source="agilent",
path= "R:\\Transposons\\Shared\\OneDrive_3_27-11-2019",
green.only = TRUE)
RG <- backgroundCorrect(RG, method="normexp")
MA <- normalizeBetweenArrays(RG, method = "quantile")
design <- cbind(WT=c(1,1,1,1,1,1,0,0,0,0,0,0),MU=c(0,0,0,0,0,0,1,1,1,1,1,1))
fit <- lmFit(MA, design)
cont.matrix <- makeContrasts(MUvsWT=MU-WT, levels=design)
fit2 <- contrasts.fit(fit, cont.matrix)
fit3 <- eBayes(fit2)
topTable(fit3, adjust="BH")
coolmap(MA)
> > coolmap(MA)
Error: cannot allocate vector of size 14.8 Gb
1 answer
The error you got is about memory limitation which is a known error when you ask R to load a huge file. If you want to know more about this, follow these StackOverflow links:
1- https://stackoverflow.com/questions/5171593/r-memory-management-cannot-allocate-vector-of-size-n-mb
For differentially expressed genes, you can use any package you want. I would like to use:
1- for quick visualization, pheatmap package. A nice tutorial could be found here.
2- For professional heatmap, ComplexHeatmap package. Its vignette could be found here. BUT Kevin Blighe wrote a concise (strongly recommended) tutorial which you may find here.
Log in to answer this question.
Please do not use
preandcodetags - use the101010option on the toolbar instead. Manually adding these HTML tags interferes with the site's functionality.