Setting Attributes to nodes and edges dimensions and visualizing them

12 views
Skip to first unread message

Franktwis

unread,
Nov 3, 2009, 11:20:37 AM11/3/09
to cytoscape-discuss
Hi,
I want to build a Graph and setting size of nodes and edge varying
after some operations.
If I create a bunch of CyNodes using the Cytoscape.getCyNode() method,
then create edges using those nodes with the
Cytoscape.getCyEdge() method. Then, call Cytoscape.createNetwork()
with the
lists of nodes and edges I just created. Once I've got the CyNodes
and
CyEdges how can I use its attributes to set their dimension and how
can I display all the net?

In particular I want to increase the dimension of a Node everytime I
add an edge to it. And everytime that there is a new relation between
node A and node B I wanna to increase size of the edge between them.
How can I do it?
thanks to all!

Keiichiro Ono

unread,
Nov 3, 2009, 2:12:23 PM11/3/09
to cytoscap...@googlegroups.com
Hi.
You can do it by adding numerical attribute "degree" or something, and
when you add an edge to a node, just increase the number. Beside the
attribute, you need to create a Visual Style to reflect the change to
node size. This can be done by creating a continuous mapping
programatically. Every time you increase the degree attribute, you
can apply this Visual Style, then the node size will be changed
automatically.

Kei

2009/11/3 Franktwis <francesco...@gmail.com>:
--
Keiichiro Ono ko...@ucsd.edu

Cytoscape Core Developer Team: http://www.cytoscape.org/
UCSD School of Medicine Trey Ideker Lab: http://chianti.ucsd.edu/idekerlab/

Angelo Ulivieri

unread,
Nov 4, 2009, 7:07:14 AM11/4/09
to cytoscap...@googlegroups.com
Sorry,
I'm trying to study these classes but I can't understand how to use them. Do you have a simple example of how to do it?
And what does means "continuous mapping programatically", how can I do it?
thanks again


From: Keiichiro Ono <kei...@gmail.com>
To: cytoscap...@googlegroups.com
Sent: Tue, November 3, 2009 8:12:23 PM
Subject: [Cytoscape-discuss] Re: Setting Attributes to nodes and edges dimensions and visualizing them
Reply all
Reply to author
Forward
0 new messages