setEdgeTargetArrowColorRule: Specify rule for the target arrow color

Description Usage Arguments Value Author(s) See Also Examples

Description

Specify how edge attributes – that is, data values of the specified edge attribute – control the color of the target arrow, found at the end of an edge, where it connects to the target node.

Usage

1
2
3
setEdgeTargetArrowColorRule(obj, edge.attribute.name, control.points, colors, 
                            mode="interpolate", default.color='#000000',
                            vizmap.style.name = 'default')

Arguments

obj

a CytoscapeWindowClass object.

edge.attribute.name

the edge attribute whose values will determine the color of the target arrow of each edge when this rule is applied.

control.points

A list of scalar, discrete values. For instance, interaction types: 'phosphorylates', 'ubiquinates', 'represses', 'activates'

colors

A color for each of the attribute.values

mode

either 'interpolate' or 'lookup'.

default.color

The color to use when an explicit mapping is not provided.

vizmap.style.name

visual style name, defaults to the style 'default'.

Value

None.

Author(s)

Tanja Muetze, Georgi Kolishovski, Paul Shannon

See Also

setNodeBorderColorRule (detailed example) setEdgeSourceArrowColorRule setEdgeColorRule setNodeShapeRule

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
  ## Not run: 
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())

  # send and display network
  cw <- CytoscapeWindow ('setEdgeTargetArrowColorRule.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork (cw, 'force-directed')
  
  # add edge arrows
  arrows <- c ('CIRCLE', 'ARROW', 'DIAMOND')
  edgeType.values <- c ('phosphorylates', 'synthetic lethal', 'undefined')
  setEdgeTargetArrowRule (cw, 'edgeType', edgeType.values, arrows)
  
  colors <- c ("#AA00AA", "#AAAA00", "#AA0000")
  edgeType.values <- c ('phosphorylates', 'synthetic lethal', 'undefined')
  
  # set rule
  setEdgeTargetArrowColorRule (cw, 'edgeType', edgeType.values, colors, mode='lookup')
  
  # if not specified, the mode is interpolate
  colors <- c ("#FFFFFF", "#00FF00", "#00AA00", "#FF0000", "#AA0000")
  control.points <- c( -12.0, 35.0, 0.0 )
  setEdgeTargetArrowColorRule(cw, 'score', control.points, colors)

## End(Not run)

tmuetze/Bioconductor_RCy3_the_new_RCytoscape documentation built on May 31, 2019, 4:39 p.m.