setEdgeAttributesDirect: setEdgeAttributesDirect

Description Usage Arguments Value Author(s) See Also Examples

Description

Transfer the named edge attributes to Cytoscape. This method is required, for instance, if you wish to run a 'movie.' For example, if you have a time course experiment with different values at successive time points of the 'phosphorylates' or 'binds' relationship between two nodes. With an edgeColor rule already specified, you can animate the display of the edges in the graph by pumping new values of the edge attributes, and then asking for a redraw.

Usage

1
setEdgeAttributesDirect(obj, attribute.name, attribute.type, edge.names, values)

Arguments

obj

a CytoscapeWindowClass object.

attribute.name

a string one of the attributes defined on the edges.

attribute.type

a string from one of these three groups: (floating, numeric, double), (integer, int), (string, char, character). This parameter is required because RCy3 cannot always infer the type of an attribute.

edge.names

a list of strings, edge names

values

a list of objects of the type specified by 'attribute.name', one per edge

Value

None.

Author(s)

Tanja Muetze, Georgi Kolishovski, Paul Shannon

See Also

setEdgeAttributes setNodeAttributes setNodeAttributesDirect

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  ## Not run: 
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())

  cw <- CytoscapeWindow ('setEdgeAttributesDirect.test', graph=makeSimpleGraph())
  sendNodes(cw)
  sendEdges(cw)
  edge.names = as.character (cy2.edge.names (cw@graph))
  stopifnot (length (edge.names) == 3)
  edge.values = c ('alligator', 'hedgehog', 'anteater')
  result = setEdgeAttributesDirect (cw, 'misc', 'string', edge.names, edge.values)

## End(Not run)

RCy3 documentation built on May 31, 2017, 11:49 a.m.

Search within the RCy3 package
Search all R packages, documentation and source code