Learn R Programming

RCy3 (version 1.2.0)

clearSelection: clearSelection

Description

If any nodes are selected in the current Cytocape window, they will be unselected.

Usage

clearSelection(obj)

Arguments

obj
a CytoscapeWindowClass object.

Value

Nothing

Examples

Run this code
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())
  cw <- CytoscapeWindow ('clearSelection.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw)
  selectNodes (cw, 'A')
  print (getSelectedNodeCount (cw))   # should be 1
  clearSelection (cw)
  print (getSelectedNodeCount (cw))   # should be 0

Run the code above in your browser using DataLab