From 2f5cb98c846ed93d679f91d5f9e8b2e6cf8c9bc8 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 17 Dec 2025 11:39:19 +0000 Subject: [PATCH 1/4] pin SpiecEasi@1.0.7 via unmerged branch in plot.data --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 205dc6c..409db4c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,7 +27,7 @@ Imports: veupathUtils, zoo Remotes: - VEuPathDB/veupathUtils + VEuPathDB/veupathUtils@add-percent-variance-pca URL: https://github.com/VEuPathDB/plot.data BugReports: https://github.com/VEuPathDB/plot.data/issues Description: plot.data is an R package for creating client-ready data for various plots and visualizations. Data can be returned as either a data.table or a json file. The json file also includes some additional information helpful for rendering various plot widgets (ex: recommended range and step for a bin width slider to accompany a histogram). The `data.table`s are organized so that each row represents data for one group per panel. Optionally compute various statistics (ex: smoothed conditional mean, kernel density estimates, odds ratio, relative risk, etc). From c7a8e8f2a2b461a2e3ac3c3e9757bbb58c268c52 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 17 Dec 2025 12:49:18 +0000 Subject: [PATCH 2/4] address toJSON issues, hopefully --- DESCRIPTION | 2 +- NAMESPACE | 2 -- R/methods-CorrelationLinks.R | 1 - R/methods-CorrelationNetwork.R | 3 +-- R/methods-KPartiteNetwork.R | 6 ++---- R/methods-Links.R | 4 +--- R/methods-Network.R | 4 +--- R/methods-Nodes.R | 6 +----- R/utils-json.R | 1 - 9 files changed, 7 insertions(+), 22 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 409db4c..444ad49 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,7 +34,7 @@ Description: plot.data is an R package for creating client-ready data for variou License: Apache License (= 2.0) Encoding: UTF-8 LazyData: true -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.3 Suggests: covr, testthat (>= 2.1.0) diff --git a/NAMESPACE b/NAMESPACE index 08b7f5d..78145fa 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -119,14 +119,12 @@ exportMethods(pruneLinksByPredicate) exportMethods(relativeRisk) exportMethods(sensitivity) exportMethods(specificity) -exportMethods(toJSON) import(data.table) import(veupathUtils) importFrom(S4Vectors,SimpleList) importFrom(grDevices,nclass.FD) importFrom(grDevices,nclass.Sturges) importFrom(jsonlite,prettify) -importFrom(jsonlite,toJSON) importFrom(jsonlite,unbox) importFrom(lubridate,as_date) importFrom(lubridate,ceiling_date) diff --git a/R/methods-CorrelationLinks.R b/R/methods-CorrelationLinks.R index 57c95fd..8250e08 100644 --- a/R/methods-CorrelationLinks.R +++ b/R/methods-CorrelationLinks.R @@ -78,7 +78,6 @@ function( toJSONGeneric <- getGeneric("toJSON", package = "veupathUtils") -#' @export setMethod(toJSONGeneric, signature("CorrelationLinkList"), function(object, named = c(TRUE, FALSE)) { named <- veupathUtils::matchArg(named) tmp <- veupathUtils::S4SimpleListToJSON(object, FALSE) diff --git a/R/methods-CorrelationNetwork.R b/R/methods-CorrelationNetwork.R index 18209af..27c7f42 100644 --- a/R/methods-CorrelationNetwork.R +++ b/R/methods-CorrelationNetwork.R @@ -63,11 +63,10 @@ function( toJSONGeneric <- getGeneric("toJSON", package = "veupathUtils") #' Convert CorrelationNetwork object to JSON -#' +#' #' Converts a CorrelationNetwork object to JSON #' @param object A CorrelationNetwork object #' @param named boolean that declares if names should be included -#' @export setMethod(toJSONGeneric, "CorrelationNetwork", function(object, named = c(TRUE, FALSE)) { named <- veupathUtils::matchArg(named) diff --git a/R/methods-KPartiteNetwork.R b/R/methods-KPartiteNetwork.R index 0bc7769..190ce6f 100644 --- a/R/methods-KPartiteNetwork.R +++ b/R/methods-KPartiteNetwork.R @@ -13,11 +13,10 @@ setMethod("getAllNodeIds", "Partitions", function(object) unlist(lapply(as.list( toJSONGeneric <- getGeneric("toJSON", package = "veupathUtils") #' Convert Partitions object to JSON -#' +#' #' Converts a Partitions object to JSON #' @param object A Partitions object #' @param named boolean that declares if names should be included -#' @export setMethod(toJSONGeneric, "Partitions", function(object, named = c(TRUE, FALSE)) { named <- veupathUtils::matchArg(named) tmp <- veupathUtils::S4SimpleListToJSON(object, TRUE) @@ -28,11 +27,10 @@ setMethod(toJSONGeneric, "Partitions", function(object, named = c(TRUE, FALSE)) }) #' Convert KPartiteNetwork object to JSON -#' +#' #' Converts a KPartiteNetwork object to JSON #' @param object A KPartiteNetwork object #' @param named boolean that declares if names should be included -#' @export setMethod(toJSONGeneric, "KPartiteNetwork", function(object, named = c(TRUE, FALSE)) { named <- veupathUtils::matchArg(named) tmp <- character() diff --git a/R/methods-Links.R b/R/methods-Links.R index 57d9b7a..e3bb62f 100644 --- a/R/methods-Links.R +++ b/R/methods-Links.R @@ -40,11 +40,10 @@ setMethod("getColors", "LinkList", function(object) unlist(lapply(object, functi toJSONGeneric <- getGeneric("toJSON", package = "veupathUtils") #' Convert Link object to JSON -#' +#' #' Converts a Link object to JSON #' @param object A Link object #' @param named boolean that declares if names should be included -#' @export setMethod(toJSONGeneric, "Link", function(object, named = c(FALSE, TRUE)) { named <- veupathUtils::matchArg(named) tmp <- character() @@ -63,7 +62,6 @@ setMethod(toJSONGeneric, "Link", function(object, named = c(FALSE, TRUE)) { return(tmp) }) -#' @export setMethod(toJSONGeneric, signature("LinkList"), function(object, named = c(TRUE, FALSE)) { named <- veupathUtils::matchArg(named) tmp <- veupathUtils::S4SimpleListToJSON(object, FALSE) diff --git a/R/methods-Network.R b/R/methods-Network.R index 55327f1..4ce8a25 100644 --- a/R/methods-Network.R +++ b/R/methods-Network.R @@ -172,11 +172,10 @@ pruneLinksBelowWeight <- function(net, threshold, verbose = c(TRUE, FALSE)) { toJSONGeneric <- getGeneric("toJSON", package = "veupathUtils") #' Convert Network object to JSON -#' +#' #' Converts a Network object to JSON #' @param object A Network object #' @param named boolean that declares if names should be included -#' @export setMethod(toJSONGeneric, "BaseNetwork", function(object, named = c(TRUE, FALSE)) { named <- veupathUtils::matchArg(named) @@ -202,7 +201,6 @@ setMethod(toJSONGeneric, "BaseNetwork", function(object, named = c(TRUE, FALSE)) #' @param pattern optional tmp file prefix #' @param verbose boolean that declares if logging is desired #' @return character name of a tmp file w ext *.json -#' @importFrom jsonlite toJSON #' @export #' @rdname writeNetworkJSON setGeneric("writeNetworkJSON", function(x, pattern = NULL, verbose = c(TRUE, FALSE)) standardGeneric("writeNetworkJSON"), signature = c("x")) diff --git a/R/methods-Nodes.R b/R/methods-Nodes.R index 204d45f..b5cc9ea 100644 --- a/R/methods-Nodes.R +++ b/R/methods-Nodes.R @@ -58,11 +58,10 @@ setMethod("getNodeIds", "NodeIdList", function(object) unlist(lapply(as.list(obj toJSONGeneric <- getGeneric("toJSON", package = "veupathUtils") #' Convert Node object to JSON -#' +#' #' Converts a Node object to JSON #' @param object A Node object #' @param named boolean that declares if names should be included -#' @export setMethod(toJSONGeneric, "Node", function(object, named = c(FALSE, TRUE)) { named <- veupathUtils::matchArg(named) tmp <- character() @@ -82,7 +81,6 @@ setMethod(toJSONGeneric, "Node", function(object, named = c(FALSE, TRUE)) { return(tmp) }) -#' @export setMethod(toJSONGeneric, signature("NodeList"), function(object, named = c(TRUE, FALSE)) { named <- veupathUtils::matchArg(named) tmp <- veupathUtils::S4SimpleListToJSON(object, FALSE) @@ -92,7 +90,6 @@ setMethod(toJSONGeneric, signature("NodeList"), function(object, named = c(TRUE, return(tmp) }) -#' @export setMethod(toJSONGeneric, signature("NodeId"), function(object, named = c(FALSE, TRUE)) { named <- veupathUtils::matchArg(named) tmp <- character() @@ -104,7 +101,6 @@ setMethod(toJSONGeneric, signature("NodeId"), function(object, named = c(FALSE, return(tmp) }) -#' @export setMethod(toJSONGeneric, signature("NodeIdList"), function(object, named = c(TRUE, FALSE)) { named <- veupathUtils::matchArg(named) tmp <- veupathUtils::S4SimpleListToJSON(object, FALSE) diff --git a/R/utils-json.R b/R/utils-json.R index c9264f3..3f43240 100644 --- a/R/utils-json.R +++ b/R/utils-json.R @@ -257,7 +257,6 @@ getJSON <- function(.pd, evilMode) { #' @param .pd a data.table to convert to json and write to a tmp file #' @param pattern optional tmp file prefix #' @return character name of a tmp file w ext *.json -#' @importFrom jsonlite toJSON #' @importFrom jsonlite prettify #' @export writeJSON <- function(.pd, evilMode, pattern = NULL, verbose = c(TRUE, FALSE)) { From 00f2ced7d82b7d7f1095a2ba60cf371556a525f0 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 17 Dec 2025 13:34:25 +0000 Subject: [PATCH 3/4] point to veupathUtils@add-bioc-to-remotes --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 444ad49..4dee89e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,7 +27,7 @@ Imports: veupathUtils, zoo Remotes: - VEuPathDB/veupathUtils@add-percent-variance-pca + VEuPathDB/veupathUtils@add-bioc-to-remotes URL: https://github.com/VEuPathDB/plot.data BugReports: https://github.com/VEuPathDB/plot.data/issues Description: plot.data is an R package for creating client-ready data for various plots and visualizations. Data can be returned as either a data.table or a json file. The json file also includes some additional information helpful for rendering various plot widgets (ex: recommended range and step for a bin width slider to accompany a histogram). The `data.table`s are organized so that each row represents data for one group per panel. Optionally compute various statistics (ex: smoothed conditional mean, kernel density estimates, odds ratio, relative risk, etc). From e76aae97ee83e6873001b3e3cc3a6fa129c90de6 Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 18 Dec 2025 10:57:48 +0000 Subject: [PATCH 4/4] back to regular veupathUtils --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4dee89e..e1fe288 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,7 +27,7 @@ Imports: veupathUtils, zoo Remotes: - VEuPathDB/veupathUtils@add-bioc-to-remotes + VEuPathDB/veupathUtils URL: https://github.com/VEuPathDB/plot.data BugReports: https://github.com/VEuPathDB/plot.data/issues Description: plot.data is an R package for creating client-ready data for various plots and visualizations. Data can be returned as either a data.table or a json file. The json file also includes some additional information helpful for rendering various plot widgets (ex: recommended range and step for a bin width slider to accompany a histogram). The `data.table`s are organized so that each row represents data for one group per panel. Optionally compute various statistics (ex: smoothed conditional mean, kernel density estimates, odds ratio, relative risk, etc).