OMERO R Gateway
R wrapper around the OMERO Java Gateway, to enable access to OMERO via R using rJava.
Install the romero.gateway R package
Download the latest romero.gateway version which is compatible with your OMERO server version from the Release page
|OMERO version||romero.gateway version|
|5.6, 5.5||>= 0.4.8|
Download the zip package.
In RStudio "Install Packages" use option "Install from:" "Package Archive File" and select the romero.gateway zip file.
Alternatively: In R console run
install.packages("https://github.com/ome/rOMERO-gateway/releases/download/vx.x.x/romero.gateway_x.x.x.zip", repos = NULL)
See Tips for Windows users section if you are running into difficulties.
Unix / OSX
Download the tar.gz package.
In RStudio "Install Packages" use option "Install from:" "Package Archive File" and select the romero.gateway tar.gz file.
Alternatively: In R console run
install.packages("https://github.com/ome/rOMERO-gateway/releases/download/vx.x.x/romero.gateway_x.x.x.tar.gz", type='source', repos = NULL)
See Tips for Unix users section if you are running into difficulties.
Docker / Jupyter
With Docker and Jupyter there is a quick and easy way to get an R OMERO enviroment set up and running in your browser. Ideal to quickly try out some snippets. Go to jupyter directory and see the instructions there.
- Like any other R package load the package
- Try some examples from the examples directory
- Another potential source of examples is the unit tests directory: tests/testthat
Build from source
This allows you to install a custom version or build from a custom branch.
Use the install.R script:
curl -o install.R https://raw.githubusercontent.com/ome/rOMERO-gateway/master/install.R Rscript install.R
This will build and install the current master branch by default. But you can specify a particular branch or version to build or perform a local build of the cloned repository. Run
Rscript install.R --help to see more details.
- Clone this Github repository
git clone https://github.com/ome/rOMERO-gateway.git
- Cd into the directory and start R console
- Load devtools library
- Build the package
- Install testthat
- Spin up an OMERO server to test against
- Adjust and run test-data script to populate the test server
- Adjust setup.csv to match your test server setup (mostly
omero.hostetc; the various ids should be ok if you used the
test-datascript to populate the server)
Tips for Unix users
Before installing the
rJava package you probably have to set up Java for R first:
# as root export $JAVA_HOME=[path to JDK/JRE] R CMD javareconf
In order to build/install some necessary R packages, additional system libraries may
have to be installed first. E.g. the R packages
xml2 need the development libraries for
xml2, so for example on a Debian system you probably have to install
If you can't install an R package due to compile errors, most likely you are missing a development
package of some dependent library on your system.
Tips for Windows users
You need to have a Java SDK installed. Latest version which is supported is 11. Download for example the Adopt OpenJDK 11 from https://adoptopenjdk.net/
rJava as well as the additional dependencies for the R gateway
jpeg from CRAN. Finally install the
romero-gateway from the zip file.