Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,29 @@ statement-type and entity-type vocabularies, value ranges, `NA` statistics
on nodes that are not in the input data, and that every edge's source and
target are nodes. It stops with an error listing every problem found.

* `cytoscapeNetwork()` draws the node status columns. Nodes not in the
input data (`measured = FALSE`) have no fill and a dashed grey border, and
the legend lists them as "not in input data"; nodes with
`included_in_query = FALSE` are faded; nodes with an `NA` `logFC` have no
fill. `entity_type` sets the node shape: hexagon for metabolites and lipids,
diamond for drugs, octagon for complexes, barrel for families. The legend
shows only the node styles, shapes, and edge types present, and covers
every statement type of the contract.

## Breaking changes

* `cytoscapeNetwork()` reads the edge `directed` column: an undirected edge
has no arrow and is drawn once for both directions, even when the reverse
edge is missing. Edges without the column treat `Complex` and
`Association` as undirected. Previously a `Complex` edge without its
reverse was drawn as directed.
* `cytoscapeNetwork()` colours a protein with PTM `site` rows from its
row with no `site`. A protein with only site rows is drawn as an uncoloured
container, and its site nodes keep their own colours. Previously it took
the colour of its first row, often a site's fold change.
* `cytoscapeNetwork()` no longer draws an `NA` `logFC` as the grey of a
zero fold change.

* The edges returned by `getSubnetworkFromIndra()` follow the edge contract.
Columns are renamed, with no aliases: `stmt_hash` to `statement_id` (now
always character, taken from INDRA's full-precision `matches_hash`),
Expand Down
19 changes: 16 additions & 3 deletions R/cytoscapeNetwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,23 @@
#' columns: \code{logFC} (numeric), \code{entity_name}
#' (character; may be semicolon-joined for multi-grounded
#' rows), \code{entity_id} (character), \code{site}
#' (character, underscore-separated PTM site list).
#' (character, underscore-separated PTM site list), and
#' the node status columns of \code{\link{validate_network}()}:
#' \code{entity_type} sets the node shape (e.g. a hexagon
#' for \code{"metabolite"}); \code{measured = FALSE} draws a
#' node with no fill and a dashed grey border ("not in input
#' data"); \code{included_in_query = FALSE} fades it. A node
#' with an \code{NA} \code{logFC} has no fill. A protein
#' with \code{site} rows takes its colour from its row
#' with no \code{site}; without one, only its sites are
#' coloured. Missing status columns count as \code{TRUE}.
#' @param edges Data frame with columns \code{source}, \code{target},
#' \code{interaction}. Optional: \code{site},
#' \code{evidence_url}, opened when an edge is clicked.
#' \code{interaction}. Optional: \code{directed} (an
#' edge with \code{FALSE} has no arrow and is drawn once
#' for both directions; without the column, \code{Complex}
#' and \code{Association} edges are undirected),
#' \code{site}, \code{evidence_url}, opened when an edge is
#' clicked.
#' @param displayLabelType \code{"id"} (default) or \code{"entity_name"}:
#' which column is used as the visible node label.
#' \code{"entityName"} is deprecated and is treated as
Expand Down
Loading
Loading