Directed network and its adjacency matrix

69 views
Skip to first unread message

Mariano Pablo Oranges

unread,
Jun 25, 2016, 11:57:54 PM6/25/16
to cytoscape-helpdesk
Hi,

I've created a directed network in Cytoscape from scratch, or at least I think I did. When I export its adjacency matrix thru the Export... menu, I get one that does not reflect the direction of the arrows.

Can you please help me with this? Basically I need to understand if the adj exporter plugin is the one that doesn't support this or if I'm doing something wrong when creating the network.

Thank you so much,

Mariano P. Oranges.

piet molenaar

unread,
Jun 27, 2016, 4:20:12 AM6/27/16
to cytoscape-helpdesk
Hi Mariano,
An adjacency matrix in principle only reflects which nodes are adjacent. You could define directionality by stating that a value of -1 for matrix element rowid, colid means an edge directed from node(colid) -> node(rowid), this is apparently not supported by the adjacency app (from the app page:  "Currently the app considers input networks as undirected and unweighted (i.e) adjacency matrix exported is a symmetric matrix with 1's, 0's")
However, storing your network as a default xgmml will maintain directionality; do you need an adjacency matrix perse?
If so you might contact the app author for directionality support; and I've just checked this while typing and see that you already did post the issue at their github page ;-)
Cheers,
Piet

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.



--
Piet Molenaar
piet...@gmail.com
Department of Oncogenomics, M1-131
Academic Medical Center
University of Amsterdam
Meibergdreef 9
1105 AZ Amsterdam
the Netherlands

tel (+31) 20-5666592
fax (+31) 20-6918626

Matthias König

unread,
Jun 27, 2016, 11:28:19 AM6/27/16
to cytoscape-helpdesk
The adjacency matrix A is a square matrix with 0 or 1 as entries.
An entry of 1 is encoding a directed edge, i.e. if there is an edge between node n_k and n_i there is an entry A_ki = 1.

In the special case of undirected graphs the adjacency matrix is symmetric, i.e. for all edges A_ki =1 there is also the reverse edge A_ik=1 and the edges in both directions between nodes ni and nj are interpreted as undirected edges.
There is no -1 in an adjecency matrix.

https://en.wikipedia.org/wiki/Adjacency_matrix


On Monday, June 27, 2016 at 10:20:12 AM UTC+2, Piet wrote:
Hi Mariano,
An adjacency matrix in principle only reflects which nodes are adjacent. You could define directionality by stating that a value of -1 for matrix element rowid, colid means an edge directed from node(colid) -> node(rowid), this is apparently not supported by the adjacency app (from the app page:  "Currently the app considers input networks as undirected and unweighted (i.e) adjacency matrix exported is a symmetric matrix with 1's, 0's")
However, storing your network as a default xgmml will maintain directionality; do you need an adjacency matrix perse?
If so you might contact the app author for directionality support; and I've just checked this while typing and see that you already did post the issue at their github page ;-)
Cheers,
Piet
On Sun, Jun 26, 2016 at 5:57 AM, Mariano Pablo Oranges <mariano.pa...@gmail.com> wrote:
Hi,

I've created a directed network in Cytoscape from scratch, or at least I think I did. When I export its adjacency matrix thru the Export... menu, I get one that does not reflect the direction of the arrows.

Can you please help me with this? Basically I need to understand if the adj exporter plugin is the one that doesn't support this or if I'm doing something wrong when creating the network.

Thank you so much,

Mariano P. Oranges.

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsub...@googlegroups.com.

To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.

piet molenaar

unread,
Jun 27, 2016, 11:32:43 AM6/27/16
to cytoscape-helpdesk
Thanks for giving the correct explanation!
And sorry for mixing this up, I was thinking in edge attributes or something, but obviously not entirely awake yet ;-) 

On Mon, Jun 27, 2016 at 5:28 PM, 'Matthias König' via cytoscape-helpdesk <cytoscape...@googlegroups.com> wrote:
The adjacency matrix A is a square matrix with 0 or 1 as entries.
An entry of 1 is encoding a directed edge, i.e. if there is an edge between node n_k and n_i there is an entry A_ki = 1.

In the special case of undirected graphs the adjacency matrix is symmetric, i.e. for all edges A_ki =1 there is also the reverse edge A_ik=1 and the edges in both directions between nodes ni and nj are interpreted as undirected edges.
There is no -1 in an adjecency matrix.

https://en.wikipedia.org/wiki/Adjacency_matrix

On Monday, June 27, 2016 at 10:20:12 AM UTC+2, Piet wrote:
Hi Mariano,
An adjacency matrix in principle only reflects which nodes are adjacent. You could define directionality by stating that a value of -1 for matrix element rowid, colid means an edge directed from node(colid) -> node(rowid), this is apparently not supported by the adjacency app (from the app page:  "Currently the app considers input networks as undirected and unweighted (i.e) adjacency matrix exported is a symmetric matrix with 1's, 0's")
However, storing your network as a default xgmml will maintain directionality; do you need an adjacency matrix perse?
If so you might contact the app author for directionality support; and I've just checked this while typing and see that you already did post the issue at their github page ;-)
Cheers,
Piet
On Sun, Jun 26, 2016 at 5:57 AM, Mariano Pablo Oranges <mariano.pa...@gmail.com> wrote:
Hi,

I've created a directed network in Cytoscape from scratch, or at least I think I did. When I export its adjacency matrix thru the Export... menu, I get one that does not reflect the direction of the arrows.

Can you please help me with this? Basically I need to understand if the adj exporter plugin is the one that doesn't support this or if I'm doing something wrong when creating the network.

Thank you so much,

Mariano P. Oranges.

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.



--
Piet Molenaar
piet...@gmail.com

Department of Oncogenomics, M1-131
Academic Medical Center
University of Amsterdam
Meibergdreef 9
1105 AZ Amsterdam
the Netherlands

tel (+31) 20-5666592
fax (+31) 20-6918626

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.

To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.

srikanth bezawada

unread,
Jun 27, 2016, 2:02:54 PM6/27/16
to cytoscape...@googlegroups.com
Hi all,

- Mariano P. Oranges, Thanks for the feature request. I have updated the app. Feel free to feedback.

- Piet and Matthias, I've found some conventions(incidence matrix and other) where they use -1 just like Piet gave an example above. So if there is a directed edge from A to B, I'm placing 1 on the A's row and -1 on the receiving B's row.

In this way, it would be easy to reconstruct(retrace) the network from the matrix. Moreover, users can have access to the other convention by simply doing a text search on "-1" and replacing with "0" according to their use case. So, Mariano P. Oranges what's your use case ?


Thanks,
Srikanth.

Reply all
Reply to author
Forward
0 new messages