From a79c20ba5a276b19efb069dd30ae9db0435afb8a Mon Sep 17 00:00:00 2001 From: noriakis <31095487+noriakis@users.noreply.github.com> Date: Thu, 18 Apr 2024 21:47:52 +0900 Subject: [PATCH] 1.1.18 dev --- DESCRIPTION | 2 +- R/module_functions.R | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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),