Using node string attributes in layout

44 views
Skip to first unread message

Jon Kornhauser

unread,
Sep 12, 2012, 12:47:07 PM9/12/12
to cytoscap...@googlegroups.com
Hello,
I am trying to use node attributes which are string attributes to influence the layout of a network.  I can think of two approaches for this, but can't figure out how to do either one: 
1) Use a plugin (sorry, "app"!) such as Bubble Router to define regions on the graph, and assign nodes regions based on their attributes.  Bubble Router does not appear to work with 2.8.3, and I haven't come across an alternative app (other than those which use GO terms, rather than any user-defined node attributes).
Or, 2) Set a numerical edge attribute to each edge that connects nodes sharing the same attribute, and use this edge attribute to give a higher weight to those edges when using standard layouts.  Again, the node attributes are string rather than numerical attributes.
Essentially, I would like to somehow "cluster" based on node string attributes.
Any suggestions would be appreciated.
Thanks, Jon

This message contains information which may be confidential and/or protected by attorney-client privilege.  Unless you are the addressee, you may not use, copy or disclose to anyone this message or any information contained in this message.  If you have received this message in error, please send me an email and delete this message.   Thank you.

Scooter Morris

unread,
Sep 12, 2012, 1:37:59 PM9/12/12
to cytoscap...@googlegroups.com, Jon Kornhauser
Hi Jon!

On 09/12/2012 09:47 AM, Jon Kornhauser wrote:
> Hello,
> I am trying to use node attributes which are string attributes to
> influence the layout of a network. I can think of two approaches for
> this, but can't figure out how to do either one:
> 1) Use a plugin (sorry, "app"!) such as Bubble Router to define
> regions on the graph, and assign nodes regions based on their
> attributes. Bubble Router does not appear to work with 2.8.3, and I
> haven't come across an alternative app (other than those which use GO
> terms, rather than any user-defined node attributes).
Take a look at Mosaic -- it replaces BubbleRouter and there are ways to
import your own "ontology".
> Or, 2) Set a numerical edge attribute to each edge that connects nodes
> sharing the same attribute, and use this edge attribute to give a
> higher weight to those edges when using standard layouts. Again, the
> node attributes are string rather than numerical attributes.
> Essentially, I would like to somehow "cluster" based on node string
> attributes.
This one is trickier. You would need to develop some sort of
"similarity" metric based on term co-occurrence. Depending on the
number of terms, there are some pretty simple approaches:

weight[xy] = sum(co[xyn])/nTerms

where weight[xy] is the weight on the edge connecting node x and y and
co[xyn] is the co-occurrence of term "n" in both x and y. Essentially,
co[xyn] in your case would either be 0 or 1. The result would be a
series of weights you could apply to the edges connecting your nodes.

-- scooter

> Any suggestions would be appreciated.
> Thanks, Jon
>
> This message contains information which may be confidential and/or
> protected by attorney-client privilege. Unless you are the addressee,
> you may not use, copy or disclose to anyone this message or any
> information contained in this message. If you have received this
> message in error, please send me an email and delete this message.
> Thank you. --
> You received this message because you are subscribed to the Google
> Groups "cytoscape-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/cytoscape-discuss/-/R0nD9YWtBlcJ.
> To post to this group, send email to cytoscap...@googlegroups.com.
> To unsubscribe from this group, send email to
> cytoscape-disc...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cytoscape-discuss?hl=en.

Jon Kornhauser

unread,
Sep 13, 2012, 10:13:03 AM9/13/12
to cytoscap...@googlegroups.com
Hi Scooter,

Thanks for the suggestions! Mosaic appears to solve my problem regarding the first approach. Just what I was looking for.

I haven't attempted the edge weighting yet, but it seems reasonably straightforward. I'll dig into that some time soon.

Many thanks,
Jon
Reply all
Reply to author
Forward
0 new messages