Convention for edge types

34 views
Skip to first unread message

srikanth bezawada

unread,
Jun 27, 2016, 1:09:41 PM6/27/16
to cytoscap...@googlegroups.com
Hi, 

How can a Cytoscape user be aware of which edges are directed and which edges are undirected while importing a network file ?

Thanks,
Srikanth.B.

Matthias König

unread,
Jun 30, 2016, 8:23:56 AM6/30/16
to cytoscape-discuss
Hi Srikanth,
could you give some more information.
Especially what your input file format is and perhaps and example of such a network.
Matthias

srikanth bezawada

unread,
Jul 1, 2016, 9:11:35 AM7/1/16
to cytoscap...@googlegroups.com
Hi Matthias,

Suppose I'm importing a network file like the one I attached here. How would I as a user specify whether which edges are directed (or) which edges are undirected.

(Or) Is it the case that the network can be considered as directed(source->target) or undirected only.  

Thanks,
Srikanth.B.


--
You received this message because you are subscribed to the Google Groups "cytoscape-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-disc...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-discuss.
For more options, visit https://groups.google.com/d/optout.

test2.sif

Matthias König

unread,
Jul 4, 2016, 3:37:04 AM7/4/16
to cytoscape-discuss
Hi Srikanth,

the trick is to use a Network format which supports directed and undirected edges.
I looked at the SIF reader in Cytoscape and it does not take the directed attribute into account, but just sets all edges to directed by default.
So no change to get a mixed network in SIF format.

You can use for instance CSV or GML.
I attached an example file which shows the same network you provided in SIF as CSV file. You have to provide an attribute directed which is uses
by the CSV reader to set the direction of the network.
After reading the CSV you have a network with directed and indirected edges (see attribute column directed in the node table).

Your next step is to have a visual style which distinguishes the directed from the indirected edges.
Unfortunately, the default Cytoscape styles don't do this, i.e. they do not use the directed attribute to map on the edge arrows.
I attached an style which sets the arrow-head depending on the directed attribute (Curved-directed.xml), so you can see the undirected subnetwork as part of the network (screenshot undirected cluster around node 1).



Hope this helps.
Attached a session file.

You could also use GML as format.
Matthias
test2.cys
Curved-directed.xml
test2.csv
test2.sif
Auto Generated Inline Image 1

srikanth bezawada

unread,
Jul 4, 2016, 9:23:43 AM7/4/16
to cytoscap...@googlegroups.com
Thanks Matthias for the detailed explanation.

Thanks,
Srikanth.B.

Thomas Pfau

unread,
Jul 12, 2016, 3:51:16 AM7/12/16
to cytoscap...@googlegroups.com
Hi

I have some code that relies on other apps. Now, I would like it to work
regardless on whether someone installs/disables the other app.
So what I'm currently ding is:
a: on activation check whether the appropriate Classes are available
(and if they are set the corresponding service object in my class).
b: When the respective service gets unregistered, I remove the reference
from my own class setting the corresponding object to null

Now I have the following issue:
-> I start up cytoscape, my app gets loaded before the other app.
No problem so far as my servicelistener catches the start of the other
app and sets the appropriate object. The same is true, when the other
app gets loaded before my app, in which instance I can simply use the
service that app registered.
-> I disable the other app
Still Fine, my listener properly sets the object to 0 and I can keep on
working with this setting.
-> I reactivate the other app
For some reason my servicelistener does not get a service event for the
class I need any more.
In fact, there is no service event at all being fired that would
indicate that this service is now available.

I would have expected something like I find the class but get a class
cast exception (which would require some unget for the service to get it
out of my classloader, which I'm actually not sure how to do with
cytoscape). But not getting any event leaves me puzzled as I don't get
any other error neither.

Does anyone know what could cause this issue?


Best

Thomas







Thomas Pfau

unread,
Jul 12, 2016, 5:30:02 AM7/12/16
to cytoscap...@googlegroups.com
A small update:

I tried to see, whether the event was no longer fired or whether my app
was just not informed about the event.
From what I can determine, it's the latter.
A different app thats just listening to the events does get the event,
it's only my app that is left "in the dark".

I think, what I need is to listen to a class, that is not yet available,
but I have no clue how to do this.
If I use registerServiceListener, I get a NoClassDefFound Error (which
is to be expected) when the other app is not yet loaded.
If the other app was loaded previously, everything seems fine initially
and I have a listener for the class.

If after this initial integration the app is deactivated, it is
(manually) unregistered) from my app, i.e. the respective objects are
removed, but I have the impression, that e.g. classes used still remain
in my bundle.
This seems to interfere with any service listening, as I'm now listening
to a class that (while having the same name) has a different class
loader (in fact one, thats no longer existing).
From some googling I got the impression, that the only way to get the
old stuff (from the previous activation) out of my bundles scope is to
call a rewiring on the framework.
However this seems to be something that will probably result in a
complete reset of my app (whih is not really what I would like).

Anyone with an idea how this could be solved without completely
restarting the app every time an optional dependency is activated?

Best

Thomas
--
Université du Luxembourg
Faculté des Sciences, de la Technologie et de la Communication
Campus Belval, Biotech II 423
6 avenue du Swing
L-4367 Belvaux
Tel: (+352) 46 66 44 5309
Email: thoma...@uni.lu


Thomas Pfau

unread,
Jul 12, 2016, 8:28:13 AM7/12/16
to cytoscap...@googlegroups.com
Sorry for multi-posting,

From all I could figure out, the issue is, that the framework for some
obscure reason is not propagating the Servicechanged event to my app
once the other app got disabled.
The event is still fired, and can be logged with a different app, its
just hidden from my app.
I currently assume that this happens due to some imports my app uses
from the other app, but I'm not sure, how to solve this.

Best

Thomsas
Reply all
Reply to author
Forward
0 new messages