Standard Cytoscape JSON Models - cytoscape/cytoscape-automation GitHub Wiki
This page lists the accepted JSON representations of the Cytoscape Application Data Model. Using these models when Cytoscape objects are returned from automation functions or commands constitutes a best practice. The Cytoscape JSON Utilities Sample contains a reference implementation of how to produce these using utilities within Cytoscape, and should be used wherever possible instead of re-implementing any representation.
CyNode.java
CyNode as SUID List
[
63,
...
]
CyNode as Single Object
{
"data": {
"id": 63,
"SUID": 63,
"shared name": "Node 1",
"name": "Node 1",
"selected": false,
"int_column": 1
}
}
CyEdge.java
CyEdges as an SUID List
[
83,
...
]
CyEdge as Single Object
{
"data": {
"source": 62,
"target": 63,
"SUID": 83,
"shared name": "Node 2 (interacts with) Node 1",
"shared interaction": "interacts with",
"name": "Node 2 (interacts with) Node 1",
"selected": false,
"interaction": "interacts with"
}
}
CyNetwork.java
CyNetworks as an SUID list
[
52,
...
]
CyNetwork as a Single Object
{
"shared name": "Network",
"name": "Network",
"SUID": 52,
"__Annotations": [
""
],
"selected": true
}
CyNetwork as cytoscape.js
See cytoscape.js
CyTable.java
[
...
{
"SUID": 54,
"title": "Network default network",
"public": true,
"mutable": "PERMANENTLY_IMMUTABLE",
"primaryKey": "SUID",
"rows": [
{
"shared name": "Network",
"name": "Network",
"SUID": 52,
"__Annotations": [
""
],
"selected": true
}
]
},
...
]
CyRow.java
[
...
{
"SUID": 63,
"shared name": "Node 1",
"name": "Node 1",
"selected": true,
"int_column": 1
},
...
]
CyColumn.java
As a List of Column Names
[
"Column 1",
"Column 2"
...
]
As a Single Column
{
"name": "int_column",
"type": "Integer",
"immutable": false,
"primaryKey": false,
"values": [
1,
null
]
}