nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Allow to use environment variables at parameters

Open jordeu opened this issue 2 years ago • 0 comments

Description

Current implementation only allows to use baseDir, projectDir, launchDir and secrets at the parameters file or from the command line.

This pull request adds also the option to access the environment variable available at config scope. They can be referenced using the prefix env., like ${env.MY_ENV_VAR}.

Usage

Example on how to use it:

$ cat ../params.yml 
outdir: ${env.NXF_WORK}/results_workdir

$ ./launch.sh run nextflow-io/rnatoy -params-file ~/tmp/params.yml -e.NXF_WORK=/home/jordeu/tmp/nextflow -with-docker

jordeu avatar Nov 22 '21 05:11 jordeu