Table 4.
Important! The command line arguments have changed in version 2.3, so please read this section carefully. |
Cytoscape recognizes a number of optional command line arguments, including run-time specification of network files, attribute files, and session files. This is the output generated when the cytoscape is executed with the "-h" or "--help" flag.
usage: java -Xmx512M -jar cytoscape.jar [OPTIONS] -h,--help Print this message. -v,--version Print the version number. -s,--session <file> Load a cytoscape session (.cys) file. -N,--network <file> Load a network file (any format). -e,--edge-attrs <file> Load an edge attributes file (edge attribute format). -n,--node-attrs <file> Load a node attributes file (node attribute format). -m,--matrix <file> Load a node attribute matrix file (table). -p,--plugin <file> Load a plugin jar file, directory of jar files, plugin class name, or plugin jar URL. -P,--props <file> Load cytoscape properties file (Java properties format) or individual property: -P name=value. -V,--vizmap <file> Load vizmap properties file (Java properties format).
Any file specified for an option may be specified as either a path or as a URL. For example you can specify a network as a file (assuming that myNet.sif exists in the curret working directory): cytoscape.sh -N myNet.sif. Or you can specify a network as a URL: cytoscape.sh -N http://example.com/myNet.sif.
Table 5.
Argument | Description |
-h,--help | This flag generates the help output you see above and exits. |
-v,--version | This flag prints the version number of cytoscape and exits. |
-s,--session <file> | This option specifies a session file to be loaded. Since only one session file can be loaded at a given time, this option may only specified once on a given command line. The option expects a .cys cytoscape session file. It is customary, although not necessary, for session file names to contain the .cys extension. |
-N,--network <file> | This option is used to load all types of network files. SIF, GML, and XGMML files can all be loaded using the -N option. You can specify as many networks as desired on a single command line. |
-e,--edge-attrs <file> | This option specifies an edge attributes file. You may specify as many edge attribute files as desired on a single command line. |
-n,--node-attrs <file> | This option specifies a node attributes file. You may specify as many node attribute files as desired on a single command line. |
-m,--matrix <file> | This option specifies a data matrix file. In a biological context, the data matrix consists of expression data. All data matrix files are read into node attributes. You may specify as many data matrix files as desired on a single command line. |
-p,--plugin <file> | This option specifies a cytoscape plugin (.jar) file to be loaded by cytoscape. This option also subsumes the previous "resource plugin option". You may specify a class name that identifies your plugin and the plugin will be loaded if the plugin is in Cytoscape's CLASSPATH. For example, assuming that the class MyPlugin can be found in the CLASSPATH, you could specify the plugin like: cytoscape.sh -p MyPlugin.class. A final means of specifying plugins is to specify a file name who's contents contain a list of plugin jar files. |
-P,--props <file> | This option specifies cytoscape properties. Properties can be specified either as a properties file (in Java's standard properties format), or as individual properties. To specify individual properties, you must specify the property name followed by the property value where the name and value are separated by the '=' sign. For example to specify the defaultSpeciesName: cytoscape.sh -P defaultSpeciesName=Human. If you would like to include spaces in your property, simply enclose the name and value in quotation marks: cytoscape.sh -P "defaultSpeciesName=Homo Sapiens". The property option subsumes previous options -noCanonicalization, -species, and -bioDataServer. Now it would look like: cytoscape.sh -P defaultSpeciesName=Human -P noCanonicalization=true -P bioDataServer=myServer. |
-V,--vizmap <file> | This option specifies a visual properties file. |
Aside from plugins, all options described above can be loaded from the GUI once cytoscape is running.
Additional command line arguments that are not recognized by the Cytoscape core are passed to the PlugIn modules. Please refer to the documentation for each specific PlugIn for more details.
Table 6.
Important! If you have used previous versions of Cytoscape, you will notice that handling of properties has changed. The most important change is that properties are no longer saved by default to the current directory or to your home .cytoscape directory. Properties are stored by default in Cytoscape Session files. The cytoscape.props file still exists in the .cytoscape directory but is only written to when the user explicitly requests that the current settings be made the defaults for all future sessions of Cytoscape. Unless you have something important in your .cytoscape/cytoscape.props file, your best bet will be to delete the file and use the defaults. |
The Cytoscape Preferences Dialog, accessed via Edit → Preferences…, has sections for general properties display/editing and plugins specification via the properties mechanism. Preferences are now stored in Cytoscape session files. Any changes made to properties while running Cytoscape will be saved to the current session when you save the session. If you do not save the session, export the properties (File → Export), or set them as defaults (see below), the properties will be lost and the next time Cytoscape starts, defaults will be used.
Cytoscape properties are displayed in the Properties section of the dialog. These properties are configurable via Add, Modify and Delete operations.
Some common properties are described below.
Table 7.
Property name | Default value | Valid values |
defaultSpeciesName | Species name. This value must match the name in the first line of the file specified in the bioDataServer’s manifest for synonyms e.g., for yeast synonyms, specify Saccharomyces cerevisiae | |
bioDataServer | annotation/manifest, and other manifest file locations | |
viewThreshold | 10000 | integer > 0 |
secondaryViewThreshold | 30000 | integer > 0 |
viewType | tabbed | tabbed |
plugins | comma-separated list of jar files containing plugins, or URL’s to jar files containing plugins (e.g., http://server/my-plugin.jar) | |
defaultWebBrowser | A path to the web browser on your system. This only needs to be specified if Cytoscape can’t find the web browser on your system. |
The specification of plugins to be loaded into Cytoscape at startup time is also supported in cytoscape.props and accessible in this dialog under the Plugins section. In this special case, the plugins property specifies a comma-separated list of jar files or URLs to jar files containing plugins. This property is parsed and presented and managed in the Plugins table, as at left.
Setting Default Properties It is possible to alter the default properties for Cytoscape. In the Cytoscape Preferences Dialog, accessed via Edit → Preferences…, edit any preferences, then click the "Make Current Cytoscape Properties Default" checkbox in the "Default Cytoscape Properties" section of the dialog. This will save any properties to the .cytoscape directory contained in your home directory. You should only do this if you want specific properties to apply to all of your Cytoscape sessions. You can rely on the Cytoscape session file to maintain the properties used for that particular session, so making certain properties default is not necessary to save the properties.