Assigning multiple colors to node via attribute

3,553 views
Skip to first unread message

Giuseppe G.

unread,
Dec 1, 2010, 11:57:53 AM12/1/10
to cytoscape-discuss
Hi everyone,

is there a way in Cytoscape 2.7 to give two colors (eg half node each)
to a node? This should be based on two attributes, eg I'd need

-red nodes
-blue nodes
-half red half blue nodes

based on the fact that either the 1st or the second , or both attributes
are set for each node.

Thank you kindly,
Giuseppe

--

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Ruth Isserlin

unread,
Dec 1, 2010, 12:05:19 PM12/1/10
to cytoscap...@googlegroups.com
Hi Giuseppe,
The easiest way to do this is increase the size of the node border and
colour the node border one colour (mapped to one attribute) and colour the
node the second colour (mapped to the second attribute). It doesn't colour
half the node in the conventional way by dividing the node in half but we
have found that it works pretty well visually and it is easy and fast to do.
Ruth

> --
> You received this message because you are subscribed to the Google Groups
> "cytoscape-discuss" group.
> To post to this group, send email to cytoscap...@googlegroups.com.
> To unsubscribe from this group, send email to cytoscape-
> discuss+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cytoscape-discuss?hl=en.


Giuseppe Gallone

unread,
Dec 1, 2010, 5:34:03 PM12/1/10
to cytoscap...@googlegroups.com
Hi Ruth thank you for that! I'll try like you suggest.

Cheers
G.

gregor...@uni-greifswald.de

unread,
Dec 15, 2010, 6:41:23 AM12/15/10
to cytoscape-discuss
I have written the MultiColoredNodes plugin for Cytoscape 2.8 which
can be downloaded at https://sourceforge.net/projects/multicolor/.

It allows to visualize several node attributes by color
simultaneously. Each node in your network gets a pie chart with the
number of slices equal to the number of attributes you want to
visualize. That is, each slice in the pie chart corresponds to one
node attribute. One attribute always has its slice at the same
position in the pie charts. The color of the slice corresponds to the
value the node has for this attribute. The mapping between attribute
values and corresponding color can be adapted by the user easily.
Attributes for which a node has no value or the value has been
deselected (shall not be shown as a color), get a grey slice.

Using the plugin:
When you have put the jar file into your plugins folder, please click
on <color nodes> in the Tool Bar and then select <attribute based
coloring>. Then select the attributes you want to visualize and
afterwards, define the color mapping as you wish and click <OK>. Now
each node has a pie chart as described above.

Cheers, Gregor

Giuseppe G.

unread,
Feb 16, 2011, 7:58:07 AM2/16/11
to cytoscap...@googlegroups.com
Hi Gregor,

thank you so much this might be exactly what I was looking for. I'll try
it out immediately.

Best,
Giuseppe

--

Flavia Rovira

unread,
Feb 16, 2011, 8:12:11 AM2/16/11
to cytoscap...@googlegroups.com
hello, can someone tell me if is there a way to add new edges from a table to a network -which already has a layout- by using the menu?
thanks a lot
Flavia



 
> Date: Wed, 16 Feb 2011 12:58:07 +0000
> From: G.Ga...@sms.ed.ac.uk
> To: cytoscap...@googlegroups.com
> Subject: Re: [Cytoscape-discuss] Re: Assigning multiple colors to node via attribute
> --
> You received this message because you are subscribed to the Google Groups "cytoscape-discuss" group.
> To post to this group, send email to cytoscap...@googlegroups.com.
> To unsubscribe from this group, send email to cytoscape-disc...@googlegroups.com.

gregor...@googlemail.com

unread,
Jul 13, 2012, 5:40:41 AM7/13/12
to cytoscap...@googlegroups.com
Hi Konika,

our Multi Colored Nodes plugin is available via the plugin manager now.


Kind regards,

Gregor

Alexander Pico

unread,
Aug 10, 2012, 2:36:37 PM8/10/12
to Cytoscape-Discuss
That is a feature to help with the performance of network manipulations when viewing a lot of nodes and edges. You can toggle this feature on/off via View>Show Graphics Details. You can also adjust the thresholds that trigger this feature via Edit>Preferences>Properties (e.g., render.coarseDetailThreshold, viewThreshold and others).

 - Alex


On 8/9/12 10:56 PM, "arcys" <lance...@gmail.com> wrote:

Hi Gregor,

The Multi Colored Nodes seems useful, however when I zoom the whole network fit the screen, the multicolor disappears. So I would like to ask how to capture the whole netwrok with multicolor nodes except exporting the network view? Thanks a lot!

Regards,

Konika Chawla

unread,
Oct 27, 2012, 7:31:18 PM10/27/12
to cytoscap...@googlegroups.com
Hi Gregor,

I had use the plugin before for coloring based on attributes and it worked fine.

Now, I need to use the new feature in it for coloring nodes based on list of elements in an attribute by using the 'flexible slice number' type coloring.

Ideally, each element of the list of attributes for all nodes get a color assigned, and depending on number of elements in one list for one node, the node is divided into same number of colored slices.

Problem is that even if I have only 2 elements in the list or 1 or 4, the nodes are always sliced in 3 parts, showing only 3 elements of list.

The work is urgent and any help will be great.

Gregor Warsow

unread,
Oct 30, 2012, 7:36:49 AM10/30/12
to cytoscap...@googlegroups.com
Hi Konika,

Could you please send me a sample cys file to my mail acc at uni rostock?

Thank you, Gregor

morteza bahadori

unread,
Jul 11, 2013, 9:29:44 PM7/11/13
to cytoscap...@googlegroups.com
Hi

I would like to install your application in my computer, but I got an error. Would you please help me install the plugin? I appreciate your help in advance.

I have windows XP service pack 3; F-Secure antivirus is also installed. In addition, I have got the latest Java installed on my computer. Furthermore, I have installed Cytoscape version 3.0.1. In this software user interface I follow this instruction to install the file:

Apps -> App manager ->  Install from file -> (now I choose your jar file) 

everythings seems to be OK; however, I get this error:

" The task could not be completed because an error has occurred. org.cytoscape.app.internal.exception.AppParsingException: Jar is missing value for entry Cytoscape-App in its manifest file. "

  • java.lang.Exception: org.cytoscape.app.internal.exception.AppParsingException: Jar is missing value for entry Cytoscape-App in its manifest file.
  • org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.run(JDialogTaskManager.java:307)
  • java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  • java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
  • java.util.concurrent.FutureTask.run(Unknown Source)
  • java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  • java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  • java.lang.Thread.run(Unknown Source)
  • org.cytoscape.app.internal.exception.AppParsingException: Jar is missing value for entry Cytoscape-App in its manifest file.
  • org.cytoscape.app.internal.manager.AppParser.parseApp(AppParser.java:204)
  • org.cytoscape.app.internal.task.InstallAppFromFileTask.run(InstallAppFromFileTask.java:26)
  • org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.run(JDialogTaskManager.java:279)
  • java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  • java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
  • java.util.concurrent.FutureTask.run(Unknown Source)
  • java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  • java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  • java.lang.Thread.run(Unknown Source) 
Reply all
Reply to author
Forward
0 new messages