From f678da0eb6dcb8396a7b0613f31645d5cfd99d19 Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Thu, 2 Oct 2025 15:14:20 -0400 Subject: [PATCH 1/2] increase edge font size --- R/visualizeNetworksWithHTML.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/visualizeNetworksWithHTML.R b/R/visualizeNetworksWithHTML.R index d10eb33..c244d98 100644 --- a/R/visualizeNetworksWithHTML.R +++ b/R/visualizeNetworksWithHTML.R @@ -462,7 +462,7 @@ generateCytoscapeConfig <- function(nodes, edges, `edge-text-rotation` = "autorotate", `text-margin-y` = -12, `text-halign` = "center", - `font-size` = "9px", + `font-size` = "12px", `font-weight` = "bold", color = "data(color)", `text-background-color` = "#ffffff", From 2657daf4215213703ccf24342b7762d035a3e814 Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Thu, 2 Oct 2025 17:15:20 -0400 Subject: [PATCH 2/2] reorder node and edge tables columns --- R/utils_getSubnetworkFromIndra.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/utils_getSubnetworkFromIndra.R b/R/utils_getSubnetworkFromIndra.R index f3b8bce..eda9444 100644 --- a/R/utils_getSubnetworkFromIndra.R +++ b/R/utils_getSubnetworkFromIndra.R @@ -245,6 +245,9 @@ target = vapply(keys(res), function(x) { query(res, x)$target_uniprot_id }, ""), + site = vapply(keys(res), function(x) { + query(res, x)$site + }, ""), interaction = vapply(keys(res), function(x) { query(res, x)$data$stmt_type }, ""), @@ -260,9 +263,6 @@ sourceCounts = vapply(keys(res), function(x) { query(res, x)$data$source_counts }, ""), - site = vapply(keys(res), function(x) { - query(res, x)$site - }, ""), stringsAsFactors = FALSE ) # add correlation - maybe create a separate function @@ -289,8 +289,8 @@ #' @keywords internal #' @noRd .constructNodesDataFrame <- function(input, edges) { - nodes = input[, c("Protein", "log2FC", "adj.pvalue", "HgncName", "Site")] - colnames(nodes) = c("id", "logFC", "adj.pvalue", "hgncName", "Site") + nodes = input[, c("Protein", "HgncName", "Site", "log2FC", "adj.pvalue")] + colnames(nodes) = c("id", "hgncName", "Site", "logFC", "adj.pvalue") nodes = nodes[nodes$id %in% c(edges$source, edges$target), ] nodes$hgncName = ifelse(is.na(nodes$hgncName), nodes$id, nodes$hgncName)