Cytoscape plugin using breadth-first search algorithm

276 views
Skip to first unread message

Tiny

unread,
Jul 2, 2014, 10:42:41 AM7/2/14
to cytoscap...@googlegroups.com

Hi,

Can anyone suggest me a plugin for cytoscape which uses breadth-first search algorithm. There is one called Binom 2.0, but its not compatible with Cytoscape 3.0. 

Regards

piet molenaar

unread,
Jul 2, 2014, 11:13:48 AM7/2/14
to Cytoscape-Discuss
Hi,
I'm not sure what algorithm is used but pathexplorer (http://apps.cytoscape.org/apps/pathexplorer) has a method (http://svn.cgl.ucsf.edu/svn/genmappcs/gsoc/ritisha/PathExplorer2/src/org/nrnb/pathexplorer/logic/FindAllPaths.java) called BFS that looks like a BreadthFirstSearch algorithm 
Hope this helps,
Piet


--
You received this message because you are subscribed to the Google Groups "cytoscape-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-disc...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-discuss.
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

Tiny

unread,
Jul 3, 2014, 7:28:09 AM7/3/14
to cytoscap...@googlegroups.com
  Hi Piet,
  I am not sure pathexplorer is working the way I want. I want to identified all directed acyclic paths from 0-indegree nodes to 0-outdegree nodes. To accomplish this task, a network will be treated as a directed graph. Then, we want to used BFS algorithm to traverse all vertexes in the graph. Then based on the results of graph traversal, backtracking method will be used to extract all paths from 0-indegree nodes to 0-outdegree nodes. How do I do these steps? I just have a network in cytoscape. Hope you can help. 
Thanks

Regards

piet molenaar

unread,
Jul 3, 2014, 8:06:19 AM7/3/14
to Cytoscape-Discuss
Hi,
I think this complicated search cannot be accomplished out of the box, you'd have to write an app for this. 
You might come a long way however, by using filters;
First analyze the network using Tools>NetworkAnalyzer
This will create additional attributes for your nodes; amongst them inDegree and outDegree
Create filter for inDegree = 0 AND outDegree  > 0
Create an attribute for this after the nodes have been selected; eg inzero of type boolean; and give the selected nodes a  TRUE value
Create filter for inDegree > 0 AND outDegree  = 0
Create an attribute for this after the nodes have been selected; eg outzero of type boolean; and give the selected nodes a  TRUE value
Filter for combination; inzero=true OR outzero=true 
After that use the find paths from pathexplorer for each selected node to any of the target nodes
Hope this helps,
Piet

Tiny

unread,
Jul 3, 2014, 10:23:56 AM7/3/14
to cytoscap...@googlegroups.com
   Thank You so much for the elaborate reply. I am trying what you have suggested, but as I am new to cytoscape I am not able to follow what you have said. The create filter step where you have mentioned to "Create filter for inDegree = 0 AND outDegree  > 0".. where do i do this?? I am attaching a snapshot. Its coming to enter a range for inDegree (0-32) and outDegree (0-224). Then where do i create an attribute? I have created attribute in vizMapper. But is it same? Sorry for bothering you so much with small stupid doubts. Thank You.

Regards
in degree.jpg

piet molenaar

unread,
Jul 3, 2014, 10:29:57 AM7/3/14
to Cytoscape-Discuss
Hi,
Double clicking the bar will allow you to set the values of choice.
But since you want to do some extensive selections I'd advice you to read through the filters section in the manual:
Hope this helps,
Piet

Tiny

unread,
Jul 3, 2014, 10:57:23 AM7/3/14
to cytoscap...@googlegroups.com
   Yes double clicking is giving two values to enter for each inDegree and outDegree (lower is 0 and higher is 32 for inDegree and 224 for outDegree). I was confused what will be the two values. I will read the manual as suggested. Thank You. 

piet molenaar

unread,
Jul 3, 2014, 11:01:02 AM7/3/14
to Cytoscape-Discuss
The attribute fields show the whole range of available values in your network. So in case you want to select the nodes with an inDegree of zero and outDegree anything but zero you'd set both values for inDegree to 0 and for the outDegree to 1 and 224.

