how to add multiple colors into the same node

2,326 views
Skip to first unread message

yjli...@tamu.edu

unread,
Aug 8, 2017, 2:48:54 PM8/8/17
to cytoscape-helpdesk
Dear all,

I'm using Cytoscape 3.4.0 to generate a network of gene regulation. I wonder if I can add two colors into the same node (each node represents one regulon. One color in that node represents the percentage of upregulated genes in the regulon and the other represents the percentage of downregulated genes) in Cytoscape 3.4.0. The final result will be similar to the following nodes, only with two colors instead of multiple colors.  Could you please let me know if there is any useful link or plugin I should download? Many thanks in advance!

Yongjin


Scooter Morris

unread,
Aug 8, 2017, 2:55:01 PM8/8/17
to cytoscape-helpdesk
Hi Yongjin,
  For some reason your image didn't come through, but I think I know what you want.  There are two approaches -- first, you can use the charts capability in Cytoscape (see http://opentutorials.cgl.ucsf.edu/index.php/Tutorial:Basic_Expression_Analysis_in_Cytoscape_3#Fun_with_Charts) or you can use the enhancedGraphics app.  Either way, you should be able to get the image you want.

-- scooter

yjli...@tamu.edu

unread,
Aug 8, 2017, 5:43:10 PM8/8/17
to cytoscape-helpdesk
Hi Dr. Morris,

Thanks for the information!  This is the image I want to show. 

I followed the instructions of "Fun with Charts", but I couldn't bring up the Graphics dialog. Actually, when I did a right-click over the "Fill Color" and selected "Edit", the option "remove mappings from selected visual properties" is grey. 
For another option "enhancedGraphics", I checked the App manager and it is installed and the version is 1.2.0 in my computer. However, I couldn't find it in the "Apps" menu.

The following are those steps I performed, Could you please help me check if there is any wrong step when you have a chance?
Step 1: Import a network file.
Step 2: Import a node file. 
Step 3: Change node shape to "eclipse" and check the box " lock node with width and height". 
Stpe 4: Change node size by selecting one column from the node file. Choose mapping type as continous. 
Step 5: Right click on "Fill Color". The following steps are not working.

Thank you for your time!

Yongjin






Scooter Morris

unread,
Aug 8, 2017, 6:20:33 PM8/8/17
to cytoscape...@googlegroups.com
Nope, the charts aren't part of Fill Color -- they are a separate Property.  In the Style tab, click Properties, then select Paint->Custom Paint 1->Image/Chart 1.  If you now click in the Def. column, you can create a pie chart that should give you what you want.

As far as enhancedGraphics -- there is a tutorial on how to use it at: http://www.cgl.ucsf.edu/cytoscape/utilities3/enhancedcg.shtml  The idea behind enhancedGraphics is that you define a column that describes the chart you want to use, then you set up a passthrough mapping for that column.

-- scooter

Thank you for your time!

Yongjin






--
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 https://groups.google.com/group/cytoscape-helpdesk.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-helpdesk/5f5ab48c-544d-4f1e-be16-c42b2beb4193%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


yjli...@tamu.edu

unread,
Aug 8, 2017, 7:28:36 PM8/8/17
to cytoscape-helpdesk
Hi Dr. Morris,

Sorry to bug you again. I got the pie chart for each node. However, there is one outlayer around the pie chart (cyan). How can I remove this outlayer and directly connect the edge to the pie chart?  I can only change the color from "Fill Color", but I cannot remove it. 

Thanks a lot!

Yongjin

Scooter Morris

unread,
Aug 8, 2017, 8:54:45 PM8/8/17
to cytoscape...@googlegroups.com
Two options, I think.  First would be to change the color of the node the background color.  The second is to explicitly set the size of the custom graphic (using Size->Image/Size 1).  Note that you'll need to uncheck the "Fit Custom Graphics to node" option.

-- scooter
--
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 https://groups.google.com/group/cytoscape-helpdesk.

yjli...@tamu.edu

unread,
Aug 8, 2017, 10:52:28 PM8/8/17
to cytoscape-helpdesk
Hi Dr. Morris,


The first option does not work for me, because I need different colors for each node. For second option, since I assigned the value to the node size (one column of the node file) in the previous step, the Image/Size 1 is still grey after I uncheck the "Fit custom graphics to node" . Is it possible that I can set the background color of each node to 100% transparency? I changed some values in the "Fill Color" and it seems not working. 

Thanks,

Yongjin


Reply all
Reply to author
Forward
0 new messages