Learn R Programming

RCy3 (version 1.2.0)

getSelectedEdgeCount: getSelectedEdgeCount

Description

Returns the number of edges currently selected.

Usage

getSelectedEdgeCount(obj)

Arguments

obj
a CytoscapeWindowClass object.

Value

An integer.

Examples

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

  cw <- CytoscapeWindow ('getSelectedEdgeCount.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'force-directed')
  redraw (cw)
  clearSelection (cw)
  getSelectedEdgeCount (cw)
    # [1] 0
    # in Cytoscape, interactively select an edge, or programmatically
  selectEdges (cw, "A (phosphorylates) B")
  getSelectedEdgeCount (cw)
    # [1] 1

Run the code above in your browser using DataLab