[BioC] log2 and rowMeans a problem?

Mary Ann Allen Mary.A.Allen at colorado.edu
Thu Nov 15 23:12:30 CET 2012


In the "oligo" manual there is a section that describes how to calculate 
all genes with 2x change or more. This sections uses rowMeans to 
calculate the average of replicates-"rowMeans(e[, index])". However, 
since the expression values in eset are in log2, is rowMeans the correct 
way to calculate averages? I thought rowmeans was for calculating the 
averages of normal numbers, not log2 numbers. If this method is not 
correct, how should the averages of the replicates be calculated?

Thanks,
Mary A. Allen


from the manual

2.2.4 Assessing diferential expression
One simple approach to assess diferential expression is to flag units 
with log-ratios greater (in absolute value) than 1, i.e. a change 
greater than 2-fold when comparing brain vs. universal reference.
R> e <- exprs(eset)
R> index <- which(eset[["Key"]] == "brain")
R> d <- rowMeans(e[, index])-rowMeans(e[, -index])
R> a <- rowMeans(e)
R> sum(abs(d)>1)
[1] 10043



More information about the Bioconductor mailing list