Example Network Refuses to update edge direction!!

39 views
Skip to first unread message

Dima

unread,
Oct 18, 2018, 9:13:13 AM10/18/18
to cytoscape...@googlegroups.com

Hello!

Please help me understand what I am doing wrong...I have attached the network session file (test_network) which was created from the test_network.xlsx file.

 

Please try importing the test_network2. Xlsx as Edge table – you will see that edge thickness will change BUT THE ARROW DIRECTION WILL NOT CHANGE! Is this a bug? Or I am doing something wrong again!)


Dima

test_network.cys
test_network.xlsx
test_network2.xlsx

D

unread,
Oct 18, 2018, 5:01:39 PM10/18/18
to cytoscape-helpdesk
can anyone please help? not sure what to do...tried everythibg

Alex Pico

unread,
Oct 18, 2018, 6:23:07 PM10/18/18
to cytoscape...@googlegroups.com
Hi Dima,

Simple answers: 

You can NOT change the direction of edge after importing it.

You CAN change the display of a directed edge, however, by changing the Style of Source Arrow Shape and Target Arrow Shape. See Ruth’s previous responses. This is kind of a hack, since the model of the directed edge is not actually changing.

You CAN import a new network with different edges. See previous responses and attached cys file.

You CAN delete an edge and then add a new edge to replace it. This is advanced and requires familiarity with CyREST, RCy3 or py2cytoscape.

With the xls files you provided the only option is to import each xls as a separate network. You will then have two networks, each with accurate edge directions (see attached cys). We have provided UI and scripting examples already for how to do this.

If you try to load a new xls as edge table data it won’t work. The directionality is permenantly fixed by the name of the edge, for example, "AUD (interacts with) EUR”. You can’t change that for a given edge. If you want the opposite direction IN THE SAME NETWORK, then you have to first delete that edge and then add a new edge. You can not do this by network or table import functions. Alternatively, you can to change the Style of the display of an edge with the hack described above. 

I recommend becoming more familiar with Cytoscape network model by means of the many tutorials we have online: http://tutorials.cytoscape.org/.

Asking the same question again is not going to give you a different answer...
 - Alex

test_network_alex.cys

D

unread,
Oct 19, 2018, 4:45:14 AM10/19/18
to cytoscape-helpdesk
Dear Alex,
Thank you for the fantastic reply. We are a team of financial analysts - non programmers or even bio researchers) But we love Cytoscape.
Can you please recommend how we proceed? We have a network which has a lot of parameters tied to some column - like edge color, edge width , edge transparency.....and we need to constantly update the network with the freshly calculated edges - which might point in an entirely new way  - not just the opppostie of the previous version....so how should we proceed? if we delete all edges and then import the new ones to the same network this will work? I mean will the edges retain all pre-configured dependencies mentioned earlier - like depending color on a special column and others?
Thanks a lot from your less educated friend!)
Dima

D

unread,
Oct 19, 2018, 4:50:07 AM10/19/18
to cytoscape...@googlegroups.com
ok - one more quesiton - can we tie the arrow edge TYPE to certain columns and just handles arrow direction like this? - we shoudl select undirected newtork for this? but if we manually change arrow direction - Cytoscape will nto udnertsand this and the hierarcial layout will not work????

D

unread,
Oct 19, 2018, 8:11:33 AM10/19/18
to cytoscape-helpdesk
I deleted the edges - tried to import the new ones and they refuse to import as table - nothing is imported in place of the earleir edges -


On Friday, October 19, 2018 at 1:23:07 AM UTC+3, Alex Pico wrote:

D

unread,
Oct 20, 2018, 11:23:01 AM10/20/18
to cytoscape...@googlegroups.com
Are you close to Cytoscape development team? maybe they can issue an edit  whuch import edge direction??


On Friday, October 19, 2018 at 1:23:07 AM UTC+3, Alex Pico wrote:

D

unread,
Oct 24, 2018, 11:18:44 AM10/24/18
to cytoscape-helpdesk
Dear Friend!!!!happy day!!! we found the solution - which is very obvious - we import the new network and just RE-APPLY THE SAVED NETWORK STYLES!!!!! With the new network, which are saved in the styles palette - and the new network looks just like the old one and has all the correct edges.!!!!sorry for the trouble - now we need to automate this.... can we automate the applciaiton of the style which was saved previously?can it be done by a command?Thanks a lot for your help!

daveric...@gmail.com

unread,
Oct 24, 2018, 11:18:44 AM10/24/18
to cytoscape-helpdesk
If ANYONE IS INTERESTED WE WERE ABLE TO import THE NEW NETWORK BUT RETAIN previous formatting BU USING THE SAVED STYLES - THANK YOU ALEX FOR YOUR HELP.
Reply all
Reply to author
Forward
0 new messages