Tiny

unread,
Jul 3, 2014, 11:09:03 AM7/3/14
to cytoscap...@googlegroups.com
Oh okay. Got it. Thank you so much for all the help and the answers. 

Deep Regards
Devyani

Tiny

unread,
Jul 4, 2014, 10:02:08 AM7/4/14
to cytoscap...@googlegroups.com
   Hi Piet,
   Can you tell me how do I create an attribute and what does this line mean- " inzero of type boolean; and give the selected nodes a  TRUE value"? Thanks in advance.
   
  Regards
  Devyani

Tiny

unread,
Jul 4, 2014, 10:23:15 AM7/4/14
to cytoscap...@googlegroups.com
     Actually I am not sure what i am doing is correct or not. I applied the first filter as you said to my network and then for the selected nodes I changed the indegree attribute in the "table panel" to 1 (TRUE value), as they were all zero. Then I saved this network in File->New->Network->Ctrl+N. (Problem is no edges were there).
Similarly I applied the second filter to my network and for the selected nodes I changed the outdegree attribute in the "table panel" to 1 (TRUE value), as they were all zero. Then I saved this network in File->New->Network->Ctrl+N. (Same problem of no edges being selected).

I am doing something stupidly wrong, but I can't understand how to create attribute. Is it creating "new single column" of Boolean type?

piet molenaar

unread,
Jul 4, 2014, 10:34:23 AM7/4/14
to Cytoscape-Discuss
Hi,
I think you actually want to select both types of nodes in one network and use the pathexplorer on this selection. In order to do so you'd create new attributes for nodes you selected. 
Creating a new data attribute is indeed achieved by creating a new single column of type boolean.
By the way, the new filter tool does have additional features to combine filters, so you'd might achieve this directly without creating attributes.
Hope this helps,
Piet

Tiny

unread,
Jul 4, 2014, 10:58:30 AM7/4/14
to cytoscap...@googlegroups.com
  Hi Piet,
  I could make out things just after posting the question! I applied both filters and atttributes. And applied filter in combination, which gave me selected nodes. Now I have to save this network this network in File->New->Network->Ctrl+N and then use pathexplorer right? 

Tiny

unread,
Jul 8, 2014, 5:43:16 AM7/8/14
to cytoscap...@googlegroups.com
   Hi Piet,
The filters you had suggested me to use yielded a network with nodes which either had only indegree or only outdegree values. I wanted a network in which the nodes would have the following three possibilities - only indegree, only outdegree and both indegree and out degree values. The way it is in the pic attached. For this I used the filters in this way- 
                 Created filter for inDegree = 0 AND outDegree  > 0; Then the nodes selected were saved as a new network.
                 Created filter for inDegree > 0 AND outDegree  > 0; Then the nodes selected were saved as a new network.
                 Created filter for inDegree > 0 AND outDegree  = 0; Then the nodes selected were saved as a new network.

Then I merged these three networks It gave me a network the way I wanted. But I want to know is if the approach I adopted is correct or not? Thanks

Regards
Paths.jpg

piet molenaar

unread,
Jul 8, 2014, 5:56:57 AM7/8/14
to Cytoscape-Discuss
Well, when you have the network you wanted I assume the approach is correct ;-)
But seriously, the three networks should be mutually exclusive, so I assume you took the first neighbours when creating the the first and third networks? In this way you'd maintain connectivity with the middle network and you'd end up with the network you wanted...

Tiny

unread,
Jul 8, 2014, 7:25:13 AM7/8/14
to cytoscap...@googlegroups.com
   Hi Piet,
  Yes they were mutually exclusive...I had ignored the fact. :( And if I take the first  neighbours when creating the first and third network,and then when merging them, I am getting the main network again! So the three filter thing is not working!! So I am generating the first and third network only taking the filters mentioned, then connecting with their first neighbours and then merging them. Hope this is correct! As I am getting a network the way I want. 
Reply all
Reply to author
Forward
0 new messages