visualizing two subnetworks connected by the shortest path

93 views
Skip to first unread message

Venus So

unread,
Jan 26, 2015, 12:03:29 PM1/26/15
to cytoscape...@googlegroups.com
Hi, I wonder how I can achieve the following:

I have an interactome (~3000 nodes/genes).  I would like to overlay two lists of genes (each has ~ 50 genes) onto the interactome, and create two subnetworks, connected within and across the two lists of genes by the shortest path.  The two subnetworks preferably have two different colors.  And then I would like to show only the two subnetworks (without showing the big hairy ball) to visualize the relationship between the two lists of genes.  How can I achieve this in Cytoscape?

Thanks.
Venus

piet molenaar

unread,
Jan 27, 2015, 3:38:56 AM1/27/15
to cytoscape-helpdesk
Hi,
If you make a tab separated list (e.g. in excel) containing one column of gene identifiers mapping to the ids in the large network and another identifying membership to a subnetwork:

geneid networkid
geneA 1
geneB 1
geneC 2
geneF 2

You can annotate the network with these data: as described here

Next you can select genes from both networks using filters: 

Next new>create new network from selected nodes and edges

Coloring can be done using the attribute networkid and map it to a color; as similar procedure for edges is described here

Hope this helps,
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 http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.



--
Piet Molenaar
piet.amc@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

Venus So

unread,
Jan 27, 2015, 2:40:24 PM1/27/15
to cytoscape...@googlegroups.com
Thanks Piet for the response.

The problem I have with "new>create new network from selected nodes and edges" is that it does not contain the nodes in the big interactome that connect the nodes within or between the two subnetworks.  So there will be a lot of disconnections, because only the "selected" nodes from the subnetworks are used to create the new one.  How can I include the ones that are not in subnetwork, but in the big interactome (those on the shortest path)?

Thanks.

Venus

On Tuesday, January 27, 2015 at 3:38:56 AM UTC-5, Piet wrote:
Hi,
If you make a tab separated list (e.g. in excel) containing one column of gene identifiers mapping to the ids in the large network and another identifying membership to a subnetwork:

geneid networkid
geneA 1
geneB 1
geneC 2
geneF 2

You can annotate the network with these data: as described here

Next you can select genes from both networks using filters: 

Next new>create new network from selected nodes and edges

Coloring can be done using the attribute networkid and map it to a color; as similar procedure for edges is described here

Hope this helps,
Piet
On Mon, Jan 26, 2015 at 6:03 PM, Venus So <w.venus.so@gmail.com> wrote:
Hi, I wonder how I can achieve the following:

I have an interactome (~3000 nodes/genes).  I would like to overlay two lists of genes (each has ~ 50 genes) onto the interactome, and create two subnetworks, connected within and across the two lists of genes by the shortest path.  The two subnetworks preferably have two different colors.  And then I would like to show only the two subnetworks (without showing the big hairy ball) to visualize the relationship between the two lists of genes.  How can I achieve this in Cytoscape?

Thanks.
Venus

--
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 http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.

piet molenaar

unread,
Jan 28, 2015, 6:43:10 AM1/28/15
to cytoscape-helpdesk
Imho there is no simple solution for that (there is no button "create all shortest paths between (between all nodes of?) two selections of nodes"); you'd have to device a new algorithm for that (not trivial, I think) and implement it in an app.
Best regards,
Piet


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 http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.



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

Giovanni Scardoni

unread,
Jan 28, 2015, 2:37:58 PM1/28/15
to cytoscape...@googlegroups.com
Hi,
you can use the Pesca app. It finds all the shortest paths between two or more of nodes.
It will be released in few weeks. You can find a beta version (working) here:



Select the nodes you want to connect and use the SP-cluster option.

Please let me know any suggestion!
Giovanni

Giovanni Scardoni
The Center for BioMedical Computing (CBMC)
www.cbmc.it/~scardonig/
University of Verona
Strada le Grazie, 15 -37134
Verona -Italy

Try these Cytoscape apps!
CentiScaPe: http://www.cbmc.it/~scardonig/centiscape/centiscape.php
Interference: http://www.cbmc.it/~scardonig/interference/Interference.php

piet molenaar

unread,
Jan 28, 2015, 3:08:20 PM1/28/15
to cytoscape-helpdesk

