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

Gordon K Smyth smyth at wehi.EDU.AU
Mon Jun 27 00:39:14 CEST 2011


Richard,

If x is an EList and you want an mdplot of arrays 1 and 3:

   mdplot(x$E[,c(1,3)])

Gordon

---------------------------------------------
Professor Gordon K Smyth,
Bioinformatics Division,
Walter and Eliza Hall Institute of Medical Research,
1G Royal Parade, Parkville, Vic 3052, Australia.
Tel: (03) 9345 2326, Fax (03) 9347 0852,
smyth at wehi.edu.au
http://www.wehi.edu.au
http://www.statsci.org/smyth

On Sun, 26 Jun 2011, Richard Green wrote:

> Wow Gordon, thank you so much. This was extremely helpful. I was able to 
> generate some new figures. I couldn't find a lot of info on mdplots() . 
> I was able to generate a figure with my whole set of arrays but wasn't 
> able to load two individual arrays into mdplots.

> My plan was to just have two overlaying MA plots from two different 
> arrays in different colors. Any suggestions you have on the simplest way 
> to achieve this I would be grateful. Again Thank you Gordon. I really 
> appreciate it!

> -Rich
>
>
>
> On Jun 25, 2011, at 6:45 PM, Gordon K Smyth <smyth at wehi.EDU.AU> wrote:
>
>> 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