How to plot heatmap of differentially expressed genes using limma results
1
2
Entering edit mode
3.5 years ago
saw44 ▴ 30

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
limma microarray expression heatmap • 3.3k views
ADD COMMENT
0
Entering edit mode

Please do not use pre and code tags - use the 101010 option on the toolbar instead. Manually adding these HTML tags interferes with the site's functionality.

code_formatting

ADD REPLY
0
Entering edit mode
3.5 years ago

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

2- https://stackoverflow.com/questions/49161802/random-forest-with-r-cannot-allocate-vector-of-size-7-5-gb

3- https://stackoverflow.com/questions/13343299/r-any-other-solution-to-cannot-allocate-vector-size-n-mb-in-r

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2630 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6