Nice! Apps to the rescue, thanks Giovanni!

Op 28 jan. 2015 20:37 schreef "Giovanni Scardoni" <giovanni...@gmail.com>:

Venus So

unread,
Jan 28, 2015, 4:35:47 PM1/28/15
to cytoscape...@googlegroups.com
Thanks Piet and Giovanni!  I will test out the beta working version as soon as I get a chance.

Venus

Venus So

unread,
Feb 7, 2015, 3:18:37 PM2/7/15
to cytoscape...@googlegroups.com
Thanks again Giovanni.  I have tested the PeSca app (http://www.cbmc.it/~scardonig/pesca/) to find all the shortest possible paths between selected nodes in a network.  It's a very useful app, and I'd like to provide some feedbacks and perhaps raise some enhancement suggestions.  Sorry for the delay of this response, I just come back from a trip in Europe...

I've only used the S-P Cluster option so far.  It is fast (takes seconds) to finish the run if the number of possible shortest path is in the hundreds range.  But to find all the shortest paths for ~ 100 selected nodes in a network of ~3500 nodes, it took ~ 5 - 6 hours (and found ~ 150K shortest paths).  And if I try to reduce the network to ~ 450 nodes (by including only the 1st and 2nd neighbors of the selected nodes), then finding all the shortest paths for  the ~ 100 selected nodes took about 7-8 min, and ~ 36K shortest path (directed) were found.  This time for computing all the shortest paths is understandable (especially, I'm running it on my PC laptop).  However, clicking the "All paths" to highlight all the identified paths on the network took almost the same time (~ 6-7 min).  I wonder why this is the case.  

Some enhancement requests:
* It will be nice to be able to save results so that the results can be retrieved in new Cytoscape sessions in addition to within the current session.  This is useful especially for long runs.
* Some brief help text will be nice.  But I'm sure this is on the plan and it's only because I'm using a beta version right now. Thanks again.
* The names "View selected paths" and "Select" function buttons are a bit confusing to me.  To me, "View selected paths" will be for: I select the path(s) in the result table, and it will highlight them on the graphical network for me to view.  Currently, I think the "Select" is for this function, and "View selected paths" is for: I select paths on the graphical network, and it will highlight them in the result table.  It maybe more intuitive is the names can be changed to: "View selected paths" > "highlight in table", "Select" > "highlight on network".  But it's probably just me, you should ask more people :-).

* The "Select" function may have a bug, and if this is not a bug, then this is my enhancement request.  The observation is: when I select multiple paths (e.g. I used "order by size" and selected only the paths that the size is smaller than 4), and click "Select" to highlight/select these paths on network, it only highlights the first selected path, not all of them.  I think it should highlight/select all of them on the network.

Thanks again and look forward to your next version.

Venus

Giovanni Scardoni

unread,
Feb 12, 2015, 4:13:16 PM2/12/15
to cytoscape...@googlegroups.com
Dear Venus,
thank you very much for your feedback!
I am working on PeSca and I will satisfy all your requests.
Below you find my answers

2015-02-07 21:18 GMT+01:00 Venus So <w.ven...@gmail.com>:
Thanks again Giovanni.  I have tested the PeSca app (http://www.cbmc.it/~scardonig/pesca/) to find all the shortest possible paths between selected nodes in a network.  It's a very useful app, and I'd like to provide some feedbacks and perhaps raise some enhancement suggestions.  Sorry for the delay of this response, I just come back from a trip in Europe...

I've only used the S-P Cluster option so far.  It is fast (takes seconds) to finish the run if the number of possible shortest path is in the hundreds range.  But to find all the shortest paths for ~ 100 selected nodes in a network of ~3500 nodes, it took ~ 5 - 6 hours (and found ~ 150K shortest paths).  And if I try to reduce the network to ~ 450 nodes (by including only the 1st and 2nd neighbors of the selected nodes), then finding all the shortest paths for  the ~ 100 selected nodes took about 7-8 min, and ~ 36K shortest path (directed) were found.  This time for computing all the shortest paths is understandable (especially, I'm running it on my PC laptop).  However, clicking the "All paths" to highlight all the identified paths on the network took almost the same time (~ 6-7 min).  I wonder why this is the case.  


