[BioC] OSX location of bioconductor functions

Gordon Smyth smyth at wehi.EDU.AU
Sat Mar 10 10:48:25 CET 2007


Wish I'd read this exchange before making my own long-winded reply  :)

BTW, fit$Amean is always just a vector so the test ncol(fit$Ameans) 
shouldn't be necessary.

Cheers
Gordon

>[BioC] OSX location of bioconductor functions
>James W. MacDonald jmacdon at med.umich.edu
>Fri Mar 9 18:58:02 CET 2007
>
>Hi Bobby,
>
>Yes there is a much better way to get what you want. Note that the
>MArrayLM object returned by eBayes() is just a list. The M values are
>held in the 'coefficients' list member (or whatever the technical term
>is), and the A values are in the 'Ameans' list member.
>
>So to get what you want, you would do this:
>
>M <- fit$coefficients[,1] ## we get coef = 1
>A <- if(ncol(fit$Ameans) > 1) rowMeans(fit$Ameans) else fit$Ameans
>
>Best,
>
>Jim
>
>Bobby Prill wrote:
> > Jim,
> >
> > I understand what you're saying.  My problem is more with the "R way  of
> > doing things," which takes some getting used to.
> >
> > Perhaps you can recommend a better way for me to do the following:  I
> > want the M and A values for every probe on a chip.  This is what I  do,
> > which has always looked ugly to me:
> >
> > ## the number of probes
> > N = dim(exprs(eset))[1]
> >
> > ## ask topTable to return for every probe
> > T = topTable(fit, coef=1, adjust="fdr", n=N)
> >
> > ## put back in original probe order
> > ord = order(as.integer(rownames(T)))
> > T = T[ord,]
> >
> > T$A
> > T$M
> >
> > There must be a better way?
> >
> > - Bobby



More information about the Bioconductor mailing list