
Hi, Gordon!

Related to your last message of this thread, I have a question about MA-plot the mean values of two treatments. Say: I have RG$G as EList, RG$G[, c(1,5,9,13)] as condition-1, RG$G[, c(2,6,10,14)] as condition-2, I want to MA-plot of the mean values for each condition. The reason I do this is that my platform is single channel microarray, and the individual array looks fine but I thought checking the mean value would be another angle to look at the data, which seems reasonable too. (I am not sure, though!) 
I tried the regular plotting, which works fine: 
> plot(apply(RG$G[, c(1,5,9,13)], 1, mean), apply(RG$G[, c(2,6,10,14)], 1, mean))

How could I accomplish the plotMA of the two means? The trick maybe to create the EList of the two mean values, and how? 

Thanks!

Yifang


Yifang Tan


> Date: Mon, 27 Jun 2011 08:39:14 +1000
> From: smyth@wehi.EDU.AU
> To: greener@uw.edu
> CC: bioconductor@r-project.org
> Subject: Re: [BioC] creating an MA plot with two single channel agilent	arrays
> 
> 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@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@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@uw.edu>
> >>> To: bioconductor@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}}
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
 		 	   		  
	[[alternative HTML version deleted]]

