High normalized counts on DESeq2 MAplot
2
0
Entering edit mode
rbronste ▴ 60
@rbronste-12189
Last seen 5.0 years ago

I am wondering how to isolate points on an MAplot that are in the area of high normalized counts above a certain lfc threshold, without changing the low end of the normalized counts that are part of the dds. Also is there a quick way to infer at what alpha these points lie.

Currently Im running the following code and while I do get some of the points in this high count tail, I also get the low. 

resG <- results(dds, lfcThreshold=4, altHypothesis="lessAbs", format = c("DataFrame"), contrast=c("group", "E", "veh"))

drawLines <- function() abline(h=c(-4,4),col="dodgerblue",lwd=2)

plotMA(resG, alpha = .01, ylim = c(-8, 8)); drawLines()

https://www.dropbox.com/s/9og0mhsxrxc2ax9/Screen%20Shot%202018-11-15%20at%202.58.11%20PM.png?dl=0

Thank you!

deseq2 maplot • 1.4k views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

You want to get the index/rowname of the points or you want to highlight them on the plot? I don't follow your question.

ADD COMMENT
0
Entering edit mode

Actually I would like to do both. 

ADD REPLY
1
Entering edit mode

You can use identify() to pick individual points. First do this:

plot(log10(res$baseMean), res$log2FoldChange)

Then you can call identify() with the same two arguments which will let you know the row number of these points. Type Esc to stop the process.

ADD REPLY
0
Entering edit mode

Very helpful however still confused about the following:

When I do:

plot(log10(res$baseMean), res$log2FoldChange)

​I get now an MA plot that looks like before where every point is a black hollow circle, and if I try to limit it in this way:

plot(log10(res$baseMean > 3), res$log2FoldChange > 0.5)

I get a plot with simply two points.

Maybe Im getting something confused?

​Im just trying to take the red points on the right side of that initial MAplot I posted and isolate them, to see what they are - and wanted to maybe do it without recalling dds with different settings (higher bound on counts).

Also can you apply identify() to plotMA, as in the original one I posted and identify specific points?

ADD REPLY
1
Entering edit mode

That code above isn’t really a meaningful R expression. The greater than sign is producing a logical vector (0s and 1s...). Maybe follow James advice and just use a built in package, or recruit an R coder to help out.

Yes you can apply identify() to plotMA() output as well. You would take off the log10 from baseMean.

ADD REPLY
0
Entering edit mode

Thanks for the help.

ADD REPLY
0
Entering edit mode

Yes I apologize did not do a simple subset operation there prior to plot. 

ADD REPLY
1
Entering edit mode
@james-w-macdonald-5106
Last seen 9 minutes ago
United States

You might try Glimma, particularly glMDPlot, which is pretty sweet.

ADD COMMENT

Login before adding your answer.

Traffic: 1042 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