Biostar Beta. Not for public use.
[Cytoscape] Two Mappings For Node Fill Colour
0
Entering edit mode
21 months ago
enricoferrero • 770
United Kingdom

Hi,

In Cytoscape, is it possible to have a double mapping of a visual property?

For example, say I have a network of transcription factors and their targets. I want the nodes to be coloured by category (discrete mapping: transcription factor=blue, target=red), AND by their connectivity (continuous mapping: shades of red and blues based on the number of edges).

It looks like a fairly basic thing to me but I can't find a way to do it! Thanks,

cytoscape mapping • 3.3k views
ADD COMMENTlink
1
Entering edit mode
12 months ago
Leandro Lima • 920
San Francisco, CA

Hi rent0n.

I think it is not possible directly. But you can do this indirectly, merging the two fields you want.

For example (if your fields are discrete):

node     cancertype     expressed
node1    breast          yes
node2    prostate        no
node3    breast          no
node4    prostate        yes
node5    prostate        no

Merged fields:

node     cancertype_expressed
node1    breast_yes
node2    prostate_no
node3    breast_no
node4    prostate_yes
node5    prostate_no

In your case, I think it is better to change another property (for example, "node size" or "node border color")

ADD COMMENTlink
0
Entering edit mode

Yes, I eventually reached the same conclusion. You propose an interesting workaround, which unfortunately is not applicable in my case. The best I could do was mapping my categorical variable to a discrete node fill colour and then map the degree (number of edges) to node transparency.

ADD REPLYlink
0
Entering edit mode
4.2 years ago
Sudeep ♦ 1.6k
.

For node coloring, an easy thing to do would be upload a node attribute list, which has node ids as first column and and category(TF/target) as second column. something like

id category
1 TF
3 target

Then under the VizMapper tab you can set the color as you said. You can follow the same approach for edge coloring, and more details are here

ADD COMMENTlink
0
Entering edit mode

Yes, I know about setting attributes and mapping attributes to visual properties. I want to know if I can map two attributes to the same property. Is my question unclear?

ADD REPLYlink
0
Entering edit mode

"I want to know if I can map two attributes to the same property."

Do you mean whether you can color a node by more than one property ?

ADD REPLYlink
0
Entering edit mode

Yes, but I think the answer is no.

ADD REPLYlink
1
Entering edit mode

Are you familiar with cytoscape plugin multicolorednodes ? but I am not sure if you can mix variable types (in your case categorical (TF/target) and numerical (degree)) in this plugin

ADD REPLYlink
0
Entering edit mode

Thanks, that could probably work, it's a shame is not for Cytoscape 3.0.

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1