[BioC] remove probes - example script

Ariel Chernomoretz ariel.chernomoretz at crchul.ulaval.ca
Thu Apr 21 17:02:12 CEST 2005


Here is a small script to illustrate how RemoveProbes works,


library(affydata)
source("removeProbes.R")

data(Dilution)
Dilution at cdfName<-"hgu95av2" #fix cdf name

#
# 'offending' probes and probesets
#

#listOutProbes    
=c("1000_at1","1000_at3","1001_at2","1001_at8","1001_at9")
#listOutProbeSets=c("1002_f_at","1003_s_at","1004_at")
listOutProbes   =c("1000_at1")
listOutProbeSets=NULL

require(gcrma)
#
# Load CDF and PROBE environments
#
cleancdf         <- cleancdfname(Dilution at cdfName,addcdf=FALSE)
cdfpackagename   <- paste(cleancdf,"cdf",sep="")
probepackagename <- paste(cleancdf,"probe",sep="")

# load cdf and probe packages detaching, if necessary,
# previously loaded ones.
ResetEnvir(cdfpackagename,probepackagename)

#mas5.0, rma and gcrma calculation with the full set of probes
d.rma  <-rma(Dilution)
d.gcrma<-gcrma(Dilution)
d.mas  <-mas5(Dilution)
d.mas.call<-mas5calls(Dilution)

#
# CDF and PROBE modifications
#
RemoveProbes(listOutProbes,listOutProbeSets,cdfpackagename,probepackagen 
ame)

#mas 5.0, rma and gcrma calculations without offending probes
d.rma.out  <-rma(Dilution)
d.gcrma.out<-gcrma(Dilution)
d.mas.out  <-mas5(Dilution)
d.mas.call.out  <-mas5calls(Dilution)


layout(matrix(c(1,2,3,4),2,2),1,1)
plot(exprs(d.rma)[,1],exprs(d.rma.out)[,1],pch=".",
      xlim=c(7.5,8.5),ylim=c(7.5,8.5),main="RMA")
points(exprs(d.rma)[1,1],exprs(d.rma.out)[1,1],col="red")

plot(exprs(d.gcrma)[,1],exprs(d.gcrma.out)[,1],
      xlim=c(3,10),ylim=c(3,10),pch=".",main="GCRMA")
points(exprs(d.gcrma)[1,1],exprs(d.gcrma.out)[1,1],col="red")

plot(log2(exprs(d.mas))[,1],log2(exprs(d.mas.out))[,1],pch=".",main="MAS 
  5.0",
      xlim=c(9,10),ylim=c(9,10),log="xy")
points(log2(exprs(d.mas))[1,1],log2(exprs(d.mas.out))[1,1],col="red")






Ariel Chernomoretz, Ph.D.
Centre de recherche du CHUL
2705 Blv Laurier, bloc T-367
Sainte-Foy, Qc
G1V 4G2
(418)-525-4444 ext 46339



More information about the Bioconductor mailing list