From 06494258f6b5d307c5a9c2b43e6f6dc0cec2edb2 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Thu, 29 Feb 2024 11:49:47 +0000 Subject: [PATCH] export CONDA_PREFIX into container when using Singularity and Apptainer --- modules/local/aspera_cli/main.nf | 5 +++++ nextflow.config | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/local/aspera_cli/main.nf b/modules/local/aspera_cli/main.nf index de78a7b2..b38d17c0 100644 --- a/modules/local/aspera_cli/main.nf +++ b/modules/local/aspera_cli/main.nf @@ -18,8 +18,11 @@ process ASPERA_CLI { script: def args = task.ext.args ?: '' + def conda_prefix = ['singularity', 'apptainer'].contains(workflow.containerEngine) ? "export CONDA_PREFIX=/usr/local" : "" if (meta.single_end) { """ + $conda_prefix + ascp \\ $args \\ -i \$CONDA_PREFIX/etc/aspera/aspera_bypass_dsa.pem \\ @@ -36,6 +39,8 @@ process ASPERA_CLI { """ } else { """ + $conda_prefix + ascp \\ $args \\ -i \$CONDA_PREFIX/etc/aspera/aspera_bypass_dsa.pem \\ diff --git a/nextflow.config b/nextflow.config index 0b2abf8c..bb6b6b79 100644 --- a/nextflow.config +++ b/nextflow.config @@ -70,14 +70,6 @@ try { // Workflow specific configs includeConfig './workflows/sra/nextflow.config' -// Load nf-core/fetchngs custom profiles from different institutions. -// Warning: Uncomment only if a pipeline-specific institutional config already exists on nf-core/configs! -// try { -// includeConfig "${params.custom_config_base}/pipeline/fetchngs.config" -// } catch (Exception e) { -// System.err.println("WARNING: Could not load nf-core/config/fetchngs profiles: ${params.custom_config_base}/pipeline/fetchngs.config") -// } - profiles { debug { dumpHashes = true