Learn R Programming

RCy3 (version 1.2.0)

setEdgeSourceArrowColorDirect: setEdgeSourceArrowColorDirect

Description

In the specified CytoscapeWindow, set the edgeSourceArrowColor of the specified edge or edges.

Usage

setEdgeSourceArrowColorDirect(obj, edge.names, new.colors)

Arguments

obj
a CytoscapeWindowClass object.
edge.names
one or more String objects, edges in standard Cytoscape form.
new.colors
one or more String objects, representing a color in a '#RRGGBB' hex format.

Value

None.

See Also

setEdgeTargetArrowColorDirect

Examples

Run this code
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())

  cw <- CytoscapeWindow ('setEdgeSourceArrowColorDirect.test', graph=makeSimpleGraph())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork (cw, 'force-directed')

  arrows <- c ('Arrow', 'Diamond', 'Circle')
  edgeType.values <- c ('phosphorylates', 'synthetic lethal', 'undefined')
  setEdgeSourceArrowRule (cw, 'edgeType', edgeType.values, arrows)
  setEdgeTargetArrowRule (cw, 'edgeType', edgeType.values, arrows)

  colors.1 <- c ("#FFFFFF", "#FFFFFF", "#FFFFFF")
  colors.2 <- c ("#AA00AA", "#00AAAA", "#0000AA")

  edge.names <- as.character (cy2.edge.names (cw@graph)) [1:3]

  for (i in 1:2) {
    setEdgeSourceArrowColorDirect (cw, edge.names, colors.1)
    Sys.sleep (0.3)
    setEdgeSourceArrowColorDirect (cw, edge.names, colors.2)
    Sys.sleep (0.3)
    } # for i

Run the code above in your browser using DataLab