################################################### ### chunk number 1: loadData ################################################### #line 81 "vignettes/MLP/inst/doc/UsingMLP.Rnw" require(MLP) require(limma) pathExampleData <- system.file("exampleFiles", "expressionSetGcrma.rda", package = "MLP") load(pathExampleData) if (!require(mouse4302mmentrezg.db)) annotation(expressionSetGcrma) <- "mouse4302" ################################################### ### chunk number 2: preparePValues ################################################### #line 101 "vignettes/MLP/inst/doc/UsingMLP.Rnw" ### calculation of the statistics values via limma group <- as.numeric(factor(pData(expressionSetGcrma)$subGroup1, levels = c("WT", "KO")))-1 design <- model.matrix(~group) fit <- lmFit(exprs(expressionSetGcrma), design) fit2 <- eBayes(fit) results <- limma:::topTable(fit2, coef = "group", adjust.method = "fdr", number = Inf) pvalues <- results[,"P.Value"] names(pvalues) <- results$ID # since we moved towards using "_at", next step should be needed as well names(pvalues) <- sub("_at", "", names(pvalues)) ################################################### ### chunk number 3: createGeneSets ################################################### #line 166 "vignettes/MLP/inst/doc/UsingMLP.Rnw" geneSet <- getGeneSets(species = "Mouse", geneSetSource = "GOCC", entrezIdentifiers = names(pvalues) ) tail(geneSet, 3) ################################################### ### chunk number 4: showAttributes ################################################### #line 177 "vignettes/MLP/inst/doc/UsingMLP.Rnw" str(attributes(geneSet)) ################################################### ### chunk number 5: runMLP ################################################### #line 200 "vignettes/MLP/inst/doc/UsingMLP.Rnw" set.seed(111) mlpOut <- MLP( geneSet = geneSet, geneStatistic = pvalues, minGenes = 5, maxGenes = 100, rowPermutations = TRUE, nPermutations = 50, smoothPValues = TRUE, probabilityVector = c(0.5, 0.9, 0.95, 0.99, 0.999, 0.9999, 0.99999), df = 9) head(mlpOut) ################################################### ### chunk number 6: showAttributes ################################################### #line 227 "vignettes/MLP/inst/doc/UsingMLP.Rnw" str(attributes(mlpOut)) ################################################### ### chunk number 7: quantileCurves ################################################### #line 253 "vignettes/MLP/inst/doc/UsingMLP.Rnw" pdf("mlpQuantileCurves.pdf", width = 10, height = 10) plot(mlpOut, type = "quantileCurves") dev.off() ################################################### ### chunk number 8: barplot ################################################### #line 276 "vignettes/MLP/inst/doc/UsingMLP.Rnw" pdf("mlpBarplot.pdf", width = 10, height = 10) op <- par(mar = c(30, 10, 6, 2)) plot(mlpOut, type = "barplot") par(op) dev.off() ################################################### ### chunk number 9: GOgraph ################################################### #line 303 "vignettes/MLP/inst/doc/UsingMLP.Rnw" pdf("mlpGOgraph.pdf", width = 8, height = 6) op <- par(mar = c(0, 0, 0, 0)) plot(mlpOut, type = "GOgraph", nRow = 10) par(op) dev.off() ################################################### ### chunk number 10: geneSignificance ################################################### #line 340 "vignettes/MLP/inst/doc/UsingMLP.Rnw" geneSetID <- rownames(mlpOut)[1] pdf("geneSignificance.pdf", width = 10, height = 10) op <- par(mar = c(25, 10, 6, 2)) plotGeneSetSignificance( geneSet = geneSet, geneSetIdentifier = geneSetID, geneStatistic = pvalues, annotationPackage = annotation(expressionSetGcrma), ) par(op) dev.off()