Automatic grouping of nodes (allowing for collapsing/expanding)

520 views
Skip to first unread message

Devin Schweppe

unread,
Oct 23, 2014, 4:20:00 PM10/23/14
to cytoscape...@googlegroups.com
Hello,
Does anyone know if there is a means by which to automatically group nodes such that they can be expanded and collapsed without needing to right-click on each group set and selecting to group them?

Note: The group attribute layout is not what I'm looking for.

Best and thanks,
Devin

Ruth

unread,
Oct 23, 2014, 10:30:22 PM10/23/14
to cytoscape...@googlegroups.com
Hi Devin,
Are the groups based on something in the network, like an attribute? How do you want group the nodes?

A few options. You can create groups using the command tool interface. If you know what the node names for each member of a group you can easily generate a script to create the groups and run the entire file. 
Alternatively if the groups are based on a clustering I think the clustermaker app might allow you to create groups automatically based on the results of the chosen algorithm. (Using the command tool you can collapse/expand all the created groups using "group collapse groupList="all"")
Ruth
--
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.

dksc...@uw.edu

unread,
Oct 30, 2014, 7:12:38 PM10/30/14
to cytoscape...@googlegroups.com
Hi Ruth,
Thanks for the reply!
The groups can be based on an attribute (protein name/Uniprot Accessions). I will try my hand at the script to pull the node names into individual groups.

The "group collapse groupList="all"" will save a lot of time too. 

Thanks Again,
Devin


On Thursday, October 23, 2014 7:30:22 PM UTC-7, risserlin wrote:
Hi Devin,
Are the groups based on something in the network, like an attribute? How do you want group the nodes?

A few options. You can create groups using the command tool interface. If you know what the node names for each member of a group you can easily generate a script to create the groups and run the entire file. 
Alternatively if the groups are based on a clustering I think the clustermaker app might allow you to create groups automatically based on the results of the chosen algorithm. (Using the command tool you can collapse/expand all the created groups using "group collapse groupList="all"")
Ruth

On Oct 23, 2014, at 4:20 PM, Devin Schweppe <devin.k....@gmail.com> wrote:

Hello,
Does anyone know if there is a means by which to automatically group nodes such that they can be expanded and collapsed without needing to right-click on each group set and selecting to group them?

Note: The group attribute layout is not what I'm looking for.

Best and thanks,
Devin

--
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.

yan ge

unread,
Dec 8, 2014, 12:36:23 PM12/8/14
to cytoscape...@googlegroups.com
Hello,

Does anyone know how to generate the script as Dear Ruth told? I am new to cytoscape. Now I know which my nodes belong to which group, but it's impossible for me to do it in the GUI interface manually (too many nodes). Can anybody tell me exactly how to write the script and run it in command tool interface?

Thank you very much!
Yan


On Friday, October 24, 2014 4:30:22 AM UTC+2, risserlin wrote:
Hi Devin,
Are the groups based on something in the network, like an attribute? How do you want group the nodes?

A few options. You can create groups using the command tool interface. If you know what the node names for each member of a group you can easily generate a script to create the groups and run the entire file. 
Alternatively if the groups are based on a clustering I think the clustermaker app might allow you to create groups automatically based on the results of the chosen algorithm. (Using the command tool you can collapse/expand all the created groups using "group collapse groupList="all"")
Ruth

On Oct 23, 2014, at 4:20 PM, Devin Schweppe <devin.k....@gmail.com> wrote:

Hello,
Does anyone know if there is a means by which to automatically group nodes such that they can be expanded and collapsed without needing to right-click on each group set and selecting to group them?

Note: The group attribute layout is not what I'm looking for.

Best and thanks,
Devin

--
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-helpdesk@googlegroups.com.

Ruth Isserlin

unread,
Dec 8, 2014, 1:27:18 PM12/8/14
to cytoscape...@googlegroups.com
Hi Yan, 
To create groups using the command tool you just need to create statements like:

     group create groupName="bogus3" nodeList="SUID:4929,SUID:4928,SUID:4939" 

or if you want to use the names on the nodes instead you can run something like:

group create groupName="bogus2" nodeList="name:name1,name:name2,name:name3"   


You can copy them into the tools -> command line dialog
or run a file with the set of these from tools -> execute command file

After you created all your groups you can collapse and expand them by using the commands
group collapse groupList="all"
group expand groupList="all"

To get all the options for all the commands you can use with groups go to Tools -> Command line dialog and type help group or help group create to get all the parameters that you can set for group commands. 

Ruth 



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.

yan ge

unread,
Dec 10, 2014, 2:44:53 PM12/10/14
to cytoscape...@googlegroups.com

Hi,

Now I am using the Group command in the command tool. My nodes names are like:

DNMBP(chr10:101690650..101690683,-)    DNMBP(chr10:101690750..101690900,-) 

The problem is, when I use the commands like:

group create groupName="DNMBP" nodelist="name:DNMBP(chr10:101690650..101690683,-),name:DNMBP(chr10:101690750..101690900,-) "

The output is like: Group: groupNode: Node suid: 125243 with 0 nodes, 0 internal edges and 0 external edges. So, it failed.

 

However, if I change the nodes name into, say A(DNMBP(chr10:101690650..101690683,-)) and B(DNMBP(chr10:101690750..101690900,-) ) and use the commands like

group create groupName="DNMBP" nodelist="name:A,name:B "

The output is: Group: groupNode: Node suid: 125256 with 1 nodes, 0 internal edges and 2 external edges. So, this way works.

 

Do anybody know the reason for this problem? Because I need to keep the nodes the original name.

 

Best and thanks,

Yan

To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsubscribe@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.

--
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.

Ruth Isserlin

unread,
Dec 10, 2014, 2:51:02 PM12/10/14
to cytoscape...@googlegroups.com

Hi Yan, 

I was having a similar issue when I was using the names of the nodes (my node names had % and : which was creating issues matching).  I think it is because it uses regular expression to match the node names so if you have any characters that has a specific meaning within a regular expression it doesn’t match.  But I am not positive.  The way I got around this issue was I used the SUID of the nodes to create my groups.  How are you building your command script?  Maybe you can replace the node names for their corresponding SUID (you can export the node table to get the SUIDs for each of the nodes.)  I run these commands from code so I already have the SUID handy.  

Thanks, 

Ruth


To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.

Scooter Morris

unread,
Dec 10, 2014, 4:27:04 PM12/10/14
to cytoscape...@googlegroups.com
Hi Yan,
    It's the colons in the name.  I think that's causing real problems for you since both nodes are the same up to the first colon, and the nodeList code splits on colors.

-- scooter
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages