From b4340045a1c2701bfce6e31e6b95fb38ba252c9b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 2 Mar 2026 09:23:10 +0000 Subject: [PATCH 1/3] docs: AI-generated doc upgrade for `cytoscapeNetworkOutput` Auto-generated by weekly doc workflow. Target: R/cytoscapeNetwork.R::cytoscapeNetworkOutput Date: 2026-03-02T09:23:10Z --- R/cytoscapeNetwork.R | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/R/cytoscapeNetwork.R b/R/cytoscapeNetwork.R index cc3a3e8..e2b57a6 100644 --- a/R/cytoscapeNetwork.R +++ b/R/cytoscapeNetwork.R @@ -1,3 +1,4 @@ +```r #' Render a Cytoscape network visualisation #' #' Creates an interactive network diagram powered by Cytoscape.js and the dagre @@ -106,6 +107,44 @@ cytoscapeNetwork <- function(nodes, # ── Shiny helpers ─────────────────────────────────────────────────────────── #' Shiny output binding for cytoscapeNetwork +#' +#' Creates a Shiny output binding for a Cytoscape network visualization, allowing +#' the network to be rendered within Shiny applications. +#' +#' @param outputId \code{character}. The output variable to read from. +#' @param width \code{character}. The width of the rendered widget. Default is \code{"100%"}. +#' @param height \code{character}. The height of the rendered widget. Default is \code{"500px"}. +#' +#' @return A Shiny output binding for a Cytoscape network visualization. +#' +#' @examples +#' \dontrun{ +#' library(shiny) +#' +#' ui <- fluidPage( +#' cytoscapeNetworkOutput("cytoNetwork") +#' ) +#' +#' server <- function(input, output, session) { +#' output$cytoNetwork <- renderCytoscapeNetwork({ +#' nodes <- data.frame( +#' id = c("TP53", "MDM2", "CDKN1A"), +#' logFC = c(1.5, -0.8, 2.1), +#' stringsAsFactors = FALSE +#' ) +#' edges <- data.frame( +#' source = c("TP53", "MDM2"), +#' target = c("MDM2", "TP53"), +#' interaction = c("Activation", "Inhibition"), +#' stringsAsFactors = FALSE +#' ) +#' cytoscapeNetwork(nodes, edges) +#' }) +#' } +#' +#' shinyApp(ui, server) +#' } +#' #' @importFrom htmlwidgets shinyWidgetOutput #' @inheritParams htmlwidgets::shinyWidgetOutput #' @export @@ -134,3 +173,4 @@ renderCytoscapeNetwork <- function(expr, env = parent.frame(), quoted = FALSE) { quoted = TRUE ) } +``` \ No newline at end of file From f9f93c074d9494db281b6eaf235570be45074ed0 Mon Sep 17 00:00:00 2001 From: tonywu1999 Date: Tue, 3 Mar 2026 19:22:02 -0500 Subject: [PATCH 2/3] Remove unnecessary code comments and formatting --- R/cytoscapeNetwork.R | 2 -- 1 file changed, 2 deletions(-) diff --git a/R/cytoscapeNetwork.R b/R/cytoscapeNetwork.R index e2b57a6..89c48b7 100644 --- a/R/cytoscapeNetwork.R +++ b/R/cytoscapeNetwork.R @@ -1,4 +1,3 @@ -```r #' Render a Cytoscape network visualisation #' #' Creates an interactive network diagram powered by Cytoscape.js and the dagre @@ -173,4 +172,3 @@ renderCytoscapeNetwork <- function(expr, env = parent.frame(), quoted = FALSE) { quoted = TRUE ) } -``` \ No newline at end of file From 0e9ebde3eba14c74f75232d893c0563da063a39c Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Tue, 3 Mar 2026 19:29:14 -0500 Subject: [PATCH 3/3] fix documentation problems --- R/cytoscapeNetwork.R | 4 ---- man/cytoscapeNetworkOutput.Rd | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/R/cytoscapeNetwork.R b/R/cytoscapeNetwork.R index 89c48b7..cfdf293 100644 --- a/R/cytoscapeNetwork.R +++ b/R/cytoscapeNetwork.R @@ -110,10 +110,6 @@ cytoscapeNetwork <- function(nodes, #' Creates a Shiny output binding for a Cytoscape network visualization, allowing #' the network to be rendered within Shiny applications. #' -#' @param outputId \code{character}. The output variable to read from. -#' @param width \code{character}. The width of the rendered widget. Default is \code{"100%"}. -#' @param height \code{character}. The height of the rendered widget. Default is \code{"500px"}. -#' #' @return A Shiny output binding for a Cytoscape network visualization. #' #' @examples diff --git a/man/cytoscapeNetworkOutput.Rd b/man/cytoscapeNetworkOutput.Rd index 39ec60f..be2fa1c 100644 --- a/man/cytoscapeNetworkOutput.Rd +++ b/man/cytoscapeNetworkOutput.Rd @@ -13,6 +13,39 @@ cytoscapeNetworkOutput(outputId, width = "100\%", height = "500px") \code{"400px"}, \code{"auto"}) or a number, which will be coerced to a string and have \code{"px"} appended.} } +\value{ +A Shiny output binding for a Cytoscape network visualization. +} \description{ -Shiny output binding for cytoscapeNetwork +Creates a Shiny output binding for a Cytoscape network visualization, allowing +the network to be rendered within Shiny applications. +} +\examples{ +\dontrun{ +library(shiny) + +ui <- fluidPage( + cytoscapeNetworkOutput("cytoNetwork") +) + +server <- function(input, output, session) { + output$cytoNetwork <- renderCytoscapeNetwork({ + nodes <- data.frame( + id = c("TP53", "MDM2", "CDKN1A"), + logFC = c(1.5, -0.8, 2.1), + stringsAsFactors = FALSE + ) + edges <- data.frame( + source = c("TP53", "MDM2"), + target = c("MDM2", "TP53"), + interaction = c("Activation", "Inhibition"), + stringsAsFactors = FALSE + ) + cytoscapeNetwork(nodes, edges) + }) +} + +shinyApp(ui, server) +} + }