Getting current network

83 views
Skip to first unread message

Omar Wagih

unread,
Sep 6, 2012, 2:29:42 AM9/6/12
to cytoscap...@googlegroups.com
How can you get the current network being looked at?
Online says use this through the CyAppAdapter, but this does not seem to be available in the most recent release. Is there something I'm missing?

Cheers

Scooter Morris

unread,
Sep 6, 2012, 3:28:41 AM9/6/12
to cytoscap...@googlegroups.com, Omar Wagih
--
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/-/3EfTmmrtO9UJ.
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.
Hi Omar,
    The current network is maintained by the CyApplicationManager.  So, from your CyAppAdapter:

    CyNetwork currentNetwork = appAdapter.getCyApplicationManager().getCurrentNetwork();

-- scooter

Omar Wagih

unread,
Sep 7, 2012, 12:36:50 AM9/7/12
to cytoscap...@googlegroups.com, Omar Wagih
CyAppAdapter does not exist in the release I have... 

Did a grep on "app" in the karaf terminal:
Cytoscape 3.0.0-M5> list |  grep app
[  87] [Active     ] [            ] [  104] Molecular interaction cluster (OSGi wrapped version w/dependencies) (1.6)
[  97] [Active     ] [            ] [  110] Cytoscape Swing Application API (swing-application-api) (3.0.0.beta2)
[  99] [Active     ] [            ] [  110] Cytoscape App API (app-api) (3.0.0.beta2)
[ 100] [Active     ] [            ] [  110] Cytoscape Swing App API (swing-app-api) (3.0.0.beta2)
[ 109] [Active     ] [            ] [  110] Cytoscape Application API (application-api) (3.0.0.beta2)
[ 128] [Active     ] [            ] [  135] Cytoscape Application Impl (application-impl) (3.0.0.alpha9)
[ 135] [Active     ] [            ] [  160] Cytoscape Swing Application Impl (swing-application-impl) (3.0.0.alpha9)
[ 162] [Active     ] [            ] [  175] Cytoscape App Impl (app-impl) (3.0.0.alpha9)

The version I have (beta3) ..
I have tired several dependencies in the list like

<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>application-api</artifactId>
<version>${cytoscape.api.version}</version>
</dependency>

but the package org.cytoscape.app still isnt there.

I also tried to search maven repositories for CyAppAdaptor... and nothing comes up

Omar

Scooter Morris

unread,
Sep 7, 2012, 12:29:30 PM9/7/12
to cytoscap...@googlegroups.com, Omar Wagih
Those are all bundles.  CyAppAdapter is provided by app-api and CySwingAppAdapter (which extends CyAppAdapter with some Swing GUI-specific methods) is provided by swing-app-api.  So all of the bundles are starting as appropriate.  So, in your pom.xml, you need to depend on org.cytoscape.app:

<dependency>
    <groupId>org.cytoscape</groupId>
    <artifactId>app-api</artifactId>

    <version>${cytoscape.api.version}</version>
</dependency>

-- scooter
To view this discussion on the web visit https://groups.google.com/d/msg/cytoscape-discuss/-/VwKsbiZL8joJ.
Reply all
Reply to author
Forward
0 new messages