Appendix: The RCX and CX Data Model (original) (raw)
Contents
- 1 CX data structure
- 2 Data types
- 3 NDEx conventions
- 4 Meta aspects
- 5 Core aspects
- 5.1 nodes
- 5.2 edges
- 5.3 nodeAttributes
* 5.3.1 NDEx conventions - 5.4 edgeAttributes
- 5.5 networkAttributes
* 5.5.1 NDEx conventions - 5.6 cartesianLayout
- 6 Cytoscape aspects
- 7 Deprecated aspects
- 8 Session info
CX data structure
The CX data structure can be divided into three main classes:
- Meta aspects:necessary for data transmission
- Core aspects:essential for defining a network
- Cytoscape aspects:aspects needed to define the visual layout of a network in Cytoscape
Aspect dependencies
Aspects with IDs:
Aspects, that reference IDs:
- edges reference nodes by “source” and “target”
- nodeAttributes reference nodes by “propertyOf”
- edgeAttributes reference edges by “propertyOf”
- cartesianLayout references cySubnetworks by “view”
- cyGroups reference nodes by “nodes” and edges by “internalEdges” and “externalEdges”
- sub-aspect cyVisualProperty of cyVisualProperties references cySubnetworks by “appliesTo” and “view”
- cySubnetworks reference nodes by “nodes” and edges by “edges”
Data types
CX is a JSON based format, that means that JavaScript data types are used. Those will be mapped to and from R data types as follows:
NDEx conventions
Handling of Identifiers
All identifiers should be either:
- \(\lt\)prefix\(\gt\):\(\lt\)id\(\gt\) format
- a string without " : "
- a URI
Citations
It is recomended to use the attribute “citation” on edges or nodes to store citations to specify literature references or other sources of information that are relevant to the network. Citations are primarily described by five dublin core terms. The “dc” prefix is implicitly interpreted as referencing dublin core in the context of the citations aspect.
The five primary dublin core terms defined for citations are:
- dc:title
- dc:contributor
- dc:identifier
- http://dublincore.org/documents/2012/06/14/dcmi-terms/?v=terms#terms-identifier
- Ideally citations make use of the “identifier” key to link to their source. This can be a URI, but might also use the “source:id” format, where source is usually “pmid” or “doi”.
- dc:type
- dc:description
- http://dublincore.org/documents/2012/06/14/dcmi-terms/?v=elements#description
- This should be a description of the resource, and it is preferable that information that can be expressed in more specific attributes should not be in this attribute. The “description” attribute could contain the title, authors, and/or journal reference, but in that case it would not be expected to be machine parsable.
Core aspects
nodes
Note: At least one node has to be present, therefore this aspect is mandatory!
Cytoscape aspects
See Cytoscape Styles on how styles are created in Cytoscape. The following aspects are based on how Cytoscape defines the visual representation of networks. For further information see Using Visual Properies in RCy3, which gives an overview of how to handle Visual properties in R automation.
CyVisualProperties
CyVisualProperties (CX)
The JSON object model for the cyVisualProperties aspect is not suitable to be proper represented in R data structures, therefore it is split up into the main aspect and several sub-aspects. The R structure looks as follows:
CyVisualProperties
├──network = CyVisualProperty
├──nodes = CyVisualProperty
├──edges = CyVisualProperty
├──defaultNodes = CyVisualProperty
└──defaultEdges = CyVisualProperty
CyVisualProperty
├──properties = CyVisualPropertyProperties
│ ├──name
│ └──value
├──dependencies = CyVisualPropertyDependencies
│ ├──name
│ └──value
├──mappings = CyVisualPropertyMappings
│ ├──name
│ ├──type
│ └──definition
├──appliesTo = <reference to subnetwork id>
└──view = <reference to subnetwork id>
cyTableColum
These elements are used to represent Cytoscape table column labels and types. Its main use is to disambiguate empty table columns.
Note: Cytoscape does not currently support table columns for the root network, but this is option is included here for consistency
Deprecated aspects
Note: Starting from v2.4.0, NDEx server will no longer generate these aspects from the server side. Networks last updated before the v2.4.0 release will still have these aspects.
Session info
sessionInfo()
## R version 4.5.0 RC (2025-04-04 r88126)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.2 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.21-bioc/R/lib/libRblas.so
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0 LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_GB LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: America/New_York
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] BiocStyle_2.36.0
##
## loaded via a namespace (and not attached):
## [1] digest_0.6.37 R6_2.6.1 bookdown_0.43
## [4] fastmap_1.2.0 xfun_0.52 cachem_1.1.0
## [7] knitr_1.50 htmltools_0.5.8.1 rmarkdown_2.29
## [10] lifecycle_1.0.4 cli_3.6.4 sass_0.4.10
## [13] jquerylib_0.1.4 compiler_4.5.0 tools_4.5.0
## [16] evaluate_1.0.3 bslib_0.9.0 yaml_2.3.10
## [19] BiocManager_1.30.25 jsonlite_2.0.0 rlang_1.1.6