Learn R Programming

RCy3 (version 1.2.0)

selectFirstNeighborsOfSelectedNodes: selectFirstNeighborsOfSelectedNodes

Description

Expand the selection by adding the first neighbors, in the Cytosape network, of the nodes currently selected (again, in the Cytoscape network). The R graph is unchanged.

Usage

selectFirstNeighborsOfSelectedNodes (obj)

Arguments

obj
a CytoscapeWindowClass object.

Value

None.

See Also

clearSelection getSelectedNodeCount getSelectedNodes hideSelectedNodes getFirstNeighbors

Examples

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

  cw <- CytoscapeWindow ('selectFirstNeighborsOfSelecteNodes.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw)
  clearSelection (cw)
  selectNodes (cw, 'A')
  selectFirstNeighborsOfSelectedNodes (cw)
  print (sort (getSelectedNodes (cw)))
    # [1] "A" "B" "C"

Run the code above in your browser using DataLab