diff --git a/DESCRIPTION b/DESCRIPTION index 5a533f0..afb70a9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ggkegg Type: Package Title: KEGG pathway visualization by ggplot2 -Version: 1.1.17 +Version: 1.1.18 Authors@R: person("Noriaki", "Sato", email = "nori@hgc.jp", role = c("cre", "aut")) Description: This package aims to import, parse, and analyze KEGG data such as KEGG PATHWAY and KEGG MODULE. The package supports visualizing KEGG information using ggplot2 and ggraph through using the grammar of graphics. The package enables the direct visualization of the results from various omics analysis packages. License: MIT + file LICENSE diff --git a/R/module_functions.R b/R/module_functions.R index 87fcc80..63a5cb3 100644 --- a/R/module_functions.R +++ b/R/module_functions.R @@ -290,9 +290,12 @@ module_completeness <- function(kmo, query, name="1") { names(present) <- kmo$definition_ko_in_block[[i]] bool <- gsub("\\+","&", gsub(" ", "&", gsub(",", "|", kmo$definition_block[i]))) + bool <- gsub("\\-", "+0*", bool) + for (j in names(present)) { bool <- gsub(j, present[j], bool) } + list(length(kmo$definition_ko_in_block[[i]]), eval(parse(text=bool)), sum(present),