Learn R Programming

RCytoscape (version 1.22.0)

getSelectedEdgeCount: getSelectedEdgeCount

Description

Returns the number of edge currently selected.

Usage

getSelectedEdgeCount(obj)

Arguments

obj
a CytoscapeWindowClass object.

Value

An integer.

Examples

Run this code
  cw <- new.CytoscapeWindow ('getSelectedEdgeCount.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'jgraph-spring')
  redraw (cw)
  clearSelection (cw)
  getSelectedEdgeCount (cw) # should be 0
    # in Cytoscape, interactively select an edge, or programmatically (doesn't work yet)
    # selectEdges (cwe, "A (phosphorylates) B")
  getSelectedEdgeCount (cw)
  # should be 1

Run the code above in your browser using DataLab