Differences between revisions 13 and 14
Revision 13 as of 2013-11-27 01:42:22
Size: 3545
Editor: KeiichiroOno
Comment:
Revision 14 as of 2013-11-27 02:08:08
Size: 4744
Editor: KeiichiroOno
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
[[http://cytoscape.github.io/cytoscape.js/|Cytoscape.js]] is a '''!JavaScript library''' for interactive network visualization. It is a building block for web applications and is '''NOT''' a complete web application. If you want to share your network visualization created with Cytoscape, you can build your own website using Cytoscape.js and this new '''''Export to Cytoscape.js''''' feature. [[http://cytoscape.github.io/cytoscape.js/|Cytoscape.js]] is a '''!JavaScript library''' for interactive network visualization. It is a building block for web applications and is '''NOT''' a complete web application. If you have network data sets visualized want to share your network visualization created with Cytoscape, you can build your own website using Cytoscape.js and this new '''''Export to Cytoscape.js''''' feature.
Line 23: Line 23:
=== Differences and Common Aspects === === Differences and Shared Concepts ===
Line 46: Line 46:
Since Cytoscape.js is a !JavaScript library, its basic data exchange format is [[http://www.json.org/|JSON (JavaScript Object Notation)]]. Since Cytoscape.js is a !JavaScript library, its basic data exchange format is [[http://www.json.org/|JSON (JavaScript Object Notation)]].  All of these import/export functions are part of standard Cytoscape user interface, and you can read/write Cytoscape.js JSON files just like other standard files such as SIF.
Line 49: Line 49:
Cytoscape.js stores network data (graph) and its attributes (data table) in a same object. Cytoscape writes such data complex as JSON, i.e., both network and data tables will be exported as a single JSON file. You can select a network and export it from '''''File → Export → Network'''''.
 
==== Important Note about Data Compatibility ====
Cytoscape creates JSON file directly from data table and tries to extract as much data as possible from the original table. However, since table column names will be directly converted into JavaScript variable names, invalid characters will be replaced by underscore (_):
Line 50: Line 54:
==== Important Note about Data Compatibility ====
Cytoscape creates JSON file directly from data table and tries to extract as much data as possible from the original table. However, since column name

 * Original Column Name
 * Original Data Table Column Names:
Line 59: Line 60:
 * In JSON  * The Names above will be replaced to:
Line 65: Line 66:
You should be careful when you planning to use this feature for data roundtrip: from Cytoscape to Cytoscape.js back to Cytoscape. You should be careful when you plan to use this feature for data roundtrip: from Cytoscape to Cytoscape.js back to Cytoscape. For such use cases, '''we strongly recommend to use JavaScript-safe characters only in your table column names'''. Naming your columns only with alphanumeric characters and underscore (_) is the best practice. (For actual data entries, all characters are allowed. This restriction is only for table column names.)
Line 68: Line 69:
Cytoscape and Cytoscape.js are sharing the concept of '''''Styles'''''. Cytoscape and Cytoscape.js are sharing a concept called '''''Style'''''. This is a collection of mappings from data point to visual property.

You can export '''''File → Export → Style''''' and select Cytoscape.js JSON as its format.
Line 73: Line 76:
== Build your own Web Application with Cytoscape == == Build Your Own Web Application with Cytoscape.js ==
Cytoscape data exporter are

What is Cytoscape.js?

jsWebSite.png

Cytoscape.js is a JavaScript library for interactive network visualization. It is a building block for web applications and is NOT a complete web application. If you have network data sets visualized want to share your network visualization created with Cytoscape, you can build your own website using Cytoscape.js and this new Export to Cytoscape.js feature.

Examples

Differences and Shared Concepts

Although Cytoscape and Cytoscape.js are two completely independent software packages, they are sharing higher level concepts. The following is the list of similarities and differences between the two:

Cytoscape

  • Desktop application for network visualization written in Java programming language

  • Needs desktop or laptop computers to run
  • Users have to install Java runtime
  • High performance application for large scale network analysis and visualization
  • Expandable by Apps

  • Use Styles to map data (attributes) to visual properties, such as node color, edge width, node shape, etc.

Cytoscape.js

  • A JavaScript library for network visualization, NOT a complete web application nor mobile app

  • Runs on most of modern web browsers, including tablets and smart phones
  • No plugins are required to run. Modern web browser is the only requirement
  • Need to write code to set up your web site or web application
  • Expandable by Extensions

  • Use CSS-based Styles to map data to visual properties

In a long term, Cytoscape and Cytoscape.js will be more integrated, and as the first step Cytoscape now supports reading and writing Cytoscape.js network/table JSON files. In addition, Cytoscape can convert Styles to Cytoscape.js Style object.

Data Exchange between Cytoscape and Cytoscape.js

Since Cytoscape.js is a JavaScript library, its basic data exchange format is JSON (JavaScript Object Notation). All of these import/export functions are part of standard Cytoscape user interface, and you can read/write Cytoscape.js JSON files just like other standard files such as SIF.

Export Network and Table to Cytoscape.js

Cytoscape.js stores network data (graph) and its attributes (data table) in a same object. Cytoscape writes such data complex as JSON, i.e., both network and data tables will be exported as a single JSON file. You can select a network and export it from File → Export → Network.

Important Note about Data Compatibility

Cytoscape creates JSON file directly from data table and tries to extract as much data as possible from the original table. However, since table column names will be directly converted into JavaScript variable names, invalid characters will be replaced by underscore (_):

  • Original Data Table Column Names:
    Gene Name
    KEGG.pathway
  • The Names above will be replaced to:
    Gene_Name
    KEGG_pathway

You should be careful when you plan to use this feature for data roundtrip: from Cytoscape to Cytoscape.js back to Cytoscape. For such use cases, we strongly recommend to use JavaScript-safe characters only in your table column names. Naming your columns only with alphanumeric characters and underscore (_) is the best practice. (For actual data entries, all characters are allowed. This restriction is only for table column names.)

Export Styles to Cytoscape.js

Cytoscape and Cytoscape.js are sharing a concept called Style. This is a collection of mappings from data point to visual property.

You can export File → Export → Style and select Cytoscape.js JSON as its format.

Import Cytoscape.js data into Cytoscape

CYtoscape.js JSON file can be loaded from standard Cytoscape file menu: File → Import → Network → URL...

Build Your Own Web Application with Cytoscape.js

Cytoscape data exporter are Details of web application development with Cytoscape.js is beyond scope of this document, but here is the guidline:

Cytoscape_3/UserManual/CytoscapeJs (last edited 2016-04-26 22:25:34 by server2)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux