Entering edit mode
Richard Green
▴
90
@richard-green-4701
Last seen 10.2 years ago
Howdy,
I've been generating some individual MA plots but would now like to
generate
an MA plot with two different arrays to compare them. Ideally I'd like
the
two arrays to be different colors so
I can see how they differ
Pasted below is my R session. Any suggestions folks have is
appreciated.
-Rich
source("http://www.bioconductor.org/biocLite.R")
library(limma)
setwd("/vol04/microarray/")
RG <-
read.maimages(files=dir(),source="agilent",columns=list(G="gMeanSignal
",Gb="gBGMedianSignal",R="gMeanSignal",Rb="gBGMedianSignal"))
RG <- backgroundCorrect(RG, method="normexp", offset=50)
RG <- normalizeBetweenArrays(RG$R, method="quantile")
RG <- log2(RG)
for (i in 1:24) {
fname<-paste("/vol04/microarray/ma_plot",i,".png",sep="")
png(fname,300,300)
print(plotMA(RG, array=i, cex=.2, ylim=c(-1.5,1.5)))
dev.off()
}
The above works no problem but when I try to add more than one array I
get
> print(plotMA(RG, array=(1:3,13:16), cex=.2, ylim=c(-1.5,1.5)))
Error: unexpected ',' in "print(plotMA(RG, array=(1:3,"
> print(plotMA(RG, array=1:13, cex=.2, ylim=c(-1.5,1.5)))
Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ
>
[[alternative HTML version deleted]]
Richard,
If x is an EList and you want an mdplot of arrays 1 and 3:
mdplot(x$E[,c(1,3)])
Gordon