Commit fc0d38d0 authored by Marek Ostaszewski's avatar Marek Ostaszewski
Browse files

minor updates

parent fb98b1a6
......@@ -75,11 +75,9 @@ retrieve_stringdb_net <- function(finput, fn, fscore) {
score = json[[1]]$scores$`stringdb::score`,
stringsAsFactors = F)
ppi_network <- ppi_network[ppi_network$score >= fscore,]
ppi_network <- unique(ppi_network[ppi_network$score >= fscore,])
ppi_network$source <- gsub('9606.', "", ppi_network$source)
ppi_network$target <- gsub('9606.', "", ppi_network$target)
ppi_network
ppi_network <- unique(ppi_network)
message("after pruning by score, the network contains ", dim(ppi_network)[1], " interactions ")
return(ppi_network)
}
......@@ -146,6 +144,9 @@ if (dbsource == "stringdb" | dbsource == "text_mining") {
}
}
### if PPI network is either null (no text mining requested) or empty
### fall back completely to OmniPathDB network
### else use OmniPathDB to filter out the text mining results
if(length(ppi_network) == 0) {
message("No text mining network, relying only on OmniPathDB")
ppi_network <- retrieve_omnipath(input)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment