Quick Links
Current Apps (3.x)
Typographic Conventions
Mouse buttonCyBrowser is a Cytoscape 3 app that provides an HTML/Javascript browser dialog or results panel. The app is intended to be used primarily as an adjunct for other apps, but may also be used directly by users. CyBrowser has two unique features that provide for integration with Cytoscape:
<a href="cycmd:view fit content">Click to fit the content</a>will execute the Cytoscape "view fit content" command when the user clicks on the link.
<input type="button" onclick="cybrowser.executeCyCommand('view fit content');" value="Fit content"/>
will execute the Cytoscape "view fit content" command when the user clicks on the button.
<html>
<head>
<script>
function getResults(results) {
alert("Networks: "+results);
}
</script>
</head>
<body>
<h1>Test</h1>
<input type="button" onclick="cybrowser.executeCyCommandWithResults('network list', 'getResults');" value="List networks"/>
</body>
</html>
After the execution of the network list command, the getResults method will be called with
the actual results from the command. In this case, we've just used the alert method to display
those results, but more sophisticated applications could write the results into the HTML or process it
in some manner, including calling additional Cytoscape commands. While currently, the
return values are limited to strings, in the future,
this will be expanded to also support JSON representations of Cytoscape command results.
Also note that the UserAgent string returned by CyBrowser includes the string CyBrowser/version where version is the App version. This allows web sites to determine if CyBrowser is the user agent. The current user agent is:
User agent = Mozilla/5.0 (Linux x86_64) AppleWebKit/602.1 (KHTML, like Gecko) JavaFX/8.0 Safari/602.1 CyBrowser/0.5.0
CyBrowser provides a single interface for users and three commands that may be used for scripting or by apps through the Cytoscape command mechanism. The user may initiate a CyBrowser dialog by using the Apps→CyBrowser→Launch Cytoscape web browser menu. This will bring up a simple text box that the user can use to enter a URL. This will bring up the browser as shown in Figure 1. The default browser has very simple controls:
In addition to the simple browser interface provided to the user, CyBrowser also supports three commands to control browser windows and utility command to get the version of the app. The commands currently supported are:
About RBVI | Projects | People | Publications | Resources | Visit Us
Copyright 2018 Regents of the University of California. All rights reserved.