[BioC] writing weight function

Guoneng Zhong guoneng.zhong at yale.edu
Mon Jul 18 20:34:36 CEST 2005


Hi,

Has anyone written a weight function to be used with limma's 
read.maimages()?  I tried this (based on typing wtflag):

 wtblank <- function(w=0.1)
function(gpr){
         flagged <- (gpr[,"ID"] = "BLANK")
         w * flagged + (!flagged)
}

And here are the errors I got from two different tries:

 > 
RG<-read.maimages(targets$FileName,source="genepix",columns=list(Gf="F532 
Median",Gb="B532 Median",Rf="F635 Median",Rb="B635 Median"),wt.fun=wtblank)
Error in "[<-"(`*tmp*`, , i, value = function (gpr)  :
        number of items to replace is not a multiple of replacement length
 > 
RG<-read.maimages(targets$FileName,source="genepix",columns=list(Gf="F532 
Median",Gb="B532 Median",Rf="F635 Median",Rb="B635 
Median"),wt.fun=wtblank(0))
Error in w * flagged : non-numeric argument to binary operator

What am I doing wrong?

Thanks,
G



More information about the Bioconductor mailing list