CyVisualPropertyMappings | R Documentation |
This function is used to create objects for mappings in Cytoscape visual properties.
Networks, nodes, edges, and default nodes and edges mappings are realized as CyVisualProperty
objects, that each consist of
properties (CyVisualPropertyProperties
objects), dependencies (CyVisualPropertyDependencies
objects) and mappings (this here).
createCyVisualPropertyMappings(type, definition, name = NULL)
type |
character or named character; value of the mappings |
definition |
character; definitions of the mappings |
name |
character (optional); names of the mappings |
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
about dependencies between visual properties.
Currently there are only three dependencies supported:
Lock Node with and height: nodeSizeLocked = "false"
Fit Custom Graphics to node: nodeCustomGraphicsSizeSync = "true"
Edge color to arrows: arrowColorMatchesEdge = "false"
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
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>
CyVisualPropertyMappings object
If name is not provided, the names(type) is used instead to infer the names.
updateCyVisualProperty
, updateCyVisualProperties
## Using a named vector 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") createCyVisualPropertyMappings(vpMappingNamedType, vpMappingDefinition) ## Using three separate vectors vpMappingName = c("NODE_FILL_COLOR", "EDGE_TARGET_ARROW_SHAPE") vpMappingType = c("CONTINUOUS", "DISCRETE") createCyVisualPropertyMappings(vpMappingType, vpMappingDefinition, vpMappingName) # Result for either: # name type definition # 1 NODE_FILL_COLOR CONTINUOUS COL=gal1RGexp,T=double,... # 2 EDGE_TARGET_ARROW_SHAPE DISCRETE COL=directed,T=boolean,K=0=true,V=0=ARROW
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.