deleteNodeAttribute

Description

Node and node attributes are usually added to a Cytoscape network by defining them on the graph used to construct a CytoscapeWindow. Once Cytoscape has been passed an attribute, however, it persists until you exit the application or delete it by using the Cytoscape graphical user interface or by calling this method.

Usage

1
deleteNodeAttribute(obj, attribute.name)

Arguments

obj

a CytoscapeConnectionClass object or CytoscapeWindow object.

attribute.name

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

Value

nothing

Author(s)

Tanja Muetze, Georgi Kolishovski, Paul Shannon

See Also

getNodeAttributeNames addNodeAttribute

Examples

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

  window.name = 'demo.deleteNodeAttribute'
  cw = CytoscapeWindow (window.name, graph=makeSimpleGraph ())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork(cw)
  
    # before:
  print (getNodeAttributeNames (cw))
    # [1] "name"  "type"  "lfc"   "label" "count"
  deleteNodeAttribute (cw, 'count')
    # after:
  print (getNodeAttributeNames (cw))
    # [1] "name"  "type"  "lfc"   "label"

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.