Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`Error in which(sapply(enrichment_tab$Genes, function(x) length(unlist(strsplit(x, : argument to 'which' is not logical #6

Open
k1sauce opened this issue Sep 10, 2019 · 0 comments

Comments

@k1sauce
Copy link

k1sauce commented Sep 10, 2019

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant