# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
cw <- CytoscapeWindow ('getSelectedEdges.test', graph=makeSimpleGraph())
displayGraph (cw)
layoutNetwork(cw, 'force-directed')
redraw (cw)
# in Cytoscape, interactively select an edge or call the selectEdges function
selectEdges (cw, "A (phosphorylates) B")
getSelectedEdges (cw)
# [1] "A (phosphorylates) B"
Run the code above in your browser using DataLab