Cytoscape: the network visualization tool for GenomeSpace workflows

Modern genomic analysis often requires workflows incorporating multiple best-of-breed tools. GenomeSpace is a web-based visual workbench that combines a selection of these tools with mechanisms that create data flows between them. One such tool is Cytoscape 3, a popular application that enables analysis and visualization of graph-oriented genomic networks. As Cytoscape runs on the desktop, and not in a web browser, integrating it into GenomeSpace required special care in creating a seamless user experience and enabling appropriate data flows. In this paper, we present the design and operation of the Cytoscape GenomeSpace app, which accomplishes this integration, thereby providing critical analysis and visualization functionality for GenomeSpace users. It has been downloaded over 850 times since the release of its first version in September, 2013.

GenomeSpace is a web-based application (http://genomespace.org) that provides a workspace environment for executing biologic analysis workflows involving genomic data. It hosts a variety of third party tools that it can launch to perform queries of public genomic databases, customized analyses, and customized visualization and publishing. The data and results from a given tool are stored by GenomeSpace as private, public, or shared files that are made available to other tools in the workspace. Cytoscape is a standalone desktop application that enables users to analyze, visualize, and publish complex networks -with its GenomeSpace app ("the app", http://apps.cytoscape.org/apps/genomespace), it doubles as a tool available to GenomeSpace workflows. This paper describes Cytoscape's GenomeSpace app, which links GenomeSpace and Cytoscape, thereby enabling data to flow between Cytoscape and other GenomeSpace tools. It focuses on critical design issues for the app, and gives a brief app demonstration highlighting the resulting user interface and data transfer functionality.
While there exists a number of workflow engines that can perform biological analyses (e.g., Taverna 1 , BioKepler 2 , and Galaxy 3 ), GenomeSpace distinguishes itself by combining a collaborationoriented file system (incorporating sharing and stored metadata), a robust and user-extensible spectrum of genomic tools, and a library of recipes demonstrating best practices for the orchestration of GenomeSpace tools to achieve common and important bioinformatic results. While some tools implement specific and constrained functionality (e.g., ISAcreator 4 ), others are complex and rich applications (e.g., GenePattern 5 , Gitools 6 , and Cistrome 7 ), and yet others are fully featured workflow management systems themselves (e.g., Galaxy and Sage Synapse 8 ). By tying these features together, GenomeSpace provides a comprehensive and effective environment for genomic research.
GenomeSpace offers a short list of tools that enable network visualization and analysis, including Cytoscape, Genomica (http://genomica.weizmann.ac.il/) (for module network trees), Gitools 6 (for heat maps), and IGV 9 (for sequencing data). Cytoscape distinguishes itself by being graph-oriented and delivering rich filtering, layout, and visual style features backed up by an extensive collection of third-party apps 10 , including pathway analysis, data integration, GO annotation, and more.
To launch a tool, GenomeSpace opens a new browser page using a URL specific to the tool. Paradoxically, Java-based tools (such as Cytoscape) run directly on the user's workstation instead of within a browser. In this paper, we describe a specialized launch strategy that addresses this. We also describe Cytoscape's GenomeSpace app, how its user interface adds GenomeSpace functionality within Cytoscape, and how it uses GenomeSpace's Client Development Kit (CDK) to access the GenomeSpace file system to read input files or write result files.
Note that GenomeSpace supports two Cytoscape tools it calls "Cytoscape" and "Cytoscape 3". Its "Cytoscape" refers to the deprecated Cytoscape version 2, and its "Cytoscape 3" refers to Cytoscape version 3, which is the currently released version (http:// cytoscape.org). Within this paper, we discuss only the "Cytoscape 3" tool, and refer to it simply as "Cytoscape".

Implementation
The Cytoscape support for GenomeSpace exists in three parts: the launch support, Cytoscape's GenomeSpace app, and Cytoscape itself. This section describes how the launch support and app work, and leaves the operation of Cytoscape to the Results section below. Technical details of Cytoscape internal organization, construction, APIs, data structures, and general conventions can be found in the Cytoscape App Developer wiki (http://wiki.cytoscape.org/Cy-toscape_3/AppDeveloper).

Launch
To launch a tool, a GenomeSpace user left-clicks on the corresponding toolbar icon, which activates the tool via the tool's URL. For Cytoscape, the URL references a launch descriptor file that adheres to the Java Network Launch Protocol (JNLP) 11 and resides on the Cytoscape web site. Web browsers process a JNLP file URL by starting a specialized launcher that downloads a Java application named in the JNLP file, then executes it on the user's workstation. In Cytoscape's case, we created a dynamic JNLP file (as a PHP script that delivers a JNLP file) that executes a small LaunchHelper Java application (see Figure 1). GenomeSpace constructs the JNLP URL to contain a GenomeSpace file descriptor as a parameter, and the PHP script extracts it and defines it as a parameter to the LaunchHelper (see Supplementary Data, particularly as the value used for the SomeGenomeSpaceFileID in the gs.url argument).
The LaunchHelper tests for the presence of Cytoscape and Cytoscape's GenomeSpace app, and installs them if they are not present. Because LaunchHelper is itself a Java application, it is able to download the Cytoscape installer appropriate for the user's workstation and the GenomeSpace app while maintaining an interactive user interface, including appropriate installation dialog boxes (as JOptionPane) and progress bars (as ProgressMonitorIn-putStream).
Note that before attempting to launch Cytoscape, GenomeSpace attempts to determine if Cytoscape is already running by using the JRAC protocol (http://code.google.com/p/jrac) -if it is, Cytoscape simply starts a new session.

GenomeSpace app
The GenomeSpace app manages the relationship between Cytoscape and GenomeSpace once Cytoscape is running. In addition to responding to a JRAC request (above), it augments the Cytoscape user interface to allow the user to directly access the GenomeSpace file system and tools.

Amendments from Version 1
I added text to clarify issues that each of the reviewers raised. Some changes were corrections of simple typos (e.g., removing unnecessary "it" from the last sentence of the Abstract, or fixing the spelling of an author name in the References section). Other changes were one sentence clarifications that help focus or disambiguate the discussion.

Building app menus
The app exposes a number of GenomeSpace functions as menu items under Cytoscape's File and Apps menus. This enables Genome-Space login, opening and saving GenomeSpace sessions, launching GenomeSpace tools, and importing and exporting networks and tables as GenomeSpace files. Networks can be exported in .sif, .cyjs, .nnf, PSI-MI, and .xgmml formats. While some menu items are positioned within Cytoscape's top-level menus (e.g., session open and save menu items in the File menu), others are positioned in submenus within Cytoscape menu items (e.g., importing a network under File | Import | Network). For nice effect, each menu item identifies itself with a distinctive GenomeSpace logo and uses menu gravity to place itself consistently relative to existing Cytoscape menu items. (It uses setPreferredMenu to add the menu, setMenu-Gravity to position it, and putValue to set the small icon).

GenomeSpace communication strategy
To implement these menu items, the app communicates with GenomeSpace via the GenomeSpace CDK (http://www.genomespace.org/support/api/cdk), a proxy interface to GenomeSpace carried over an SSL Internet connection. The CDK enables GenomeSpace session management, tool discovery, user authentication, file system listing, and file upload and download. As with other apps, the app's cyActivator initializes the app state, including gaining references to the standard Cy objects: application, network, view, and table managers. It also initializes basic CDK-related state (e.g., the GenomeSpaceContext root context).

GenomeSpace file I/O
In addition to communicating with GenomeSpace, the CDK displays key GenomeSpace-related dialog boxes, including the login dialog and a file chooser for import and export functions. The app uses file choosers to identify an import (or export) file (referenced by metadata), but then executes the operation using a combination of CDK download/upload functions and Cytoscape task manager and monitor functions.
For example, given metadata for a network file to import, the app creates a Cytoscape task iterator that downloads the network to a temp file, loads the network into Cytoscape, and then deletes the temp file as shown in the Supplementary Data. DownloadFile-FromGenomeSpaceTask calls CDK to perform the download, and loadNetworkFileTaskFactory adds the network to the Cytoscape data model. Because the app orchestrates the download using Cytoscape's task manager, its progress is automatically tracked and reported by Cytoscape's task monitor.

Results
The GenomeSpace app enables Cytoscape to act as a tool in a workflow executed within the GenomeSpace web application. From the Cytoscape perspective, genomic data can come from numerous sources and can be rendered to numerous destinations, where the GenomeSpace file system can be a source, a destination, or both. To facilitate this, GenomeSpace also allows the user to identify a GenomeSpace-stored Cytoscape session file (.cys) while launching Cytoscape, thereby facilitating a seamless tool launch.
Additionally, the app adds menu items to Cytoscape to enable loading or saving a Cytoscape session, a network, or node or edge attributes in the GenomeSpace file system from within Cytoscape. Each menu item enables the user to navigate within the file system using a chooser.
Note that the GenomeSpace app makes the GenomeSpace file system available to Cytoscape even without the user first executing the GenomeSpace web application. In this case, Cytoscape enables the user to log into GenomeSpace within Cytoscape, and then use the app-injected menus to access workflow-related data files.

Demonstration
As a demonstration of typical Cytoscape usage, we show how to use Cytoscape to integrate gene expression data with a pre-defined genomic network, where both the network and gene expression data reside in the GenomeSpace file system. The network was created in a prior Cytoscape session and stored in the GenomeSpace file system so it could be shared as a template with collaborators and integrated with various gene expression datasets produced during an ongoing study. The test network is a portion of the BioGrid H. sapiens network. The gene expression data represents the output of some previously executed GenomeSpace tool, such as Galaxy. To load the template network into Cytoscape, use a web browser on a workstation having at least 6GB RAM. Log into Genome-Space.org -you can easily create a user ID if you don't have one. Right-click on the "Cytoscape 3" tool, and choose the Launch on File menu item. Choose the Cytoscape session file (.cys) containing the H. sapiens network template by browsing the file system to /bdemchak/F1000Example, then dragging it to the launch box and clicking Launch. Once Cytoscape has started and the network has loaded, you will see a small network in a view window (Figure 2).
To load a gene expression dataset, choose Cytoscape's File | Import |  (Figure 3). This style is part of the Cytoscape session file loaded for this example, and illustrates that all Cytoscape functionality is available in Cytoscape operating as a GenomeSpace tool.

Conclusions
The GenomeSpace app shows how Cytoscape can be used as a plugin to a web application as part of a larger workflow, and then how to integrate external services into Cytoscape's workflow.

Software availability
Software Author contributions TH, MS, TL and BD participated in the design of GenomeSpace app software. BD and TM authored this article. TI and JM provided funding and supervision.

Competing interests
No competing interests were disclosed.

Grant information
We would like to acknowledge funding from National Human Genome Research Institute (P01 HG005062-03 assigned to Jill
Unfortunately, I was not able to run the example described in the manuscript, due to a "unable to find the document" error.
Overall, the manuscript gives a fair description both of the technology used for integrating Cytoscape into GenomeSpace and its use. This however does mean that the actual focus is not completely clear. If the message is "there is a new tool accessible from GenomeSpace" which would be aimed at the end-user, then terms like "JRAC" and "cyActivator" cannot be expected to be understood without further explanation. Care should be given to explain these sufficiently enough for lay-people. On the other hand, the message could also be "here is how to integrate a web-tool with a desktop application", in which case the technical part might be described a bit more in depth.
I expect this paper and the bridge between Cytoscape and GenomeSpace will be of considerable interest to the community.

Minor textual remarks:
In the abstract, there is an extra "it" in "It has been downloaded it over 850 times".
Hyphenation has gone awry in many cases. Although this is not important for the contents of the manuscript, it does start to bother the reader after a while. These include (but are not limited to): "GenomeS-pace", "submen-us", "grav-ity", "Genom-eSpace", "Genom-eSpaceContext", "attrib-utes", and "Bi-oGrid".

I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard.
No competing interests were disclosed. Competing Interests: Posted: 05 Aug 2014 Thank you, Jan, for the thoughtful comments. We are looking into the issue of Cytoscape not launching from the web site. As a workaround, you can either hit the OK button on the browser error window, or launch Cytoscape on your PC before attempting to launch it from GenomeSpace. You can also get the Cytoscape session file directly from GenomeSpace by launching Cytoscape, and using the File | Open from GenomeSpace menu item. Also, we'll address the mechanical and explanation issues in a revision in the next few days. Thank you! No competing interests were disclosed. The paper "Cytoscape: the network visualization tool for GenomeSpace workflows" describes the GenomeSpace app, a tool that facilitates data analysis in Cytoscape for GenomeSpace users. This is a nice try to bridge two communities: cytoscapers & genomespacers.

Barry Demchak
The resources and tools included in GenomeSpace are well presented, and the important data sharing possibility is underlined. At the same time, the extensive app collection of Cytoscape with its multiple analysis possibilities is very short mentioned. This could be maybe extended so that users of GenomeSpace could use Cytoscape not only to visualize their results obtained in GenomeSpace, but also to analyze their data with Cytoscape apps. But this will be probably the topic of another paper.
For running the app, the computer should have enough memory, as mentioned in the article. Some GUI adjustments should be done for the different OS, for instance in Ubuntu the login dialog size should be increased, the buttons are not entirely visible at the moment. The new functionality is nicely underlined with icons, but is scattered throughout the menu. To increase the usability/visibility, after the login it would be good e.g. to add also the import/export buttons into the tool bar in top.
The app performs well. It remains to the users of both communities to discover the multiple possibilities that this app offers.
We have read this submission. We believe that we have an appropriate level of expertise to confirm that it is of an acceptable scientific standard.
No competing interests were disclosed. The language is acceptable but would benefit from a more careful reading/editing. Some examples where improvements are possible are: "Javabased" should be corrected to "Java-based".
In the sentence that begins "Web browsers are defined to process a JNLP file URL by starting a specialized launcher…", the portion that reads "are defined to" is extraneous.
In the sentence that reads "Paradoxically, Javabased tools (such as Cytoscape) run directly on the user's workstation instead of within a browser", it is not clear what is paradoxical about the described execution protocol. The word "paradoxically" should/could be dropped or maybe be replaced by a more appropriate adverb.

Comments on specific sections:
Launch: there is a sentence that reads "GenomeSpace constructs the JNLP URL to contain a GenomeSpace file descriptor as a parameter, and the PHP script extracts it and defines it as a parameter to the LaunchHelper (see Supplementary Data)." It would add to clarity to explain what the file referenced is.
GenomeSpace app: This section appears written with the assumption that the reader is already familiar with the Cytoscape app framework, essentially no background is provided.
GenomeSpace communication strategy: Same comment as above: the article refers to Cytoscape-specific programming constructs without introducing them or providing relevant references for disambiguation. E.g., in the sentence "As with other apps, the app's cyActivator initializes the app state, including gaining references to the standard Cy objects: application, network, view, and table managers", terms like "cyActivator" and "Cy objects" are used without prior definition/explanation. The same issue exists with GenomeSpace-specific objects, e.g., the sentence "It also initializes basic CDK-related state (e.g., the GenomeSpaceContext root context)".
Demonstration: It would be helpful to describe what the columns of the input data file ,

Barry Demchak
Posted: 24 Jul 2014 @MichelDumontier: Thanks for the thoughtful comments. The ground rules for this paper collection involved writing a 2 pager (or slightly more) on a Cytoscape App. So, this paper is App-centric.Your point, though, goes towards demonstrating the value of GenomeSpace in the first place, which is yet a separate paper, and would be enormously valuable. We'll try to write that next.
No competing interests were disclosed. Competing Interests: , Carleton University, Canada Michel Dumontier Posted: 15 Jul 2014 Linking Cytoscape with other applications through GenomeSpace seems like a small step to starting tying together different software. To demonstrate the value of using GenomeSpace, the authors should walk us through an example that makes use of other software to generate cytoscape input and/or further process cytoscape output. Otherwise, how is this different than just using Cytoscape? Additionally, the paper should clearly articulate the scientific merit of its example : what biological insight do we obtain in overlaying gene expression data on this pre-generated network file?
No competing interests were disclosed.

Nigam Shah
Posted: 11 Jul 2014 Tying together the best Web based workflow software for genomic analysis with the best network analysis tool is highly valuable. Fun to give it a try! none Competing Interests: