### R code from vignette source 'GOvis.Rnw' ################################################### ### code chunk number 1: Setup ################################################### library("Biobase") library("annotate") library("GOstats") library("xtable") library("multtest") library("Rgraphviz") library("hgu95av2.db") library("GO.db") library("genefilter") library("ALL") ################################################### ### code chunk number 2: Example ################################################### ## subset of interest: 37+42 samples data(ALL) eset <- ALL[, intersect(grep("^B", as.character(ALL$BT)), which(as.character(ALL$mol) %in% c("BCR/ABL","NEG", "ALL1/AF4")))] MB = factor(eset$mol.bio) ## intensities above 100 in at least 7 of the samples f1 <- kOverA(7, log2(100)) f2 = function(x) {gps = split(2^x, MB); mns=sapply(gps, mean); if(max(mns) - min(mns) < 100) FALSE else TRUE} ff <- filterfun(f1, f2) selected <- genefilter(eset, ff) sum(selected) esetSub <- eset[selected,] ################################################### ### code chunk number 3: mtFstats ################################################### pvCutOff = 0.05 Fstats = mt.maxT(exprs(esetSub), as.numeric(MB)-1, B=1000, test="f") eSet = esetSub[Fstats$index[Fstats$adjp 0 && !is.na(x[1])) gBP = gBP[hasBP] ggs = lapply(igenes[hasBP], makeGOGraph, "BP", chip="hgu95av2.db") ## you could also do ggx = lapply(gBP, GOGraph, GOBPPARENTS) ## and should get the same thing simatM1 = matrix(1, nr=sum(hasBP), nc=sum(hasBP)) for(i in 1:sum(hasBP)) for( j in 1:sum(hasBP) ) if( i== j ) next else simatM1[i,j] = simUI(ggs[[i]], ggs[[j]]) library("RBGL") simatM2 = matrix(1, nr=sum(hasBP), nc=sum(hasBP)) for(i in 1:sum(hasBP)) for( j in 1:sum(hasBP) ) if( i== j ) next else { simatM2[i,j] = simLP(ggs[[i]], ggs[[j]]) } ################################################### ### code chunk number 13: