diff --git a/DESCRIPTION b/DESCRIPTION index c95ca26..5d19e86 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: MSstatsBioNet Type: Package Title: Network Analysis for MS-based Proteomics Experiments -Version: 1.5.1 +Version: 1.5.2 Authors@R: c( person("Anthony", "Wu", email = "wu.anthon@northeastern.edu", role = c("aut", "cre"), comment = c(ORCID = "0009-0001-7391-9902")), diff --git a/inst/htmlwidgets/cytoscapeNetwork.js b/inst/htmlwidgets/cytoscapeNetwork.js index 50a4f36..7f04a5a 100644 --- a/inst/htmlwidgets/cytoscapeNetwork.js +++ b/inst/htmlwidgets/cytoscapeNetwork.js @@ -226,6 +226,8 @@ HTMLWidgets.widget({ }) .join(""); + var hasPtm = cyInstance.nodes('[node_type = "ptm"]').length > 0; + legendEl.innerHTML = '
Node color (logFC)
' + '
' + @@ -234,8 +236,10 @@ HTMLWidgets.widget({ ' UpregulatedNeutralDownregulated' + '
' + (edgeItems ? '
Edge types
' + edgeItems : '') + - '
' + - 'PTM info: Hover over edges to see overlapping PTM sites.
' + + (hasPtm + ? '
' + + 'PTM info: Hover over edges to see overlapping PTM sites.
' + : '') + '
' + 'Delete edge: Right-click or Ctrl+Click an edge to remove it from the network.
'; }