|
|
Note: These instructions assume a Linux operating system. They've been shown to also work for macOS Sierra but haven't been tested on Windows or recent macOS systems.
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
The IDE needs a computer with an [R environment version >=3.5.0](https://www.r-project.org/). The IDE requires some R packages and will try to install them if it can't detect them on the system. In case of problems, it may be better to install the required packages manually.
|
|
|
Before using the app, check that the data conforms to the structure laid out in [Preparing the data for use with the IDE](./Preparing the data for use with the IDE) page.
|
|
|
|
|
|
If you're experiencing problems, please check the [known issues and troubleshooting](./Known issues and troubleshooting) page before [submitting a new issue](https://git.embl.de/heriche/image-data-explorer/-/issues)
|
|
|
|
|
|
|
|
|
### Java and R
|
|
|
The IDE needs a computer with an [R environment version >=3.5.0](https://www.r-project.org/) as well as a Java runtime environment version 8 or above. To compile R packages, C and FORTRAN compilers as well as a number of development libraries and tools are needed. It makes things easier if they are all installed system-wide in default locations using administrative privileges.
|
|
|
|
|
|
##### For Linux
|
|
|
1. Install Java using your system's package manager. On Debian derivatives (e.g. Ubuntu), run:
|
|
|
|
|
|
```
|
|
|
sudo apt install default-jre default-jdk
|
|
|
```
|
|
|
2. Install R
|
|
|
Again you can use your system's package manager directly:
|
|
|
|
|
|
```
|
|
|
sudo apt install build-essential r-base
|
|
|
```
|
|
|
The build-essential package contains the GNU compiler collection and various tools and development libraries that are required to build R packages.
|
|
|
|
|
|
3. Install required system libraries.
|
|
|
R packages used by the IDE require the following libraries: libssl, liblzma, libbz2, libicu, libtiff, libfftw3, libcurl4 with OpenSSL support, libxml2, libssh2-1 and libgit2. On Debian derivatives, run:
|
|
|
|
|
|
```
|
|
|
sudo apt install libssl-dev liblzma-dev libbz2-dev libicu-dev libtiff-dev libfftw3-dev libcurl4-openssl-dev libxml2-dev libssh2-1-dev libgit2-dev
|
|
|
```
|
|
|
|
|
|
##### For Windows (version 10 and above)
|
|
|
|
|
|
Note: The IDE is not tested on Windows. These instructions are provided on a best effort basis.
|
|
|
|
|
|
1. Install Java (administrative privileges required):
|
|
|
- Go to https://java.com/en/download/manual.jsp and select the 'Windows Offline (64-bit)' installer
|
|
|
- After downloading, run the installer using the default options.
|
|
|
|
|
|
2. Go to https://cran.r-project.org/, select 'Download R for Windows' then 'base' then click the link 'Download R-x.x.x for Windows' (where R-x.x.x is R-4.2.1 as of this writing).
|
|
|
|
|
|
3. Install RTools which contains the resources to build R packages for Windows:
|
|
|
- Go to https://cran.r-project.org/, click on 'Download R for Windows', then 'Rtools', and select the latest version of RTools (RTools 4.2 as of this writing).
|
|
|
- Run the installer and select the default options.
|
|
|
|
|
|
|
|
|
### R packages
|
|
|
The IDE requires some R packages and will try to install them if it can't detect them on the system. In case of problems, it may be better to install the required packages manually.
|
|
|
The IDE requires the following packages from CRAN: devtools, data.table, DT, shiny, shinyFiles, shinycssloaders, shinydashboard, shinyjs, shinyWidgets, shinybusy, assertthat, ggplot2, plotly, RANN, MASS, dbscan, uwot, xgboost, Ckmeans.1d.dp, e1071, caret, RColorBrewer, aws.s3.
|
|
|
|
|
|
From within an R console, install with:
|
|
|
|
|
|
```
|
|
|
> install.packages("devtools", "data.table", "DT", "shiny", "shinyFiles", "shinycssloaders", "shinydashboard", "shinyjs", "shinyWidgets", "shinybusy", "assertthat", "ggplot2", "plotly", "RANN", "MASS", "dbscan", "uwot", "xgboost", "Ckmeans.1d.dp", "e1071", "caret", "RColorBrewer", "aws.s3")
|
|
|
install.packages("devtools", "data.table", "DT", "shiny", "shinyFiles", "shinycssloaders", "shinydashboard", "shinyjs", "shinyWidgets", "shinybusy", "assertthat", "ggplot2", "plotly", "RANN", "MASS", "dbscan", "uwot", "xgboost", "Ckmeans.1d.dp", "e1071", "caret", "RColorBrewer", "aws.s3")
|
|
|
```
|
|
|
|
|
|
and from Bioconductor: EBImage and RBioFormats
|
|
|
From within an R console, install with:
|
|
|
|
|
|
```
|
|
|
> install.packages("BiocManager")
|
|
|
> BiocManager::install("EBImage")
|
|
|
> BiocManager::install("aoles/RBioFormats")
|
|
|
install.packages("BiocManager")
|
|
|
BiocManager::install("EBImage")
|
|
|
BiocManager::install("aoles/RBioFormats")
|
|
|
```
|
|
|
|
|
|
* * *
|
... | ... | @@ -33,21 +77,20 @@ The IDE is accessible at https://shiny-portal.embl.de under 'Data analysis tools |
|
|
Open a terminal, download the code from the project's repository and run it from within the project directory:
|
|
|
|
|
|
```
|
|
|
> git clone https://git.embl.de/heriche/image-data-explorer.git
|
|
|
> cd image-data-explorer
|
|
|
> R -e 'shiny::runApp("image_data_explorer.R", host = "0.0.0.0", port = 5476)'
|
|
|
git clone https://git.embl.de/heriche/image-data-explorer.git
|
|
|
cd image-data-explorer
|
|
|
R -e 'shiny::runApp("image_data_explorer.R", host = "0.0.0.0", port = 5476)'
|
|
|
```
|
|
|
|
|
|
The app is then accessible from a web browser (on the same machine the app was started on) at http://127.0.0.1:5476
|
|
|
|
|
|
### Using RStudio
|
|
|
|
|
|
Alternatively, download the project's directory as a zip archive ([latest version](https://git.embl.de/heriche/image-data-explorer/-/archive/master/image-data-explorer-master.zip)) and unpack the archive. Start RStudio, navigate to the project's directory using RStudio's file browser and open the file image_data_explorer.R then click the 'Run App' button. The app is accessible from a web browser (on the same machine RStudio is running on) at http://127.0.0.1:5476
|
|
|
1- [Download RStudio](https://www.rstudio.com/products/rstudio/download/#download). Install using your system installation procedure. If presented with options, choose default values.
|
|
|
|
|
|
2- Download the project's directory as a zip archive ([latest version](https://git.embl.de/heriche/image-data-explorer/-/archive/master/image-data-explorer-master.zip)) and unpack the archive.
|
|
|
|
|
|
Before using the app, check that the data conforms to the structure laid out in [Preparing the data for use with the IDE](./Preparing the data for use with the IDE) page.
|
|
|
|
|
|
If you're experiencing problems, please check the [known issues and troubleshooting](./Known issues and troubleshooting) page before [submitting a new issue](https://git.embl.de/heriche/image-data-explorer/-/issues)
|
|
|
3- Start RStudio, navigate to the project's directory using RStudio's file browser and open the file image_data_explorer.R then click the 'Run App' button. The app is accessible from a web browser (on the same machine RStudio is running on) at http://127.0.0.1:5476
|
|
|
|
|
|
|
|
|
## Building and running the app in a container
|
... | ... | @@ -57,11 +100,11 @@ From a terminal: |
|
|
- Navigate to the directory containing the Dockerfile
|
|
|
- Build the container (be patient, this may take a while) with
|
|
|
```
|
|
|
> sudo docker build --rm -t image-data-explorer .
|
|
|
sudo docker build --rm -t image-data-explorer .
|
|
|
```
|
|
|
- Run the app in the container with:
|
|
|
```
|
|
|
> sudo docker run --rm -p 5476:5476 -v /user/home/dir:/data image-data-explorer
|
|
|
sudo docker run --rm -p 5476:5476 -v /user/home/dir:/data image-data-explorer
|
|
|
```
|
|
|
Replace /user/home/dir with the path to your user's home directory or any other directory under which the image root directory resides. This is necessary to make the image root directory accessible to the app.
|
|
|
The app can then be accessed from a web browser on the same machine at http://127.0.0.1:5476
|
... | ... | |