We are merging all r2cytoscape functionality into a refactored RCy3 v2.0. No further development will be taking place on this codebase; all future development is focused on the new RCy3 effort:
https://github.com/cytoscape/RCy3
Functions for Cytoscape Automation in R
For a quick start, see check-cytoscape-connection.R. This example creates a network from a list of nodes and edges, and then maps node and edge attribute data to various visual properties.
You can edit or add new functions to the r2cytoscape package by making pull requests to this repository. Here are some helpful notes to keep in mind:
Do not edit the man/*.Rd files or NAMESPACE file directly. They are automatically generated by roxygen2. Simply edit the R/*.R files to supply documentation annotations.
To rebuild the documentation after making edits to the .R files, run devtools::document()
or in RStudio, open the r2cytoscape project (upper right toolbar) and then use the Build menu options.
Provide base.url='http://localhost:1234/v1'
as an optional arg at the end.
Provide network='current'
and network.viewid='current'
as optional args towards the end, if needed. And then make use of getNetworkSuid(), getNetworkName() and getNetworkViewId() accordingly to retrieve IDs (or names) for current network and view.
As always, position required args before options args to allow efficient function calls
Testing: you can run devtools::test()
at any time. Make sure you have Cytoscape running, otherwise the tests will be skipped!
Run devtools::check()
at the end of your development, prior to making any pull requests.
Refer to the issues for functions to be developed to help prioritize your work and choose harmonous function names and args. Thanks!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.