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!
Actually I would like to do both.
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.
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?
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.
Thanks for the help.
Yes I apologize did not do a simple subset operation there prior to plot.