Differences between revisions 5 and 9 (spanning 4 versions)
Revision 5 as of 2015-06-22 18:49:44
Size: 2036
Editor: KeiichiroOno
Comment:
Revision 9 as of 2015-06-22 20:16:20
Size: 3126
Editor: KeiichiroOno
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
In this section, you will learn how to use programmatic access features for advanced Cytoscape users.
Line 4: Line 3:
==== Topics ==== In this chapter, you will learn how to use Cytoscape from command line and scripts. These features replace ''Scripting'' module in the past versions of Cytoscape.
Line 6: Line 5:
 * Commands
 * RESTful API
    * Command REST API
    * cyREST
=== Topics ===

* '''''Commands'''''
 * '''RESTful API'''
    * '''Command REST API'''
    * '''cyREST'''
Line 13: Line 14:
=== Background ===
Cytoscape has intuitive graphical user interface for interactive network data integration, analysis, and visualization. It is a great way to exploratory analyze your data sets, but what happens if you have hundreds of data files? It is virtually impossible to apply same operations to hundreds of networks manually with GUI.

M
ore importantly, although you can save your ''results'' as session files, you cannot save your '''''workflows''''' if your analysis is based on point-and-click GUI operation. Recording workflows is the key feature for reproducible data analysis, but it was a missing feature in past versions for Cytoscape. Latest version of Cytoscape has several options to script and automate your workflows.
== Background ==
Cytoscape has intuitive graphical user interface for interactive network data integration, analysis, and visualization. It is a great way for exploratory data analysis, but what happens if you have hundreds of data files or need to ask someone to execute your data analysis workflows? It is virtually impossible to apply same operations to hundreds of networks manually with GUI, and more importantly, although you can save your ''results'' as session files, you cannot save your '''''workflows''''' if your analysis is based on point-and-click GUI operation. Recording workflows is the key feature for reproducible data analysis, but it was a missing feature in past versions for Cytoscape. The latest version of Cytoscape has several options to script and automate your workflows.
Line 19: Line 18:
=== Options === == Options for Programmatic Access ==
Line 22: Line 21:
==== Commands ====
'''''Commands''''' is the built-in Cytoscape feature to automate your workflow as a simple script.
=== Commands ===

 {{attachment:CommandTool.png}}
Line 26: Line 26:
===== Sample Scripts =====
{{{
(TBD)
}}}
'''''Commands''''' is the built-in Cytoscape feature to automate your workflow as simple script. You can learn more about this feature in this section:

 * [[Command_Tool|Command Tool]]
Line 32: Line 31:
==== RESTful API ==== === RESTful API ===
Line 35: Line 34:
===== Commands REST API =====
In addition to running scripts, Commands have REST API to access the
==== REST API for Commands ====
In addition to running Command scripts, Command module has REST API to access those  
Line 42: Line 41:
    * Terminal or [[|iTerm]] (For Mac)     * Terminal or [[https://www.iterm2.com/|iTerm2]] (For Mac)
Line 44: Line 43:
 1. Start Cytoscape from command-line:  1. Start Cytoscape from command-line. You need to specify port number as a parameter (In this example, port 8888 will be opened for Command):
Line 48: Line 47:
./cytoscape.sh ./cytoscape.sh -R 8888
Line 53: Line 52:
./cytoscape.bat ./cytoscape.bat -R 8888
Line 56: Line 55:
 1.  1. Open the following URL with your web browser:
Line 58: Line 57:
{{{
}}}
    {{{
http://localhost:8888/cytoscape/commands
    }}}
Line 61: Line 61:
(TBD)  1. If yo see list of available commands, you are ready to use Command API

  {{attachment:CommandAPI.png}}
Line 64: Line 66:
===== cyREST ===== ==== cyREST ====
Line 66: Line 68:
cyREST is available from {{https://raw.githubusercontent.com/idekerlab/cyREST/master/docs/images/logo300.png}}

'''[[http://apps.cytoscape.org/apps/cyrest|cyREST]] is a language-agnostic, programmer-friendly RESTful API module for Cytoscape'''. If you want to build your own workflow with [[http://www.r-project.org/|R]], [[https://www.python.org/|Python]] or other programming languages along with Cytoscape, this is the option for you.

Currently, cyREST is available from [[App Store|http://apps.cytoscape.org/apps/cyrest]].

Programmatic Access to Cytoscape Features

In this chapter, you will learn how to use Cytoscape from command line and scripts. These features replace Scripting module in the past versions of Cytoscape.

Topics

  • Commands

  • RESTful API

    • Command REST API

    • cyREST


Background

Cytoscape has intuitive graphical user interface for interactive network data integration, analysis, and visualization. It is a great way for exploratory data analysis, but what happens if you have hundreds of data files or need to ask someone to execute your data analysis workflows? It is virtually impossible to apply same operations to hundreds of networks manually with GUI, and more importantly, although you can save your results as session files, you cannot save your workflows if your analysis is based on point-and-click GUI operation. Recording workflows is the key feature for reproducible data analysis, but it was a missing feature in past versions for Cytoscape. The latest version of Cytoscape has several options to script and automate your workflows.

Options for Programmatic Access

There are two ways to access Cytoscape programmatically: Commands and RESTful API.

Commands

  • CommandTool.png

Commands is the built-in Cytoscape feature to automate your workflow as simple script. You can learn more about this feature in this section:

RESTful API

In some cases, you may need to use fully featured programming languages, such as Python, R, Ruby, or JavaScript,

REST API for Commands

In addition to running Command scripts, Command module has REST API to access those

By default, this feature is disables. To run REST server for Commands, please follow these steps:

  1. Open a terminal session:
  2. Start Cytoscape from command-line. You need to specify port number as a parameter (In this example, port 8888 will be opened for Command):
    • For Mac/Linux
      ./cytoscape.sh -R 8888
      For Windows
      ./cytoscape.bat -R 8888
  3. Open the following URL with your web browser:
    • http://localhost:8888/cytoscape/commands
  4. If yo see list of available commands, you are ready to use Command API
    • CommandAPI.png

cyREST

https://raw.githubusercontent.com/idekerlab/cyREST/master/docs/images/logo300.png

cyREST is a language-agnostic, programmer-friendly RESTful API module for Cytoscape. If you want to build your own workflow with R, Python or other programming languages along with Cytoscape, this is the option for you.

Currently, cyREST is available from http://apps.cytoscape.org/apps/cyrest.

Debugging your workflows

(TBD)

Cytoscape_3/UserManual/ProgrammaticAccess (last edited 2016-04-26 22:22:57 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