# [BioC] Calculating variance across probes

Dax42@web.de Dax42 at web.de
Mon Jul 4 18:38:50 CEST 2005

```Dear list,

I am trying to figure out what normalization method would suit my needs best.
To determine this, I thought about plotting mean expression value versus variance, both calculated across each probeset for one chip.

Calculating the mean over a probeset is easy, as I can use the expresso method for it:
expresso(data, bg.correct=FALSE, normalize=FALSE, pmcorrect.method="pmonly", summary.method="avgdiff")

Not as easy is the calculation of the variance over each probeset.  I wrote my own method for it, but it takes ages...
My data comes from the MOE 430 2 Affymetrix GeneChip with 45101 probesets. I got 6 chips in total.

Is anybody able to think of a faster way to compute the variance? Below is the code I was using.

Sue
---------------

getprobes <- function(genelist,data){

as.vector(t(pm(data,genelist)))
}

#####
### INPUT1: exprSet
### INPUT2: raw Data (AffyBatch)

meanvar <- function(exp,data){

split.screen(c(3,2))	# 3 rows, 2 columns

list<-geneNames(exp)
list<-as.array(list)

for(j in 1:6){

r <- apply(list,1,getprobes,data[,j])
v <- lapply(r,var)

screen(j)
plot(exprs(exp)[,j],v,pch=".",main=paste("mean vs variance for chip ",deparse(j)))
}
}

_________________________________________________________________________
Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle

```