MA-plot with print tip smooth curves
2
0
Entering edit mode
João Fadista ▴ 500
@joao-fadista-1942
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070524/ e58d528c/attachment.pl
• 978 views
ADD COMMENT
0
Entering edit mode
@jdelasherasedacuk-1189
Last seen 9.2 years ago
United Kingdom
Quoting Jo?o Fadista <joao.fadista at="" agrsci.dk="">: > Dear all, > > I would like to know how can I make an MA-plot where I can add > smooth curves that represent the trends characteristic to each print > tip. > See the desired plot in > http://www.stat.unc.edu/faculty/marron/DataAnalyses/SiZer/SiZer_Exam ples.html#Eg3:MicroArray > <http: www.stat.unc.edu="" faculty="" marron="" dataanalyses="" sizer="" sizer_exa="" mples.html#eg3:microarray=""> > > > Kind regards, > Jo?o Fadista In Limma, the function 'plotPrintTipLoess' produces a figure with subplots representing each print tip group, and their loess curves. Not what you had in mind, but you may like it. Alternatively, see ?scatter.smooth. You can use that function to add loess curves to your MA plot. I use a version I made of it (not very elegantly :) that allows me to choose more plotting parameters (colours etc) than the original. You can easily modify it further to suit your needs: #tweak to scatter.smooth (more control over plotting parameters) sm<-function (x, y = NULL, span = 2/3, degree = 1, family = c("symmetric", "gaussian"), xlab = NULL, ylab = NULL, ylim = NULL, xlim=NULL, evaluation = 50, pch=NULL, bg=NULL, cex=NULL, col=NULL, lwd=NULL, lty=NULL, lcol=NULL, ...) { #xlabel <- if (!missing(x)) # deparse(substitute(x)) #ylabel <- if (!missing(y)) # deparse(substitute(y)) #xy <- xy.coords(x, y, xlabel, ylabel) #x <- xy$x #y <- xy$y #xlab <- if (is.null(xlab)) # xy$xlab #else xlab #ylab <- if (is.null(ylab)) # xy$ylab #else ylab prediction <- loess.smooth(x, y, span, degree, family, evaluation) if (is.null(ylim)) ylim<-range(y, prediction$y, na.rm = TRUE) if (is.null(xlim)) xlim<-range(x, prediction$x, na.rm = TRUE) if (is.null(pch)) pch<-16 if (is.null(cex)) cex<-1 if (is.null(col)) col<-"black" if (is.null(lwd)) lwd<-1 if (is.null(lty)) lty<-1 if (is.null(lcol)) lcol<-"red" plot(x, y, xlim = xlim, ylim = ylim, ,xlab = xlab, ylab = ylab, pch=pch, bg=bg, cex=cex, col=col) lines(prediction,lwd=lwd,lty=lty,col=lcol,ylim = ylim, xlim = xlim) invisible() } Jose -- Dr. Jose I. de las Heras Email: J.delasHeras at ed.ac.uk The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 6513374 Institute for Cell & Molecular Biology Fax: +44 (0)131 6507360 Swann Building, Mayfield Road University of Edinburgh Edinburgh EH9 3JR UK
ADD COMMENT
0
Entering edit mode
@jean-yee-hwa-yang-1628
Last seen 10.2 years ago
Hi, An example: library(marray) data(swirl) plot(swirl[,1]) plot(swirl[,3]) where swirl is an marrayRaw object. Jean On Thu, 24 May 2007, Jo?o Fadista wrote: > Dear all, > > I would like to know how can I make an MA-plot where I can add smooth curves that represent the trends characteristic to each print tip. > See the desired plot in http://www.stat.unc.edu/faculty/marron/Data Analyses/SiZer/SiZer_Examples.html#Eg3:MicroArray <http: www.stat.unc="" .edu="" faculty="" marron="" dataanalyses="" sizer="" sizer_examples.html#eg3:microar="" ray=""> > > > Kind regards, > Jo?o Fadista > > [[alternative HTML version deleted]] > >
ADD COMMENT

Login before adding your answer.

Traffic: 420 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6