'How to Switch Source and Target Nodes?
Using Cytoscape 3.8.2 for desktop I want to edit an existing edge in my network an switch the source and target node. I've tried to edit the columns that contain the node IDs e.g.
745 (directed) 178 to 178 (directed) 745
but this command does not change the directed edge in my visualisation. Thanks!
Solution 1:[1]
Unfortunately, there is no way to switch the source and target nodes in your network. On the other hand, typically Cytoscape doesn't care much about it, so you could override the visualization (using the bypass column) and switch how source and target are visualized.
-- scooter
Solution 2:[2]
If you use the "draw edge" tool you can control which node is the source and which node is the target.
- Right-click on the node you want to be the source
- In the context menu that pops up expand "Add >" and click "Edge"
- A line will appear connecting the mouse pointer to the source node
- Click on the desired target node to create the new edge
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Scooter Morris |
| Solution 2 | Adam Pater-Faranda |
