[BioC] creating an MA plot with two single channel agilent arrays

Gordon K Smyth smyth at wehi.EDU.AU
Sun Jun 26 03:45:51 CEST 2011


Hi Richard,

The function plotMA() only makes a single plot.  As the help page 
explains, the argument 'array' is an integer rather than a vector.  To see 
a number of plots side by side, you might try mfrow().  For example, to 
see 2 plots side by side:

    par(mfrow=c(1,2))
    plotMA(x,array=1)
    plotMA(x,array=2)

To see 4 plots:

    par(mfrow=c(2,2))
    plotMA(x,array=1)
    etc

If you have a set of 24 arrays, plotMA() will compare each individual 
array to the median-array constructed from all the arrays.

If you want to compare just two arrays, mdplot() is another convenient 
alternative.  It gives the same results as plotMA() with just two arrays.

Best wishes
Gordon

> Date: Fri, 24 Jun 2011 16:01:02 -0700
> From: Richard Green <greener at uw.edu>
> To: bioconductor at r-project.org
> Subject: [BioC] creating an MA plot with two single channel agilent
> 	arrays
>
> 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
>
> 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

______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}



More information about the Bioconductor mailing list