cyBrowser

Core App: Add HTML Browser to Cytoscape
CyBrowser is an HTML/Javascript app for Cytoscape. It can provide a quick way to access web pages from within Cytoscape, but more importantly includes the ability to execute Cytoscape commands using special Javascript calls or **cycmd:** links in HTML A records. For example the link: <a href="cycmd:view fit content">Click to fit the content</a> Will result in the network view zooming out fit all of the content when clicked. This, in addition to Javascript methods `cybrowser.executeCyCommand(command)` and `cybrowser.executeCyCommandWithResults(command, callback)` allow interaction between the HTML web page and Cytoscape. CyBrowser provides a command interface for app authors to integrate it's functionality into their app, including the ability to add browser windows into the Results Panel. Note that because this app takes advantage of JavaFX, a relatively recent Java 8 is required, and on some Linux systems, may require the Oracle version of Java 8.

1.0.0

Works with Cytoscape 3.6

Release Notes

This version has several bug fixes and now supports the ability to add listeners for node and edge selection. The sample HTML provides an example on how to use the listeners: <html> <head> <script> function getResults(results) { alert(results); } function nodeSelectionChanged(selectedNodes) { selectionChanged("Selected Nodes", "nodeSelection", selectedNodes); } function edgeSelectionChanged(selectedEdges) { selectionChanged("Selected Edges", "edgeSelection", selectedEdges); } function selectionChanged(header, id, selection) { var obj = JSON.parse(selection); var table = "<h3>"+header+"</h3><table><tr><th>SUID</th><th>Name</th></tr>" for (var i = 0; i < obj.length; i++) { table += "<tr><td>"+obj[i]['suid']+"</td><td>"+obj[i]['name']+"</td></tr>"; } table += "</table>"; document.getElementById(id).innerHTML = table; } </script> </head> <body> <h1>Test</h1> <input type="button" onclick="cybrowser.executeCyCommand('view fit content');" value="Fit Content"/> <input type="button" onclick="cybrowser.executeCyCommandWithResults('network select nodeList=YKR026C', 'getResults');" value="Select YkR026C"/> <input type="button" onclick="cybrowser.registerSelectionListeners('nodeSelection', 'current', 'nodeSelectionChanged');" value="Register node listener"/> <input type="button" onclick="cybrowser.registerSelectionListeners('edgeSelection', 'current', 'edgeSelectionChanged');" value="Register edge listener"/> <input type="button" onclick="window.open('http://www.cgl.ucsf.edu','_blank');" value="CGL"/> <a href="cycmd:view fit content">Fit content</a> <div id="nodeSelection"> </div> <div id="edgeSelection"> </div> </body> </html> Assuming you have loaded the *Yeast Perturbation* sample session, the above HTML running in CyBrowser will allow you to register to listen for node and edge selection.

0.5.1

Works with Cytoscape 3.4

Release Notes

Fixed the switching of windows from dialog mode to results panel mode. This allows the following to work appropriately cybrowser dialog url="http://www.cytoscape.org" id=1 cybrowser show id=1 cybrowser dialog id=1 These commands will pop-up an initial CyBrowser dialog showing the cytoscape home page, then move that content into the results panel, then move it out again.

0.5

Works with Cytoscape 3.4


CYTOSCAPE 3

Version 1.0.0

Released 19 Mar 2018

Works with Cytoscape 3.6

Download Stats Click here