Question: How to add Log2FoldChange as an argument for plotMA in DESeq2
0
gravatar for gracechappell
5.4 years ago by
United States
gracechappell70 wrote:

Hello,

I would like to add an argument to the plotMA function in DESeq2.  Specifically, I would like to highlight points on the MA plot that are not only alpha<0.1, but also log2FoldChange <-1 or >1.  Is there a way to achieve this?  I tried the following "ifelse" statement but it did not work.

plotMA(res,alpha=0.1,col=ifesle(log2FoldChange>0.75 | log2FoldChange<-0.75, "red", "grey"), cex=2, ylim=c(-2,2))

thank you!

deseq2 • 2.5k views
ADD COMMENTlink modified 5.4 years ago • written 5.4 years ago by gracechappell70
0
gravatar for vivekbhr
5.4 years ago by
vivekbhr630
Germany
vivekbhr630 wrote:

You can subset the DESeq result object by abs(logFC) > 1, then plot by plotMA. That's the fastest..

ADD COMMENTlink written 5.4 years ago by vivekbhr630
0
gravatar for gracechappell
5.4 years ago by
United States
gracechappell70 wrote:

Thanks for the reply, Vivek.  I'd like to retain the non-significant points in my plot as grey.  By subsetting I only plot those that meet my criteria. 

 

ADD COMMENTlink written 5.4 years ago by gracechappell70

You can manually make the MA plot with all the genes, then color the genes of interest.

ADD REPLYlink modified 13 months ago by _r_am32k • written 5.2 years ago by vivekbhr630
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1583 users visited in the last hour
_