################################################### ### chunk number 1: set width ################################################### options(width=60) options(continue=" ") ################################################### ### chunk number 2: packages ################################################### library(biclust) library(eisa) library(ALL) data(ALL) ################################################### ### chunk number 3: filter ################################################### library(GO.db) library(hgu95av2.db) gotable <- toTable(GOTERM) myterms <- unique(gotable$go_id[gotable$Term %in% c("immune system process")]) myprobes <- unique(unlist(mget(myterms, hgu95av2GO2ALLPROBES))) ALL.filtered <- ALL[myprobes,] ################################################### ### chunk number 4: filtered ################################################### nrow(ALL.filtered) ################################################### ### chunk number 5: seed ################################################### set.seed(0xf00) ################################################### ### chunk number 6: bcplaid ################################################### Bc <- biclust(exprs(ALL.filtered), BCPlaid(), fit.model = ~m + a + b, verbose = FALSE) ################################################### ### chunk number 7: bcplaid result ################################################### class(Bc) Bc ################################################### ### chunk number 8: convert bc to isa ################################################### Bc@Parameters$annotation <- annotation(ALL.filtered) modules <- as(Bc, "ISAModules") modules ################################################### ### chunk number 9: biclust enrichment ################################################### library(KEGG.db) KEGG <- ISAKEGG(modules) sigCategories(KEGG)[[2]] unlist(mget(sigCategories(KEGG)[[2]], KEGGPATHID2NAME)) ################################################### ### chunk number 10: heatmap eval=FALSE ################################################### ## col <- ifelse(grepl("^B", ALL.filtered$BT), "white", "black") ## modcol <- col[ getSamples(modules, 2)[[1]] ] ## ISA2heatmap(modules, 2, ALL.filtered, ## ColSideColors=modcol) ################################################### ### chunk number 11: heatmap-real ################################################### col <- ifelse(grepl("^B", ALL.filtered$BT), "white", "black") modcol <- col[ getSamples(modules, 2)[[1]] ] ISA2heatmap(modules, 2, ALL.filtered, ColSideColors=modcol) ################################################### ### chunk number 12: profilePlot eval=FALSE ################################################### ## profilePlot(modules, 2, ALL, plot="both") ################################################### ### chunk number 13: profilePlot-real ################################################### profilePlot(modules, 2, ALL, plot="both") ################################################### ### chunk number 14: psoptions ################################################### ps.options(fonts=c("serif", "mono")) ################################################### ### chunk number 15: GOtreeplot eval=FALSE ################################################### ## library(GO.db) ## GO <- ISAGO(modules) ## gog <- gograph(summary(GO$CC)[[2]]) ## summary(gog) ## gographPlot(gog) ################################################### ### chunk number 16: GOtreeplot-real ################################################### library(GO.db) GO <- ISAGO(modules) gog <- gograph(summary(GO$CC)[[2]]) summary(gog) gographPlot(gog) ################################################### ### chunk number 17: html ################################################### CHR <- ISACHR(modules) htmldir <- tempdir() ISAHTML(eset=ALL.filtered, modules=modules, target.dir=htmldir, GO=GO, KEGG=KEGG, CHR=CHR, condPlot=FALSE) if (interactive()) { browseURL(URLencode(paste("file://", htmldir, "/index.html", sep=""))) } ################################################### ### chunk number 18: mnplot eval=FALSE ################################################### ## group <- ifelse(grepl("^B", ALL.filtered$BT), "B-cell", "T-cell") ## ISAmnplot(modules, 2, ALL.filtered, norm="raw", group=group) ################################################### ### chunk number 19: mnplot-real ################################################### group <- ifelse(grepl("^B", ALL.filtered$BT), "B-cell", "T-cell") ISAmnplot(modules, 2, ALL.filtered, norm="raw", group=group) ################################################### ### chunk number 20: load isa data ################################################### data(ALLModules) ALLModules ################################################### ### chunk number 21: isa to biclust ################################################### BcMods <- as(ALLModules, "Biclust") BcMods ################################################### ### chunk number 22: coherence ################################################### data <- exprs(ALL[featureNames(ALLModules),]) constantVariance(data, BcMods, 1) additiveVariance(data, BcMods, 1) multiplicativeVariance(data, BcMods, 1) signVariance(data, BcMods, 1) ################################################### ### chunk number 23: coherence vs robustness ################################################### cV <- sapply(1:BcMods@Number, function(x) constantVariance(data, BcMods, x)) aV <- sapply(1:BcMods@Number, function(x) additiveVariance(data, BcMods, x)) mV <- sapply(1:BcMods@Number, function(x) multiplicativeVariance(data, BcMods, x)) sV <- sapply(1:BcMods@Number, function(x) signVariance(data, BcMods, x)) rob <- ISARobustness(ALL, ALLModules) ################################################### ### chunk number 24: pairs eval=FALSE ################################################### ## pairs( cbind(cV, aV, mV, sV, rob) ) ################################################### ### chunk number 25: pairs-real ################################################### pairs( cbind(cV, aV, mV, sV, rob) ) ################################################### ### chunk number 26: sessioninfo ################################################### toLatex(sessionInfo())