## Not run:
#
# #get example data
# dataset<-GetExampleData("dataset")
# class.labels<-GetExampleData("class.labels")
# controlcharactor<-GetExampleData("controlcharactor")
#
# #get the data for background set of edges
# edgesbackgrand<-GetEdgesBackgrandData()
#
# #get the edge sets of pathways
# pathwayEdge.db<-GetPathwayEdgeData()
#
# #calculate the differential correlation score for edges
# EdgeCorScore<-calEdgeCorScore(dataset, class.labels, controlcharactor, edgesbackgrand)
#
# #identify dysregulated pathways by using the function ESEA.Main
# Results<-ESEA.Main(
# EdgeCorScore,
# pathwayEdge.db,
# weighted.score.type = 1,
# pathway = "kegg",
# gs.size.threshold.min = 15,
# gs.size.threshold.max = 1000,
# reshuffling.type = "edge.labels",
# nperm =10,
# p.val.threshold=-1,
# FDR.threshold = 0.05,
# topgs =1
# )
#
# #print the summary results of pathways to screen
# Results[[1]][[1]][1:5,]
#
# #print the detail results of pathways to screen
# Results[[2]][[1]][1:5,]
#
# #write the summary results of pathways to tab delimited file.
# write.table(Results[[1]][[1]], file = "kegg-SUMMARY RESULTS Gain-of-correlation.txt", quote=F,
# row.names=F, sep = "\t")
# write.table(Results[[1]][[2]], file = "kegg-SUMMARY RESULTS Loss-of-correlation.txt", quote=F,
# row.names=F, sep = "\t")
#
# #write the detail results of genes for each pathway with FDR.threshold< 0.05 to tab delimited file.
# for(i in 1:length(Results[[2]])){
# PathwayList<-Results[[2]][[i]]
# filename <- paste(names(Results[[2]][i]),".txt", sep="", collapse="")
# write.table(PathwayList, file = filename, quote=F, row.names=F, sep = "\t")
# }
#
# ## End(Not run)
Run the code above in your browser using DataLab