← Revision 2 as of 2010-07-01 05:32:03
Size: 841
Comment:
|
← Revision 3 as of 2010-07-01 05:58:19 →
Size: 1851
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 10: | Line 10: |
* [[https://wiki.nbic.nl/index.php/CytoscapeRPC|CytoscapeRPC Plugin 0.95 or later]]. Just copy the jar file to Cytoscape plugin directory. |
Just copy the following jar files to Cytoscape plugin directory. * [[https://wiki.nbic.nl/index.php/CytoscapeRPC|CytoscapeRPC Plugin 0.95 or later]]. * [[http://www.ecoficial.com/apachemirror/ws/xmlrpc/|Apache XML RPC library]] * Required files are in '''lib''' directory: xmlrpc-common-3.1.3.jar, xmlrpc-server-3.1.3.jar, ws-commons-util-1.0.2.jar |
Line 17: | Line 20: |
1. Start Cytoscape. 1. '''''Plugins-->''''' |
=== Start Cytoscape RPC === 1. Start Cytoscape. If you want to see the all messages (including Exceptions from CytoscapeRPC plugin), start Cytoscape from command line (by executing '''''cytoscape.sh''''' or '''''cytoscape.bat''''') 1. Select '''''Plugins-->CytoscapeRPC-->Activate RPC''''' 1. Modify port number if necessary. Default port is 9000. === Start R === 1. Start R console 1. Load required libraries {{{ > library(igraph) > library(XMLRPC) }}} 1. Test RPC Plugin. {{{ > testResponse = xml.rpc('http://localhost:9000', 'Cytoscape.test') > testResponse [1] "It works!" }}} === Create Network with igraph and Visualize It in Cytoscape === 1. Create an empty network. {{{ > networkID = xml.rpc('http://localhost:9000', 'Cytoscape.createNetwork', 'R-Cytoscape Test') > networkID [1] "2" }}} |
Control Cytoscape from R Console
Introduction
CytoscapeRPC is a plugin for Cytoscape to use Cytoscape as a RPC server. You can call Cytoscape functions from variety of languages including Perl, Python, Ruby, and R. In this tutorial, you learn how to use Cytoscape from R console.
Setup
You need to install the following plugins/packages.
Cytoscape Plugin
Just copy the following jar files to Cytoscape plugin directory.
Required files are in lib directory: xmlrpc-common-3.1.3.jar, xmlrpc-server-3.1.3.jar, ws-commons-util-1.0.2.jar
R Packages
XML-RPC package XMLRPC_0.2-mod.zip (Bug fix version by Paul Shannon. BSD License)
igraph graph utility package
Tutorial
Start Cytoscape RPC
Start Cytoscape. If you want to see the all messages (including Exceptions from CytoscapeRPC plugin), start Cytoscape from command line (by executing cytoscape.sh or cytoscape.bat)
Select Plugins-->CytoscapeRPC-->Activate RPC
- Modify port number if necessary. Default port is 9000.
Start R
- Start R console
- Load required libraries
> library(igraph) > library(XMLRPC)
- Test RPC Plugin.
> testResponse = xml.rpc('http://localhost:9000', 'Cytoscape.test') > testResponse [1] "It works!"
Create Network with igraph and Visualize It in Cytoscape
- Create an empty network.
> networkID = xml.rpc('http://localhost:9000', 'Cytoscape.createNetwork', 'R-Cytoscape Test') > networkID [1] "2"