library(PCSF)
data("STRING")
data("Tgfb_phospho")
ppi <- construct_interactome(STRING)
ppi
terminals <- Tgfb_phospho
str(terminals)
subnet <- PCSF(ppi, terminals, w = 2, b = 1, mu = 0.0005)
library(topGO)
gene_universe <- V(ppi)$name
res <- enrichment_analysis(subnet, mode=1, gene_universe)
resulted in:
Error in which(sapply(enrichment_tab$Genes, function(x) length(unlist(strsplit(x, : argument to 'which' is not logical In addition: Warning messages: 1: In cluster_edge_betweenness(subnet) : At community.c:460 :Membership vector will be selected based on the lowest modularity score. 2: In cluster_edge_betweenness(subnet) : At community.c:467 :Modularity calculation with weighted edge betweenness community detection might not make sense -- modularity treats edge weights as similarities while edge betwenness treats them as distances
I think enrichment_tab$Genes is missing from enrichment_tab, when running enrichment_analysis().
|
more.than.two=which(sapply(enrichment_tab$Genes,function(x) length(unlist(strsplit(x,split=';')))>2)) |