Question: Color Nodes In Cytoscape Using An Attribute File?
gravatar for trelek2
7.4 years ago by
trelek220 wrote:


I'm having trouble working out how to color nodes in cytoscape. I have a fairly large network and I know the color I want to assign to each node. I don't understand how to do it though and can't find any examples online. I've seen in the menu that I could import a vizmap file - would that help me? how is the file supposed to look?

I wish I could just have a 4th column in my network file which would allow specifying the node color like "red", "green" etc.

Can anyone help me do this?

cytoscape • 7.0k views
ADD COMMENTlink modified 7.2 years ago by tobias.opialla10 • written 7.4 years ago by trelek220
gravatar for tobias.opialla
7.2 years ago by
tobias.opialla10 wrote:

Hi trelek2

This is from the manual:

Text Passthrough Mapper (New feature for version 2.8) In Cytoscape 2.8.0 and later versions, the Passthrough Mapper can recognize some text representations of values. This means, if you have an integer attribute named Node Size Values, you can directly map those values as the Node Size by setting Node Size Values as controlling attribute name for Node Size Passthrough mapping. The following value types are supported: • Color: Standard color names supported by all browsersor RGB representation in hex

so, you just need to specify your color in the respective column of your input table, and map this column to the node fill color attribute with mapping type "Passthrough Mapping"

ADD COMMENTlink written 7.2 years ago by tobias.opialla10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1386 users visited in the last hour