Cytoscape from within Matlab

424 views
Skip to first unread message

Roy

unread,
Apr 3, 2008, 6:33:05 PM4/3/08
to cytoscape-discuss
Hi,

I'm trying to instantiate Cytoscape within matlab. I was able to do
this with other Java based tools (ImageJ) and it was very powerful. So
far I was able to create a CyMain object:

>> cymn=CyMain('');
init mode: 1
PreferenceAction()...
BookmarkAction()...
updating plugins...
loading plugins....

... more output...

and even pass this object into a CytoscapeInit object:
>> CyInit=CytoscapeInit;
>> CyInit.init(cymn)
init mode: 1

... more output...

Cytoscape initialized successfully in: 54 ms

In both cases I get the nice looking Cytoscape window where I can
manually load a file and so on. However, to get data automatically
into Cytoscape and create network, I actually need a Cytoscape object.
But when I'm trying to create the Cytoscape object, I get the
following:

>> Cy=Cytoscape;
??? Java exception occurred:
java.lang.InstantiationException: cytoscape.Cytoscape

If anyone has an idea as to why it is, (and what to do about it) that
would be great.

Thanks
Roy

David J. States

unread,
Apr 3, 2008, 8:40:30 PM4/3/08
to cytoscap...@googlegroups.com, Alex Ade
Our Java WebStart code is able to load Cytoscape with a network preloaded.  Alex Ade can provide details.

David
-- 
David J. States, M.D., Ph.D.
Professor of Human Genetics
Director of Bioinformatics Training Program
University of Michigan School of Medicine
Palmer Commons 2035B
100 Washtenaw Rd.
Ann Arbor, MI 48109 USA
email: dst...@umich.edu
tel: (734) 615-5510
fax: (734) 615-6553
URL: http://stateslab.bioinformatics.med.umich.edu

Mike Smoot

unread,
Apr 3, 2008, 9:58:41 PM4/3/08
to cytoscap...@googlegroups.com
Hi Roy,

I don't know much about running java programs from within matlab, but the method that will start everything is CyMain.main(String[] args), so try calling that. If you can populate the array of args from within matlab, then you'll have all of the command line options that are normally available to you.

If for some strange reason you can't call CyMain.main(), then you could write a simple java class that calls the method, and then instantiate that object.  I can think of other approaches too.  Let us know how it goes!


thanks,
Mike
--
____________________________________________________________
Michael Smoot, Ph.D. Bioengineering Department
tel: 858-822-4756 University of California San Diego

dandante

unread,
Apr 4, 2008, 6:30:04 PM4/4/08
to cytoscape-discuss
I don't know much about Matlab, I know it has some sort of java
connection.

Please consider writing a "goose", or "gaggle-enabled" extension to
Matlab. This would allow networks and other data types to be
seamlessly broadcast to a number of systems biology data analysis
tools. It's very simple, all you have to do is implement a single java
interface.

More information at:
http://gaggle.systemsbiology.net

If you end up doing this, let me know and I can distribute your
"goose" on the gaggle site; I can also help answer questions you may
have during development.
Thanks

Roy

unread,
Apr 9, 2008, 12:03:33 AM4/9/08
to cytoscape-discuss
Hi Mike & Dan,

Thanks for your answers. I was only able to test things today,
so sorry for the late response. I can indeed call the CyMain main
method and I do get the Cytoscape window which I can then interact
manually load a network and so on. Which is great, but that's not
what I'm looking for.

What I would like to do is to interact with the network
computationally.
Do some analysis in Matlab, and based on the results, update the width
of arcs and so on.

If I understand the API correctly, to create / change properties of
network,
I need a CyNetwork object that is created by a Cytoscape object. But
all I can
create is a CyMain object, with methods that only control the
initiation of the GUI.

But probably, the gaggle idea is the best way to go forward. If it
works in R,
no reason not to work with matlab as well. I'll look into it in more
details,
but It should be more stable and robust solution anyway. Holding Java
object
within matlab is nice, but tends to crash to often for my taste...

Thanks for your help,

Best,
Roy


On Apr 4, 3:30 pm, dandante <danda...@gmail.com> wrote:
> I don't know much aboutMatlab, I know it has some sort of java
> connection.
>
> Please consider writing a "goose", or "gaggle-enabled" extension toMatlab. This would allow networks and other data types to be
> seamlessly broadcast to a number of systems biology data analysis
> tools. It's very simple, all you have to do is implement a single java
> interface.
>
> More information at:http://gaggle.systemsbiology.net
>
> If you end up doing this, let me know and I can distribute your
> "goose" on the gaggle site; I can also help answer questions you may
> have during development.
> Thanks
>
> On Apr 3, 6:58 pm, "Mike Smoot" <msm...@ucsd.edu> wrote:
>
> > Hi Roy,
> > I don't know much about running java programs from withinmatlab, but the
> > method that will start everything is CyMain.main(String[] args), so try
> > calling that. If you can populate the array of args from withinmatlab, then
> > you'll have all of the command line options that are normally available to
> > you.
>
> > If for some strange reason you can't call CyMain.main(), then you could
> > write a simple java class that calls the method, and then instantiate that
> > object. I can think of other approaches too. Let us know how it goes!
>
> > thanks,
> > Mike
>
> > On Thu, Apr 3, 2008 at 3:33 PM, Roy <rwoll...@gmail.com> wrote:
>
> > > Hi,
>
> > > I'm trying to instantiate Cytoscape withinmatlab. I was able to do

bantoo singh

unread,
Apr 11, 2008, 10:13:09 AM4/11/08
to cytoscap...@googlegroups.com
Hello Everyone,

Hi I am new to cytoscape.

How do I import networks from Pathway commons in Cytoscape version 2.6? I  do not get the option in the drop down menu for data source when I use "Import Network from Database". Do I have to download some plugin for it?

Moreover is it possible to import/ match the downloaded network on an existing network created from my own data?

Any help will be highly appreciated.

Thanks,

Bantoo

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Gary Bader

unread,
Apr 11, 2008, 12:52:51 PM4/11/08
to cytoscap...@googlegroups.com
Hi Bantoo,
You should be able to access this in Cytoscape 2.6 through
File->Import->Network from web services... Then select the Pathway
Commons option from the Data Source list.

Right now Pathway Commons is limited to searching one gene at a time,
but a future release will allow you to search using gene lists.
However, you do have the option to merge your search results as you load
them, which allows you to create a larger network.

Gary

--
http://baderlab.org
Terrence Donnelly Centre for Cellular and Biomolecular Research
University of Toronto

Reply all
Reply to author
Forward
0 new messages