Programmatically Generating Network Files

141 views
Skip to first unread message

Boris Sadkhin

unread,
Dec 11, 2014, 3:23:43 PM12/11/14
to cytoscape...@googlegroups.com
Lets say I have a collection of nodes, node attributes, edges, and edge attributes. 

How do I go about choosing a format to export them to cytoscape? eg, xgmml or json
Is there a library function to generate networks by feeding it data? Or do I have to programmatically massage the data into the correct syntax myself?

William Hayes

unread,
Dec 12, 2014, 8:31:57 AM12/12/14
to cytoscape...@googlegroups.com
Disclosure:  I'm one of the authors of the JGF format so am quite biased.  I also love JSON especially if the alternative is XML.

You can use JGF format as there is now a Cytoscape App for loading JGF formatted network files: http://apps.cytoscape.org/apps/jgfapp

JGF is described here:  http://json-graph-format.info   

Short description: 
This JSON Graph format is focused on capturing basic graph structure in a convenient to use format. It allows for the use of metadata objects in the graph, nodes and edges which can be used for any other graph data that needs to be managed in your graph data files (e.g. graph layout, styling, algorithm results, etc). There have been many efforts to create JSON Graph specifications over the last few years. We published this JSON Graph specification on Github using JSON Schema and are providing basic tooling around it to help make it a standard. Please feel free to suggest changes and enhancements to either the specification or tooling (especially via a pull request to Github).

Boris Sadkhin

unread,
Dec 16, 2014, 7:28:47 PM12/16/14
to cytoscape...@googlegroups.com
Thanks for the suggestion.

So i see a schema. Is there a library to import tab files into JGF format?

William Hayes

unread,
Dec 17, 2014, 5:35:55 AM12/17/14
to cytoscape...@googlegroups.com
No but if you send a tab file example, I can throw something together in python in about 10 min.


On Dec 16, 2014, at 19:28, Boris Sadkhin <bsad...@gmail.com> wrote:

Thanks for the suggestion.

So i see a schema. Is there a library to import tab files into JGF format?

--
You received this message because you are subscribed to a topic in the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cytoscape-helpdesk/ckp2pz5xSaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.

Keiichiro Ono

unread,
Dec 17, 2014, 1:34:03 PM12/17/14
to cytoscape...@googlegroups.com
Hi.

If you prefer JSON, Cytoscape supports Cytoscape.js style JSON by default.
And if you are using Python, you can convert NetworkX object directly
to Cytoscape.js format:

http://nbviewer.ipython.org/github/idekerlab/cy-rest-python/blob/develop/basic/CytoscapeREST_Basic2.ipynb

And you can POST it directly from your console via cyREST.

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



--
===================================

Keiichiro Ono
http://keiono.github.io/

===================================
Reply all
Reply to author
Forward
0 new messages