Skip to content

Latest commit

 

History

History
81 lines (59 loc) · 3.7 KB

README.md

File metadata and controls

81 lines (59 loc) · 3.7 KB

CHUV DockerHub ImageVersion ImageLayers

ggparci Docker for MIP

Usage

  docker run --rm --env [list of environment variables] hbpmip/r-ggparci:latest compute

where the environment variables are:

  • Input Parameters (for ggparci):
    • PARAM_query : SQL query producing the dataframe to analyse
    • PARAM_variables : the grouping variable
    • PARAM_covariables : The variables to be ploted in the parallel coordinates plot.
  • Execution context:
    • JOB_ID : ID of the job
    • NODE : Node used for the execution of the script
    • IN_DBI_DRIVER : Class name of the DBI driver for input data
    • IN_DBI_DBNAME : Database name for the database connection for input data
    • IN_DBI_HOST : Host name for the database connection for input data
    • IN_DBI_PORT : Port number for the database connection for input data
    • IN_DBI_PASSWORD : Password for the database connection for input data
    • IN_DBI_USER : User for the database connection for input data
    • OUT_DBI_DRIVER : Class name of the DBI driver for output data
    • OUT_DBI_DBNAME : Database name for the database connection for output data
    • OUT_DBI_HOST : Host name for the database connection for output data
    • OUT_DBI_PORT : Port number for the database connection for output data
    • OUT_DBI_USER : User for the database connection for output data
    • OUT_DBI_PASSWORD : Password for the database connection for output data

Development process

The goal of this project is to create a Docker image containing the full R environment capable of:

  1. Read parameters from the environment and connect to a database
  2. Query the database and prepare the data
  3. Run the algorithm
  4. Format the results into a format that can be easily shared. Here, svg or html.
  5. Save the results into the result database.

The Docker image contains an R script at /src/main.R as well as all libraries and files that this script depends on.

The following scripts are provided to help you:

./build.sh

The main build script, it packages this project into a Docker image and performs the tests. It requires captain and Docker engine to run. If you cannot install captain on your platform, you may use the following commands to build the project:

  captain build
  # or
  docker build -t hbpmip/r-ggparci .

./dev.sh

This script provides R runtime executed inside a Docker container. It also starts an input database and a result database.

./tests/test.sh

This script performs the tests. It assumes that the image has been built before using ./build.sh

It executes the Docker image, starts an input database and a result database, then executes the algorithm using sample data for training.

You can run the tests with the command:

  ./tests/test.sh