CyVisualProperty: Cytoscape visual property (object used in CyVisualProperties...

Description Usage Arguments Details Value See Also Examples

Description

This function is used to create Cytoscape visual property objects, that define networks, nodes, edges, and default nodes and edges in a CyVisualProperties aspect.

Usage

1
2
3
4
5
6
7
createCyVisualProperty(
  properties = NULL,
  dependencies = NULL,
  mappings = NULL,
  appliesTo = NULL,
  view = NULL
)

Arguments

properties

a single or a list of CyVisualPropertyProperties object (optional);

dependencies

a single or a list ofCyVisualPropertyDependencies object (optional);

mappings

a single or a list ofCyVisualPropertyMappings object (optional);

appliesTo

integer (optional); might refer to the IDs of a subnetwork aspect, but CX documantation is unclear

view

integer (optional); might refer to the IDs of a subnetwork aspect that is a view, but CX documantation is unclear

Details

Cytoscape contributes aspects that organize subnetworks, attribute tables, and visual attributes for use by its own layout and analysis tools. Furthermore are the aspects used in web-based visualizations like within the NDEx platform.

The visual properties aspect is the only aspect (CyVisualProperties) with a complex structure. It is composed of several sub-property classes and consists of CyVisualProperty objects, that belong to, or more precisely describe one of the following network elements: network, nodes, edges, defaultNodes or defaultEdges.

A single visual property (i.e. CyVisualProperty object) organizes the information as properties, dependencies and mappings, as well as the single values appliesTo and view, that define the subnetwork or view to which the IDs apply.

Properties are CyVisualPropertyProperties objects, that hold information like "NODE_FILL_COLOR" : "#26CCC9" or "NODE_LABEL_TRANSPARENCY" : "255" in a key-value like manner.

Dependencies are CyVisualPropertyDependencies objects, that hold information like "nodeSizeLocked" : "false" or ""arrowColorMatchesEdge" : "true" in a key-value like manner.

Mappings are CyVisualPropertyMappings objects, that hold information as a triplet consisting of name, type and definition, like "NODE_FILL_COLOR" : "DISCRETE" : "COL=molecule_type,T=string,K=0=miRNA,V=0=#FCEC00", "NODE_FILL_COLOR" : "CONTINUOUS" : "COL=gal1RGexp,T=double... or "NODE_LABEL" : "PASSTHROUGH" : "COL=COMMON,T=string".

For further information about Cytoscape visual properties see the Styles topic of the official Cytoscape documentation: http://manual.cytoscape.org/en/stable/Styles.html

Structure of Cytoscape Visual Properties

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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>

Value

CyVisualProperty object

See Also

updateCyVisualProperty, updateCyVisualProperties

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Prepare used properties
## Visual property: Properties
vpPropertyNamedValue = c(NODE_BORDER_STROKE="SOLID", 
                         NODE_BORDER_WIDTH="1.5")
vpPropertyP = createCyVisualPropertyProperties(vpPropertyNamedValue)

## Visual property: Dependencies
vpDependencyNamedValue = c(nodeSizeLocked="false", 
                           arrowColorMatchesEdge="true")
vpPropertyD = createCyVisualPropertyDependencies(vpDependencyNamedValue)

## Visual property: Mappings
vpMappingNamedType = c(NODE_FILL_COLOR="CONTINUOUS",
                       EDGE_TARGET_ARROW_SHAPE="DISCRETE")
vpMappingDefinition = c("COL=gal1RGexp,T=double,...",
                        "COL=directed,T=boolean,K=0=true,V=0=ARROW")
vpPropertyM = createCyVisualPropertyMappings(vpMappingNamedType, 
                                             vpMappingDefinition)

## Create visual property object 
createCyVisualProperty(properties=vpPropertyP, 
                       dependencies=vpPropertyD, 
                       mappings=vpPropertyM)

## Create visual property object with different subnetworks
createCyVisualProperty(properties=list(vpPropertyP, 
                                       vpPropertyP), 
                       dependencies=list(vpPropertyD,
                                         NA),
                       mappings=list(NA,
                                     vpPropertyM),
                       appliesTo = c(NA,
                                     1),
                       view = c(1,
                                NA))

frankkramer-lab/RCX documentation built on July 14, 2021, 6:33 p.m.