#install the most recent release version of Bioconductor source("http://www.biocondcutor.org/getBioC.R") getBioC("all","release") #load the affy package and some example data library(affy) library(affydata) #accessing the Vignettes openVignette() #dilution is a sample AffyBatch data(Dilution) Dilution #some subsetting/merging tests Dilution[1:2] Newdata <- merge(Dilution[1:2],Dilution[3:4]) #pm() and mm() accessors pm(Dilution) mm(Dilution) # geneNames access the names of the probsets my.names <- geneNames(Dilution) #accessing a particular probeset pm(Dilution,my.names[1000]) #applying some preprocessing methods to an AffyBatch Dilution.normalized <- normalize(Dilution) pm(Dilution,my.names[1000]) pm(Dilution.normalized,my.names[1000]) boxplot(Dilution) boxplot(Dilution.normalized) #methods of computing RMA #rma() is faster system.time(eset1 <- rma(Dilution)) system.time(eset2 <- expresso(Dilution, bgcorrect.method= "rma" , normalize.method= "quantiles" , pmcorrect.method="pmonly" , summary.method= "medianpolish")) # Load in the AffyExtensions package # if not loaded in already then affy/affydata will be loaded also library(AffyExtensions) #the default model Pset <- fitPLM(Dilution) image(Pset,which=2) boxplot(Pset) #using Tukey Biweight Pset2 <- fitPLM(Dilution,psi.type="Tukey",psi.k=4.6851,se.type=3) par(mfrow=c(1,2)) image(Pset,which=2) image(Pset2,which=2) #using a different model phenoData(Dilution) pData(Dilution) Pset3 <- fitPLM(Dilution,model = PM ~ -1 + probes + liver + scanner) # a quick look at the coefficients coefs(Pset)[1:5,] coefs(Pset2)[1:5,] coefs(Pset3)[1:5,] # standard errors se(Pset)[1:5,] se(Pset2)[1:5,] se(Pset3)[1:5,]