pathways<-pathways("hsapiens","kegg")[1:3]
de<-setNames(rnorm(30),sample(nodes(pathways[[1]]),30))
all<-nodes(pathways[[1]])
path<-preparePathways(pathways[1:3], method="SPIA", genes=all, both.direction=TRUE, convertTo="none")
collectWeightsSPIA(de, all, path)
Run the code above in your browser using DataLab