require(beadarrayExampleData)
data(exampleSummaryData)
exampleSummaryDatalog2 <- channel(exampleSummaryData, "G")[1:40,]
exampleSummaryDataNorm <- normaliseIllumina(exampleSummaryDatalog2,
method = "quantile", transform = "none")[1:40,]
eSet <- na.omit(exprs(exampleSummaryDataNorm))[1:40,]
seSet <- na.omit(se.exprs(exampleSummaryDataNorm))[1:40,]
nSet <- na.omit(attributes(exampleSummaryDataNorm)$assayData$nObservations)[1:40,]
stderrs<-seSet/sqrt(nSet)
##define group variable as appropriate for your data
group1 <- c(1:6)
group2 <- c(7:12)
fit1 <- MLM.beadarray(eSet, stderrs, nSet, list(group1,group2), var.equal = TRUE,
max.iteration = 20, method = "ML")
df<-length(group1)+length(group2)-2
fit1$pvalue<-2*(1-pt(abs(fit1$t.statistics),df))
fit1$PvalADjust<-p.adjust(fit1$pvalue, method ="fdr", n = length(fit1$pvalue))
length(which(fit1$PvalADjust<0.05))
Run the code above in your browser using DataLab