Differences between revisions 1 and 2
Revision 1 as of 2012-05-18 19:27:04
Size: 3564
Editor: server2
Comment:
Revision 2 as of 2012-06-08 17:14:57
Size: 4202
Editor: server2
Comment:
Deletions are marked like this. Additions are marked like this.
Line 32: Line 32:
The default links are defined in a {{{linkout.props}}} file contained in {{{linkout.jar}}}. These links are normal java properties and can be edited by going to Edit → Preferences → Properties... . New links can be defined this way as well. New links can be defined at startup in a separate file and loaded from the command line, either by specifying a file containing the links The default links are defined in a {{{linkout.props}}} file contained in {{{linkout.jar}}}. These links are normal java properties and can be edited by going to Edit → Preferences → Properties... and selecting linkout from the box (shown below). Linkouts can be modified, added or removed using this dialog; however, also note that the modifications would not be stored in the file. To change a URL permanently, you would need to edit the linkout.prop file directly.
Line 34: Line 34:
{{{
cytoscape.sh -P new_linout.props
}}}
{{attachment:Figure2_linkout26.png}}
Line 38: Line 36:
or as individual properties In addition, new links can be defined when starting Cytoscape from command line by specifying individual properties. The formatting of the command is {{{ cytoscape.sh -P [context_menu_definition]=[link] }}}. ''context_menu_definition'' specifies the context menu for showing the linkout menu item. The structure of this defnition is "." separated and the first item needs to be either ''nodelinkouturl'' or ''edgelinkouturl''. The former will add the linkout item as a node context menu and the latter will add it as an edge context menu. The rest of the definition would define the hierarchy of the menu.

For instance this command:
Line 44: Line 44:
Any links defined on the command line will supersede the default links. will add this menu item:
Line 46: Line 46:
To remove a link from the menu simply delete the property, using Edit → Preferences → Properties... . {{attachment:Figure3_linkout26.png}}

To remove a link from the menu simply delete the property, using Edit → Preferences → Properties... and selecting '''commandline'''. Linkouts added in the command line will be available for the running instance of Cytoscape.
Line 49: Line 51:
From Cytoscape 2.6.0, you can use LinkOut from Attribute Browser. Basic functionality is the same, and the only difference is the parameter passed to the LinkOut is value in the selected cell.

{{attachment:Figure2_linkout26.png}}
In the current version of cytoscape this feature is not yet enabled.

LinkOut provides a mechanism to link nodes and edges to external web resources within Cytoscape. Right-clicking on a node or edge in Cytoscape view opens a popup menu with a list of web links.

The external links are specified in a linkout.props file which is included in the cytoscape.jar file. The defaults include a number of links such as Entrez, SGD, iHOP, and Google, as well as a number of species-specific links. In addition to the default links, users can customize the LinkOut menu and add (or remove) links by editing the linkout properties (found under Edit → Preferences → Properties...).

External links are listed as ‘key’-‘value’ pairs in the linkout.props file where key specifies the name of the link and value is the search URL. The LinkOut menus are organized in a hierarchical structure that is specified in the key. Linkout key terms specific for nodes start with the keyword nodelinkouturl, for edges this is edgelinkouturl.

For example, the following entry:

nodelinkouturl.Model Organism DB.SGD (yeast)=http://db.yeastgenome.org/cgi-bin/locus.pl?locus=%ID%

places the SGD link under the Model Organism DB submenu. This link will appear in Cytoscape as:

Figure1_linkout_Cy3.png

In a similar fashion one can added new submenus.

The %ID% string in the URL is a place-holder for the node label. When the popup menu is generated this marker is substituted with the node label. In the above example, the generated SGD link for the YPL211W protein is:

http://www.yeastgenome.org/cgi-bin/locus.fpl?locus=YPL211W

If you want to query based on a different attribute you currently need to specify a different Node Label using the VizMapper.

For edges the mechanism is much the same; however here the placeholders %ID1% and %ID2% reflect the source and target node label respectively.

Currently there is no mechanism to check whether the constructed URL query is correct and if the node label is meaningful. Similarly, there is no ID mapping between various identifiers. For example, a link to NCBI Entrez from a network that uses ensembl gene identifiers as node labels will produce a link to Entrez using ensembl ID, which results in an incorrect link. It is the user's responsibility to ensure that the node label that is used as the search term in the URL link will result in a meaningful link.

The default links are defined in a linkout.props file contained in linkout.jar. These links are normal java properties and can be edited by going to Edit → Preferences → Properties... and selecting linkout from the box (shown below). Linkouts can be modified, added or removed using this dialog; however, also note that the modifications would not be stored in the file. To change a URL permanently, you would need to edit the linkout.prop file directly.

Figure2_linkout26.png

In addition, new links can be defined when starting Cytoscape from command line by specifying individual properties. The formatting of the command is  cytoscape.sh -P [context_menu_definition]=[link] . context_menu_definition specifies the context menu for showing the linkout menu item. The structure of this defnition is "." separated and the first item needs to be either nodelinkouturl or edgelinkouturl. The former will add the linkout item as a node context menu and the latter will add it as an edge context menu. The rest of the definition would define the hierarchy of the menu.

For instance this command:

cytoscape.sh -P nodelinkouturl.yeast.SGD=http://db.yeastgenome.org/cgi-bin/locus.pl?locus\=%ID%

will add this menu item:

Figure3_linkout26.png

To remove a link from the menu simply delete the property, using Edit → Preferences → Properties... and selecting commandline. Linkouts added in the command line will be available for the running instance of Cytoscape.

Use LinkOut from Attribute Browser

In the current version of cytoscape this feature is not yet enabled.

Cytoscape_3/UserManual/Linkout (last edited 2016-04-26 22:23:25 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