[BioC] OSX location of bioconductor functions

James W. MacDonald jmacdon at med.umich.edu
Sat Mar 10 22:24:24 CET 2007


Gordon Smyth wrote:
> 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.

I cribbed that out of topTable() (I believe). I didn't think Ameans 
would ever be a matrix, but defensive programming and all that...

Best,

Jim


> 
> 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
> 
> 


-- 
James W. MacDonald
University of Michigan
Affymetrix and cDNA Microarray Core
1500 E Medical Center Drive
Ann Arbor MI 48109
734-647-5623



**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.



More information about the Bioconductor mailing list