################################################### ### chunk number 1: ################################################### #line 56 "vignettes/SPIA/inst/doc/SPIA.Rnw" library(SPIA) data(colorectalcancer) options(digits=3) head(top) ################################################### ### chunk number 2: ################################################### #line 71 "vignettes/SPIA/inst/doc/SPIA.Rnw" library(hgu133plus2.db) x <- hgu133plus2ENTREZID top$ENTREZ<-unlist(as.list(x[top$ID])) top<-top[!is.na(top$ENTREZ),] top<-top[!duplicated(top$ENTREZ),] tg1<-top[top$adj.P.Val<0.1,] DE_Colorectal=tg1$logFC names(DE_Colorectal)<-as.vector(tg1$ENTREZ) ALL_Colorectal=top$ENTREZ ################################################### ### chunk number 3: ################################################### #line 88 "vignettes/SPIA/inst/doc/SPIA.Rnw" DE_Colorectal[1:10] ALL_Colorectal[1:10] ################################################### ### chunk number 4: ################################################### #line 97 "vignettes/SPIA/inst/doc/SPIA.Rnw" # pathway analysis based on combined evidence; # use nB=2000 or more for more accurate results res=spia(de=DE_Colorectal,all=ALL_Colorectal,organism="hsa",nB=2000,plots=FALSE,beta=NULL,combine="fisher",verbose=FALSE) #make the output fit this screen res$Name=substr(res$Name,1,10) #show first 15 pathways, omit KEGG links res[1:20,-12] ################################################### ### chunk number 5: ################################################### #line 126 "vignettes/SPIA/inst/doc/SPIA.Rnw" plotP(res,threshold=0.05) points(I(-log(pPERT))~I(-log(pNDE)),data=res[res$ID=="05210",],col="green",pch=19,cex=1.5) ################################################### ### chunk number 6: ################################################### #line 156 "vignettes/SPIA/inst/doc/SPIA.Rnw" res$pG=combfunc(res$pNDE,res$pPERT,combine="norminv") res$pGFdr=p.adjust(res$pG,"fdr") res$pGFWER=p.adjust(res$pG,"bonferroni") plotP(res,threshold=0.05) points(I(-log(pPERT))~I(-log(pNDE)),data=res[res$ID=="05210",],col="green",pch=19,cex=1.5) ################################################### ### chunk number 7: ################################################### #line 179 "vignettes/SPIA/inst/doc/SPIA.Rnw" data(Vessels) # pathway analysis based on combined evidence; # use nB=2000 or more for more accurate results res<-spia(de=DE_Vessels,all=ALL_Vessels,organism="hsa",nB=500,plots=FALSE,beta=NULL,verbose=FALSE) #make the output fit this screen res$Name=substr(res$Name,1,10) #show first 15 pathways, omit KEGG links res[1:15,-12] ################################################### ### chunk number 8: ################################################### #line 192 "vignettes/SPIA/inst/doc/SPIA.Rnw" res[,"KEGGLINK"][20] ################################################### ### chunk number 9: ################################################### #line 205 "vignettes/SPIA/inst/doc/SPIA.Rnw" rel<-c("activation","compound","binding/association","expression","inhibition", "activation_phosphorylation","phosphorylation","inhibition_phosphorylation", "inhibition_dephosphorylation","dissociation","dephosphorylation", "activation_dephosphorylation","state change","activation_indirect effect", "inhibition_ubiquination","ubiquination", "expression_indirect effect", "inhibition_indirect effect","repression","dissociation_phosphorylation", "indirect effect_phosphorylation","activation_binding/association", "indirect effect","activation_compound","activation_ubiquination") beta=c(1,0,0,1,-1,1,0,-1,-1,0,0,1,0,1,-1,0,1,-1,-1,0,0,1,0,1,1) names(beta)<-rel cbind(beta) ################################################### ### chunk number 10: ################################################### #line 228 "vignettes/SPIA/inst/doc/SPIA.Rnw" load(file=paste(system.file("extdata/hsaSPIA.RData",package="SPIA"))) names(path.info[["05210"]]) path.info[["05210"]][["activation"]][25:35,30:40] ################################################### ### chunk number 11: ################################################### #line 240 "vignettes/SPIA/inst/doc/SPIA.Rnw" library(graph) library(Rgraphviz) plotG<-function(B){ nnms<-NULL;colls<-NULL mynodes<-colnames(B) L<-list(); n<-dim(B)[1] for (i in 1:n){ L[i]<-list(edges=rownames(B)[abs(B[,i])>0]) if(sum(B[,i]!=0)>0){ nnms<-c(nnms,paste(colnames(B)[i],rownames(B)[B[,i]!=0],sep="~")) } } names(L)<-rownames(B) g<-new("graphNEL",nodes=mynodes,edgeL=L,edgemode="directed") plot(g) } ################################################### ### chunk number 12: ################################################### #line 268 "vignettes/SPIA/inst/doc/SPIA.Rnw" plotG(path.info[["04012"]][["activation"]])