setEdgeOpacityRule: setEdgeOpacityRule

Description Usage Arguments Value Author(s) See Also Examples

Description

Specify how data attributes – for the specified named attribute – is mapped to edge opacity.

Usage

1
2
setEdgeOpacityRule(obj, edge.attribute.name, control.points, opacities, mode,
                  vizmap.style.name = 'default')

Arguments

obj

a CytoscapeWindowClass object.

edge.attribute.name

the edge attribute whose values will, when this rule is applied, determine the opacity of each edge.

control.points

a list of values, either numeric (for interpolate mode) or character strings (for 'lookup' mode).

opacities

a list of opacity values, integers between 0 (invisible) and 255 (completely visible)

mode

either 'interpolate' or 'lookup'.

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) setEdgeColorRule setNodeShapeRule setEdgeLineStyleRule setNodeColorRule getVisualStyleNames

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

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

  edgeType.values <- c ("phosphorylates", "synthetic lethal", "undefined")

    # want to see edges and both arrows, to check success of opacity rule
  setEdgeTargetArrowRule (cw, 'edgeType', edgeType.values, rep ('ARROW', 3))
  setEdgeSourceArrowRule (cw, 'edgeType', edgeType.values, rep ('ARROW', 3))
  setDefaultEdgeLineWidth (cw, 5)

    # do the lookup rule
  opacities <- c (25, 100, 255)
  setEdgeOpacityRule (cw, 'edgeType',  edgeType.values, opacities, mode='lookup')

    # now do the interpolated version
  opacities <- c (10, 125, 255)
  control.points <- c (-12, 0, 35)
  setEdgeOpacityRule (cw, 'score',  control.points, opacities, mode='interpolate')  

## End(Not run)

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