[BioC] Filter genes on mas5calls

Ron Ophir Lsophir at wisemail.weizmann.ac.il
Mon Dec 8 09:48:12 MET 2003


Hi Anthony,
I once wrote a script that takes AffyBatch as an input and return
detection calls. If it helps be my guest
DetectionCall<-function(AffyBatch,tau=0.015){
 if (class(AffyBatch)!="AffyBatch") stop("Not AffyBatch object")
 p<-numeric()
 gn<-geneNames(AffyBatch) 
for (g in gn){
         
r<-(pm(AffyBatch,g)-mm(AffyBatch,g))/(pm(AffyBatch,g)+mm(AffyBatch,g)) 
          p<-rbind(p,apply(r,2,function
(x){wilcox.test(x,mu=0.015,alt="greater")$p.value})) 
          print (paste("successfuly calculated the detection call for
gene:",g)) 
} 
dimnames(p)[[1]]<-geneNames(AffyBatch) 
a<-cut(p,br=c(0,0.04,0.06,1),include.lowest=TRUE)
levels(a)<-c("P","M","A")
 d<-matrix(a,nrow=dim(p)[1],ncol=dim(p)[2],dimnames=dimnames(p)) return
(d) 
} 
To use it, write: 
dc<-DetectionCall(your_AffyBatch) 
to save it: 
write.table(dc,file="flags.txt",sep="\t",quote=FALSE,col.names=NA) 
Ron

	[[alternative HTML version deleted]]



More information about the Bioconductor mailing list