When computing all the paths you can use some results of the computation to reduce the computation time. As example, if you are looking for a path between A and C and you find  a path as A -> B -> C you don't have to compute  again the path A-> B and B -> C but you keep them in memory. When the algorithm will look for the paths between A and B it has only to read the memory. This is because you know that you will need all the paths. 

In the S-P cluster option you don't keep in memory the subpaths since in the most cases you don't need them. This is true particularly if you select about tens of nodes. For hundreds of nodes it's more useful to use the all paths algorithm. Please note that S-Pcluster  computation time increases also with  the number of selected nodes and not only with the size of the network. So it should be faster if you select 50 nodes for two times than 100 nodes for one time. Anyway, I am working to increase the speed of the algorithm in the new version. Just a question, when you find 36k shortest path, how can you use them? Is this a kind of output that can be useful? Or do you need more methods to analyze them? Obviously I am thinking also about our CentiScaPe app for network topological analysis.


Some enhancement requests:
* It will be nice to be able to save results so that the results can be retrieved in new Cytoscape sessions in addition to within the current session.  This is useful especially for long runs.
* Some brief help text will be nice.  But I'm sure this is on the plan and it's only because I'm using a beta version right now. Thanks again.
* The names "View selected paths" and "Select" function buttons are a bit confusing to me.  To me, "View selected paths" will be for: I select the path(s) in the result table, and it will highlight them on the graphical network for me to view.  Currently, I think the "Select" is for this function, and "View selected paths" is for: I select paths on the graphical network, and it will highlight them in the result table.  It maybe more intuitive is the names can be changed to: "View selected paths" > "highlight in table", "Select" > "highlight on network".  But it's probably just me, you should ask more people :-).

* The "Select" function may have a bug, and if this is not a bug, then this is my enhancement request.  The observation is: when I select multiple paths (e.g. I used "order by size" and selected only the paths that the size is smaller than 4), and click "Select" to highlight/select these paths on network, it only highlights the first selected path, not all of them.  I think it should highlight/select all of them on the network.


All this things will be fixed in the released version!
Thank you very much for your feedback, it is very useful for us.
Please don't hesitate to contact me again if you need any help.
Giovanni 

Thanks again and look forward to your next version.

Venus



On Wednesday, January 28, 2015 at 4:35:47 PM UTC-5, Venus So wrote:
Thanks Piet and Giovanni!  I will test out the beta working version as soon as I get a chance.

Venus

On Monday, January 26, 2015 at 12:03:29 PM UTC-5, Venus So wrote:
Hi, I wonder how I can achieve the following:

I have an interactome (~3000 nodes/genes).  I would like to overlay two lists of genes (each has ~ 50 genes) onto the interactome, and create two subnetworks, connected within and across the two lists of genes by the shortest path.  The two subnetworks preferably have two different colors.  And then I would like to show only the two subnetworks (without showing the big hairy ball) to visualize the relationship between the two lists of genes.  How can I achieve this in Cytoscape?

Thanks.
Venus

--
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 http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.

Giovanni Scardoni

unread,
Apr 28, 2015, 3:17:57 PM4/28/15
to cytoscape...@googlegroups.com
Dear Venus,
sorry for the delay, we are still working to the release of Pesca. We improved some features, but not yet the speed of the algorithm.
It was difficult to deal with this project because of the demands of all our other work. 

Attached you find a new version of Pesca with some of your request.

We are also part of the NRNB Academy Summer Session to complete the Pesca project.

http://nrnb.org/gsoc.html
 
NRNB will fund some student to help the development of Cytoscape Apps. Our projects 
are Idea 4, 37,38. 

NRNB is looking for potential sponsor, do you think your company could be interested in becoming a sponsor of the project?
(one student full payment is 5500$) 
If yes please contact me.

Anyway I will complete your requests about Pesca as soon as possible.
As usual I really appreciate any suggestion.
Giovanni

pesca-3.0.7.jar

Venus So

unread,
Apr 30, 2015, 11:06:18 AM4/30/15
to cytoscape...@googlegroups.com
Thanks for keeping on the work Giovanni.  I'm also currently on other tasks, but plan to get back and try again soon.

Thanks!

Venus

You received this message because you are subscribed to a topic in the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cytoscape-helpdesk/PsrmfSwIYfU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cytoscape-helpd...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages