Skip to content

Commit

Permalink
export CONDA_PREFIX into container when using Singularity and Apptainer
Browse files Browse the repository at this point in the history
  • Loading branch information
drpatelh committed Feb 29, 2024
1 parent 03ac573 commit 0649425
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 5 additions & 0 deletions modules/local/aspera_cli/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\
Expand All @@ -36,6 +39,8 @@ process ASPERA_CLI {
"""
} else {
"""
$conda_prefix
ascp \\
$args \\
-i \$CONDA_PREFIX/etc/aspera/aspera_bypass_dsa.pem \\
Expand Down
8 changes: 0 additions & 8 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0649425

Please sign in to comment.