Thread: baySeq
View Single Post
Old 01-02-2014, 12:28 PM   #3
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

The general idea is to sort the p-value/logFC/whatever that you want to color by, select the 100th (or whatever) highest/lowest value from that, and then use ifelse() to do the coloring. The following is some basic R pseudo-code, since I don't use baySeq:

Code:
threshold <- sort(abs(logFC),partial=length(logFC)-100, decreasing=T)[length(logFC)-100]
plotMA.CD(CD, samplesA = 1:5, samplesB = 6:10, col = ifelse(abs(logFC) >= threshold, "red", "black"))
dpryan is offline   Reply With Quote