Learn R Programming

RCy3 (version 1.2.0)

getSelectedNodes: getSelectedNodes

Description

Retrieve the names of all the nodes selected in the current graph.

Usage

getSelectedNodes(obj)

Arguments

obj
a CytoscapeWindowClass object.

Value

A list of character strings.

Examples

Run this code
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())

  cw <- CytoscapeWindow ('getSelectedNodes.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'force-directed')
  redraw (cw)
    # in Cytoscape, interactively select two nodes, or call selectNodes
  selectNodes (cw, c ('A','B'))
  getSelectedNodes (cw)
  # [1] "A" "B"

Run the code above in your browser using DataLab