Question: Color Nodes In Cytoscape Using An Attribute File?
1
gravatar for trelek2
6.1 years ago by
trelek210
trelek210 wrote:

Hi,

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 • 6.1k views
ADD COMMENTlink modified 6.0 years ago by tobias.opialla0 • written 6.1 years ago by trelek210
0
gravatar for tobias.opialla
6.0 years ago by
tobias.opialla0 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 6.0 years ago by tobias.opialla0
Please log in to add an answer.

Help
Access

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