Entering edit mode
4.3 years ago
jaqx008
▴
110
Hello everyone. I am doing a DESeq2 analysis and wanting to identify all the genes (points) colored in red. I found this somewhere (see below) but not sure how to change it to identify all the red and ignore the grey. Any other suggestion apart from this will be helpful. Thanks
plotMA(res, ylim=c(-5,5))
with(res[topGene, ], {
points(baseMean, log2FoldChange, col="dodgerblue", cex=2, lwd=2)
text(baseMean, log2FoldChange, topGene, pos=2, col="dodgerblue")
})
Hi,
It is not clear to me what you want. Do you want to plot the gene ids of the red points? Do you want just to retrieve the gene ids from the red dots?
António
Exactly, to add the gene IDs to the red dots, I can then manually retrieve them.
Hi,
So, it's not a good idea try to plot the names of all those genes, because depending how many genes you want to label (red points - usually dozens to hundreds/thousands), the final result may not be "readable", i.e., most of the gene labels will be overlapped.
So, if what you really want is to identify the gene id of the differentially expressed genes, you can do the following:
Let me know if this does what you need,
António
Hello. Thank you very much for your input. I did run the commands you suggested but it only returned up-regulated genes (they grey) instead of the red. Let me mention that the grey are untreated sample while the red are treatments, hence I want to see up-regulated genes in the treatment (Red dots). I will try to attach an image of what the plot looks like.
https://ibb.co/hf9k89J
The red dots are up- and down-regulated genes depending on the log fold-change, if it is positive or negative, respectively (y-axis). The gray are not untreated or treated, but instead they are the non-significant genes. Each point represents a gene. the log2 fold change is the ratio between log2(treated/untreated) - scale across y-axis -, and the x-axis represents expression level - mean of normalized counts.
Since you have just a few genes that are significant (red) you might want to try the solution of Kevin Blighe below.
If you just print
sign.genes
in R, it should show you all the red dot genes (please check the documentation of plotMA, where it says (citation) ...Statistically significant features are colored red.)I hope this clarifies your doubts.
António
Thank you very much Antonia. your explanation was really helpful. Thank you