0

In Cytoscape, I have bi-directional edges from a reference node. How do I select only those edges that have a particular directionality. For example selecting all the outward directed edges from the reference node.enter image description here

user3392665
  • 29
  • 1
  • 9
  • Have you tried the filter option provided by Cytoscape for selecting edges? Could you be able to sort the result pane based on the edge column and then select the "for e.g. bi-directional" edges manually? – A1aks Oct 15 '15 at 05:31
  • @A1aks thanks for the filter suggestion, yes it works. But I was wondering if it was possible to have a functionality such as right click on a reference node and select all edges directed out from it, maybe even with an App – user3392665 Oct 15 '15 at 13:58

1 Answers1

1

Have you tried using this:

cy.$id('yourID').outgoers();

This selects all edges going out of the specified node, which you can get by a click-event e.g. If you want to get the outgoing nodes behind these edges, you can use this:

cy.$id('yourID').outgoers().targets();

http://js.cytoscape.org/#nodes.outgoers

http://js.cytoscape.org/#edges.targets

Stephan T.
  • 5,843
  • 3
  • 20
  • 42