diff --git a/modules/local/dryclean/main.nf b/modules/local/dryclean/main.nf index b3727de..997ea7a 100644 --- a/modules/local/dryclean/main.nf +++ b/modules/local/dryclean/main.nf @@ -34,6 +34,7 @@ process DRYCLEAN { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ + #!/bin/bash set -o allexport # Check if the environment has the module program installed if command -v module &> /dev/null @@ -59,12 +60,12 @@ process DRYCLEAN { set +x ## find R installation and dryclean exec - echo "USING LIBRARIES: $(Rscript -e 'print(.libPaths())')" - export drycleanPath=$(Rscript -e 'cat(suppressWarnings(find.package("dryclean")))') + echo "USING LIBRARIES: \$(Rscript -e 'print(.libPaths())')" + export drycleanPath=\$(Rscript -e 'cat(suppressWarnings(find.package("dryclean")))') export drycln=$drycleanPath/extdata/drcln echo $drycln set +x - CMD="Rscript $drycln $@" + CMD="Rscript $drycln \$@" if [ ! -s ./drycleaned.cov.rds ]; then if ! { echo "Running:" && echo "${CMD}" && eval ${CMD}; }; then diff --git a/modules/local/jabba/main.nf b/modules/local/jabba/main.nf index 1167f59..14ef678 100644 --- a/modules/local/jabba/main.nf +++ b/modules/local/jabba/main.nf @@ -60,6 +60,8 @@ process JABBA { // e.g. https://github.com/nf-core/modules/blob/master/modules/nf-core/homer/annotatepeaks/main.nf // Each software used MUST provide the software name and version number in the YAML version file (versions.yml) """ + #!/bin/bash + set -o allexport # Check if the environment has the module program installed @@ -86,17 +88,17 @@ process JABBA { R_PROFILE_USER="/dev/null" ## find R installation - echo "USING LIBRARIES: $(Rscript -e 'print(.libPaths())')" + echo "USING LIBRARIES: \$(Rscript -e 'print(.libPaths())')" - export jabPath=$(Rscript -e 'cat(suppressWarnings(find.package("JaBbA")))') + export jabPath=\$(Rscript -e 'cat(suppressWarnings(find.package("JaBbA")))') export jba=$jabPath/extdata/jba echo $jba set +x - export cmd="Rscript $jba $@" + export cmd="Rscript $jba \$@" - { echo "Running:" && echo "$(echo $cmd)" && echo && eval $cmd; } - cmdsig=$? + { echo "Running:" && echo "\$(echo $cmd)" && echo && eval $cmd; } + cmdsig=\$? if [ "$cmdsig" = 0 ]; then echo "Finish!" else @@ -110,7 +112,7 @@ process JABBA { stub: prefix = task.ext.prefix ?: "${meta.id}" def VERSION = '1.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - + """ touch jabba.simple.rds touch jabba.simple.gg.rds