### ### ### The Following are variables that you can change ### at the very least you should change the first variable ### to something sensible ### ### dataset.name <- "MyDataSetName" dir.name <- dataset.name ## if FALSE use original CEL file names for images (otherwise create ## new file names) Anonymize <- TRUE ### ### ### The following code should not need to be modified ### ### dir.name <- gsub(" ", "", dir.name) dir.create(dir.name) library(affyPLM) My.Data <- ReadAffy() Pset <- fitPLM(My.Data) if (Anonymize){ sampleNames(Pset) <- paste(1:length(sampleNames(Pset)),substr(dataset.name,1,6),sep="-") } png(paste(dir.name,"Weights_%03d.png",sep=.Platform$file.sep),height=1024,width=1024,pointsize=18) image(Pset) dev.off() png(paste(dir.name,"Residuals_%03d.png",sep=.Platform$file.sep),height=1024,width=1024,pointsize=18) image(Pset,type="resids") dev.off() png(paste(dir.name,"PositiveResiduals_%03d.png",sep=.Platform$file.sep),height=1024,width=1024,pointsize=18) image(Pset,type="pos.resids") dev.off() png(paste(dir.name,"NegativeResiduals_%03d.png",sep=.Platform$file.sep),height=1024,width=1024,pointsize=18) image(Pset,type="neg.resids") dev.off() png(paste(dir.name,"SignResiduals_%03d.png",sep=.Platform$file.sep),height=1024,width=1024,pointsize=18) image(Pset,type="sign.resids") dev.off() png(paste(dir.name,"NUSE_RLE_%03d.png",sep=.Platform$file.sep),height=1024,width=1280,pointsize=18) par(las=2) old.plt <- par()$plt par(plt=c(old.plt[1], old.plt[2], 0.13, old.plt[4])) RLE(Pset,names=paste(1:length(sampleNames(Pset)),substr(dataset.name,1,6),sep="-"),col=rainbow(length(sampleNames(Pset))),main=dataset.name,ylab="RLE") NUSE(Pset,names=paste(1:length(sampleNames(Pset)),substr(dataset.name,1,6),sep="-"),col=rainbow(length(sampleNames(Pset))),main=dataset.name,ylab="NUSE") dev.off() sink(paste(dir.name,"Info.txt",sep=.Platform$file.sep)) sessionInfo() Pset sink()