getNodeAttribute: getNodeAttribute

Description Usage Arguments Value Author(s) See Also Examples

Description

Node and node attributes are usually added to a Cytoscape network by defining them on the graph used to construct a CytoscapeWindow. The small family of methods described here, however, provide another avenue for adding an node attribute, for learning which are currently defined, and for deleting and node attribute.

Note that node (and node) attibutes are defined not just for a specific, single CytoscapeWindow, but for an entire Cytoscape application session. Thus if you have two nodes (or nodes) with the same ID (the same name) in two different windows, adding a node attribute results in both nodes having that attribute.

Usage

1
getNodeAttribute(obj, node.name, attribute.name)

Arguments

obj

a CytoscapeConnectionClass object or CytoscapeWindow object.

node.name

a character string specifying the Cytoscape-style name of an node.

attribute.name

a character string, the name of the attribute you wish to retrieve.

Value

The attribute in question, which may be of any scalar type.

Author(s)

Tanja Muetze, Georgi Kolishovski, Paul Shannon

See Also

getNodeAttributeNames deleteNodeAttribute

Examples

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

  window.name = 'demo.getNodeAttribute'
  cw = CytoscapeWindow (window.name, graph=makeSimpleGraph ())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork(cw)

  count.B = getNodeAttribute (cw, "B", 'count')
  count.B
    # [1] 30

## End(Not run)

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