setEdgeSourceArrowColorDirect: setEdgeSourceArrowColorDirect

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
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.

Author(s)

Tanja Muetze, Georgi Kolishovski, Paul Shannon

See Also

setEdgeTargetArrowColorDirect

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
  ## Not run: 
  # 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

## End(Not run)

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