Generates the appropriate data structure for the "mapping" parameter in updateStyleMapping.

mapVisualProperty(
  visual.prop,
  table.column,
  mapping.type,
  table.column.values,
  visual.prop.values,
  network = NULL,
  base.url = .defaultBaseUrl
)

Arguments

visual.prop

(char) name of visual property to map

table.column

(char) name of table column to map

mapping.type

(char) continuous, discrete or passthrough (c,d,p)

table.column.values

(list) list of values paired with visual.prop.values; skip for passthrough mapping

visual.prop.values

(list) list of values paired with table.column.values; skip for passthrough mapping

network

(optional) Name or SUID of the network. Default is the "current" network active in Cytoscape.

base.url

(optional) Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://localhost:1234 and the latest version of the CyREST API supported by this version of RCy3.

Value

(network=network, base.url=base.url) ready to convert into JSON by style mapping operations

Details

The paired list of values must be of the same length or mapping will fail. For gradient mapping, you may include two additional visual.prop.values in the first and last positions to map respectively to values less than and greater than those specified in table.column.values. Mapping will also fail if the data type of table.column.values does not match that of the existing table.column. Note that all imported numeric data are stored as Integers or Doubles in Cytosacpe tables; and character or mixed data are stored as Strings.

List of visual properties

Node Border StrokeEdge BendNetwork Background Paint
Node Border PaintEdge CurvedNetwork Center X Location
Node Border TransparencyEdge LabelNetwork Center Y Location
Node Border WidthEdge Label ColorNetwork Center Z Location
Node CustomGraphics 1-9Edge Label Font FaceNetwork Depth
Node CustomGraphics Position 1-9Edge Label Font SizeNetwork Edge Selection
Node CustomGraphics Size 1-9Edge Label TransparencyNetwork Height
Node CustomPaint 1-9Edge Label WidthNetwork Node Selection
Node DepthEdge Line TypeNetwork Scale Factor
Node Fill ColorEdge PaintNetwork Size
Node HeightEdge SelectedNetwork Title
Node LabelEdge Selected PaintNetwork Width
Node Label ColorEdge Source Arrow Selected Paint
Node Label Font FaceEdge Source Arrow Shape
Node Label Font SizeEdge Source Arrow Size
Node Label PositionEdge Source Arrow Unselected Paint
Node Label TransparencyEdge Stroke Selected Paint
Node Label WidthEdge Stroke Unselected Paint
Node Network Image VisibleEdge Target Arrow Selected Paint
Node PaintEdge Target Arrow Shape
Node SelectedEdge Target Arrow Size
Node Selected PaintEdge Target Arrow Unselected Paint
Node ShapeEdge Tooltip
Node SizeEdge Transparency
Node TooltipEdge Unselected Paint
Node TransparencyEdge Visible
Node VisibleEdge Visual Property
Node WidthEdge Width
Node X Location
Node Y Location
Node Z Location

See also

updateStyleMapping getVisualPropertyNames

Examples

# \donttest{
mapVisualProperty('node fill color','score','c',c(-4.0,0.0,9.0),c('#99CCFF','#FFFFFF','#FF7777'))
mapVisualProperty('node shape','type','d',c('protein','metabolite'),c('ellipse','rectangle'))
mapVisualProperty('node label','alias','p')
# }