diff --git a/CHANGELOG.md b/CHANGELOG.md index a2918e702c..daada653d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- [#1339](https://github.com/nf-core/sarek/pull/1339) - Update sentieon-modules + ### Fixed - [#1334](https://github.com/nf-core/sarek/pull/1334) - Remove extra v, when reporting tower runs on slack diff --git a/modules.json b/modules.json index dd5387fbb8..93e8ba3812 100644 --- a/modules.json +++ b/modules.json @@ -391,42 +391,42 @@ }, "sentieon/applyvarcal": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "89b6873f15dd31ed17f4d10ede2fa623e2a128ff", "installed_by": ["modules"] }, "sentieon/bwamem": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "89b6873f15dd31ed17f4d10ede2fa623e2a128ff", "installed_by": ["modules"] }, "sentieon/dedup": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "89b6873f15dd31ed17f4d10ede2fa623e2a128ff", "installed_by": ["modules"] }, "sentieon/dnamodelapply": { "branch": "master", - "git_sha": "214d575774c172062924ad3564b4f66655600730", + "git_sha": "89b6873f15dd31ed17f4d10ede2fa623e2a128ff", "installed_by": ["modules"] }, "sentieon/dnascope": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "89b6873f15dd31ed17f4d10ede2fa623e2a128ff", "installed_by": ["modules"] }, "sentieon/gvcftyper": { "branch": "master", - "git_sha": "214d575774c172062924ad3564b4f66655600730", + "git_sha": "89b6873f15dd31ed17f4d10ede2fa623e2a128ff", "installed_by": ["modules"] }, "sentieon/haplotyper": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "89b6873f15dd31ed17f4d10ede2fa623e2a128ff", "installed_by": ["modules"] }, "sentieon/varcal": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "89b6873f15dd31ed17f4d10ede2fa623e2a128ff", "installed_by": ["modules"] }, "snpeff/download": { diff --git a/modules/nf-core/sentieon/applyvarcal/environment.yml b/modules/nf-core/sentieon/applyvarcal/environment.yml index b7b5169a89..c4c11b1f85 100644 --- a/modules/nf-core/sentieon/applyvarcal/environment.yml +++ b/modules/nf-core/sentieon/applyvarcal/environment.yml @@ -3,3 +3,5 @@ channels: - conda-forge - bioconda - defaults +dependencies: + - bioconda::sentieon=202308.01 diff --git a/modules/nf-core/sentieon/applyvarcal/main.nf b/modules/nf-core/sentieon/applyvarcal/main.nf index 4e63b94ce4..304d0a0431 100644 --- a/modules/nf-core/sentieon/applyvarcal/main.nf +++ b/modules/nf-core/sentieon/applyvarcal/main.nf @@ -5,7 +5,10 @@ process SENTIEON_APPLYVARCAL { secret 'SENTIEON_LICENSE_BASE64' - container 'nf-core/sentieon:202112.06' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' : + 'biocontainers/sentieon:202308.01--h43eeafb_0' }" input: tuple val(meta), path(vcf), path(vcf_tbi), path(recal), path(recal_index), path(tranches) @@ -21,10 +24,15 @@ process SENTIEON_APPLYVARCAL { task.ext.when == null || task.ext.when script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' @@ -47,6 +55,8 @@ process SENTIEON_APPLYVARCAL { echo "Decoded and exported Sentieon test-license system environment variables" fi + $fix_ld_library_path + sentieon driver -r ${fasta} --algo ApplyVarCal \\ -v $vcf \\ --recal $recal \\ @@ -61,12 +71,19 @@ process SENTIEON_APPLYVARCAL { """ stub: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def prefix = task.ext.prefix ?: "${meta.id}" """ + $fix_ld_library_path + touch ${prefix}.vcf.gz touch ${prefix}.vcf.gz.tbi diff --git a/modules/nf-core/sentieon/bwamem/environment.yml b/modules/nf-core/sentieon/bwamem/environment.yml index efd460cfa4..c090bfa5ae 100644 --- a/modules/nf-core/sentieon/bwamem/environment.yml +++ b/modules/nf-core/sentieon/bwamem/environment.yml @@ -3,3 +3,5 @@ channels: - conda-forge - bioconda - defaults +dependencies: + - bioconda::sentieon=202308.01 diff --git a/modules/nf-core/sentieon/bwamem/main.nf b/modules/nf-core/sentieon/bwamem/main.nf index b58835fda5..e25515e7eb 100644 --- a/modules/nf-core/sentieon/bwamem/main.nf +++ b/modules/nf-core/sentieon/bwamem/main.nf @@ -5,7 +5,10 @@ process SENTIEON_BWAMEM { secret 'SENTIEON_LICENSE_BASE64' - container 'nf-core/sentieon:202112.06' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' : + 'biocontainers/sentieon:202308.01--h43eeafb_0' }" input: tuple val(meta), path(reads) @@ -21,10 +24,15 @@ process SENTIEON_BWAMEM { task.ext.when == null || task.ext.when script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' @@ -47,6 +55,8 @@ process SENTIEON_BWAMEM { echo "Decoded and exported Sentieon test-license system environment variables" fi + $fix_ld_library_path + INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` sentieon bwa mem \\ @@ -64,8 +74,19 @@ process SENTIEON_BWAMEM { """ stub: + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' + } + def prefix = task.ext.prefix ?: "${meta.id}" """ + $fix_ld_library_path + touch ${prefix}.bam touch ${prefix}.bam.bai diff --git a/modules/nf-core/sentieon/dedup/environment.yml b/modules/nf-core/sentieon/dedup/environment.yml index bda2b1385a..622cf73909 100644 --- a/modules/nf-core/sentieon/dedup/environment.yml +++ b/modules/nf-core/sentieon/dedup/environment.yml @@ -3,3 +3,5 @@ channels: - conda-forge - bioconda - defaults +dependencies: + - bioconda::sentieon=202308.01 diff --git a/modules/nf-core/sentieon/dedup/main.nf b/modules/nf-core/sentieon/dedup/main.nf index c83d5e552a..01ee885a17 100644 --- a/modules/nf-core/sentieon/dedup/main.nf +++ b/modules/nf-core/sentieon/dedup/main.nf @@ -5,7 +5,10 @@ process SENTIEON_DEDUP { secret 'SENTIEON_LICENSE_BASE64' - container 'nf-core/sentieon:202112.06' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' : + 'biocontainers/sentieon:202308.01--h43eeafb_0' }" input: tuple val(meta), path(bam), path(bai) @@ -26,10 +29,15 @@ process SENTIEON_DEDUP { task.ext.when == null || task.ext.when script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def args3 = task.ext.args3 ?: '' @@ -58,6 +66,8 @@ process SENTIEON_DEDUP { echo "Decoded and exported Sentieon test-license system environment variables" fi + $fix_ld_library_path + sentieon driver $args $input_list -r ${fasta} --algo LocusCollector $args2 --fun score_info ${prefix}.score sentieon driver $args3 -t $task.cpus $input_list -r ${fasta} --algo Dedup $args4 --score_info ${prefix}.score --metrics ${metrics} ${prefix}${suffix} # This following tsv-file is produced in order to get a proper tsv-file with Dedup-metrics for importing in MultiQC as "custom content". @@ -71,8 +81,19 @@ process SENTIEON_DEDUP { """ stub: + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' + } + def prefix = task.ext.prefix ?: "${meta.id}" """ + $fix_ld_library_path + touch ${prefix}.cram touch ${prefix}.cram.crai touch ${prefix}.metrics diff --git a/modules/nf-core/sentieon/dnamodelapply/environment.yml b/modules/nf-core/sentieon/dnamodelapply/environment.yml index 3f92a79ab8..6d27d44a1d 100644 --- a/modules/nf-core/sentieon/dnamodelapply/environment.yml +++ b/modules/nf-core/sentieon/dnamodelapply/environment.yml @@ -3,3 +3,5 @@ channels: - conda-forge - bioconda - defaults +dependencies: + - bioconda::sentieon=202308.01 diff --git a/modules/nf-core/sentieon/dnamodelapply/main.nf b/modules/nf-core/sentieon/dnamodelapply/main.nf index 3fe9a28f19..1cbb02e3b3 100644 --- a/modules/nf-core/sentieon/dnamodelapply/main.nf +++ b/modules/nf-core/sentieon/dnamodelapply/main.nf @@ -5,7 +5,10 @@ process SENTIEON_DNAMODELAPPLY { secret 'SENTIEON_LICENSE_BASE64' - container 'nf-core/sentieon:202112.06' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' : + 'biocontainers/sentieon:202308.01--h43eeafb_0' }" input: tuple val(meta), path(vcf), path(idx) @@ -22,10 +25,15 @@ process SENTIEON_DNAMODELAPPLY { task.ext.when == null || task.ext.when script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' @@ -48,6 +56,8 @@ process SENTIEON_DNAMODELAPPLY { echo "Decoded and exported Sentieon test-license system environment variables" fi + $fix_ld_library_path + sentieon driver \\ -t $task.cpus \\ -r $fasta \\ @@ -64,12 +74,20 @@ process SENTIEON_DNAMODELAPPLY { """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + + def prefix = task.ext.prefix ?: "${meta.id}" + """ + $fix_ld_library_path + touch ${prefix}.vcf.gz touch ${prefix}.vcf.gz.tbi diff --git a/modules/nf-core/sentieon/dnascope/environment.yml b/modules/nf-core/sentieon/dnascope/environment.yml index 2c5b4937bf..45c2116c04 100644 --- a/modules/nf-core/sentieon/dnascope/environment.yml +++ b/modules/nf-core/sentieon/dnascope/environment.yml @@ -3,3 +3,5 @@ channels: - conda-forge - bioconda - defaults +dependencies: + - bioconda::sentieon=202308.01 diff --git a/modules/nf-core/sentieon/dnascope/main.nf b/modules/nf-core/sentieon/dnascope/main.nf index 6be42a1728..7e5adefc7c 100644 --- a/modules/nf-core/sentieon/dnascope/main.nf +++ b/modules/nf-core/sentieon/dnascope/main.nf @@ -5,7 +5,10 @@ process SENTIEON_DNASCOPE { secret 'SENTIEON_LICENSE_BASE64' - container 'nf-core/sentieon:202112.06' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' : + 'biocontainers/sentieon:202308.01--h43eeafb_0' }" input: tuple val(meta), path(bam), path(bai), path(intervals) @@ -29,10 +32,15 @@ process SENTIEON_DNASCOPE { task.ext.when == null || task.ext.when script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def args = task.ext.args ?: '' // options for the driver def args2 = task.ext.args2 ?: '' // options for the vcf generation def args3 = task.ext.args3 ?: '' // options for the gvcf generation @@ -72,6 +80,8 @@ process SENTIEON_DNASCOPE { echo "Decoded and exported Sentieon test-license system environment variables" fi + $fix_ld_library_path + sentieon driver $args -r $fasta -t $task.cpus -i $bam $interval $vcf_cmd $gvcf_cmd cat <<-END_VERSIONS > versions.yml @@ -81,12 +91,20 @@ process SENTIEON_DNASCOPE { """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + + def prefix = task.ext.prefix ?: "${meta.id}" + """ + $fix_ld_library_path + touch ${prefix}.unfiltered.vcf.gz touch ${prefix}.unfiltered.vcf.gz.tbi touch ${prefix}.g.vcf.gz diff --git a/modules/nf-core/sentieon/gvcftyper/environment.yml b/modules/nf-core/sentieon/gvcftyper/environment.yml index 5af2aaa8e8..9a8143068a 100644 --- a/modules/nf-core/sentieon/gvcftyper/environment.yml +++ b/modules/nf-core/sentieon/gvcftyper/environment.yml @@ -3,3 +3,5 @@ channels: - conda-forge - bioconda - defaults +dependencies: + - bioconda::sentieon=202308.01 diff --git a/modules/nf-core/sentieon/gvcftyper/main.nf b/modules/nf-core/sentieon/gvcftyper/main.nf index 134faa6835..d2be759fe3 100644 --- a/modules/nf-core/sentieon/gvcftyper/main.nf +++ b/modules/nf-core/sentieon/gvcftyper/main.nf @@ -5,7 +5,10 @@ process SENTIEON_GVCFTYPER { secret 'SENTIEON_LICENSE_BASE64' - container 'nf-core/sentieon:202112.06' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' : + 'biocontainers/sentieon:202308.01--h43eeafb_0' }" input: tuple val(meta), path(gvcfs), path(tbis), path(intervals) @@ -23,10 +26,15 @@ process SENTIEON_GVCFTYPER { task.ext.when == null || task.ext.when script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def prefix = task.ext.prefix ?: "${meta.id}" def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' def sentieon_auth_data_base64 = task.ext.sentieon_auth_data_base64 ?: '' @@ -50,6 +58,8 @@ process SENTIEON_GVCFTYPER { echo "Decoded and exported Sentieon test-license system environment variables" fi + $fix_ld_library_path + sentieon driver -r ${fasta} --algo GVCFtyper ${gvcfs_input} ${dbsnp_cmd} ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml @@ -59,13 +69,20 @@ process SENTIEON_GVCFTYPER { """ stub: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def prefix = task.ext.prefix ?: "${meta.id}" """ + $fix_ld_library_path + touch ${prefix}.vcf.gz touch ${prefix}.vcf.gz.tbi diff --git a/modules/nf-core/sentieon/haplotyper/environment.yml b/modules/nf-core/sentieon/haplotyper/environment.yml index 5d8e4c58f9..a3a721cf1d 100644 --- a/modules/nf-core/sentieon/haplotyper/environment.yml +++ b/modules/nf-core/sentieon/haplotyper/environment.yml @@ -3,3 +3,5 @@ channels: - conda-forge - bioconda - defaults +dependencies: + - bioconda::sentieon=202308.01 diff --git a/modules/nf-core/sentieon/haplotyper/main.nf b/modules/nf-core/sentieon/haplotyper/main.nf index f83a137122..d349525dea 100644 --- a/modules/nf-core/sentieon/haplotyper/main.nf +++ b/modules/nf-core/sentieon/haplotyper/main.nf @@ -5,7 +5,10 @@ process SENTIEON_HAPLOTYPER { secret 'SENTIEON_LICENSE_BASE64' - container 'nf-core/sentieon:202112.06' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' : + 'biocontainers/sentieon:202308.01--h43eeafb_0' }" input: tuple val(meta), path(input), path(input_index), path(intervals) @@ -27,10 +30,15 @@ process SENTIEON_HAPLOTYPER { task.ext.when == null || task.ext.when script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def args = task.ext.args ?: '' // options for the driver def args2 = task.ext.args2 ?: '' // options for the vcf generation def args3 = task.ext.args3 ?: '' // options for the gvcf generation @@ -68,6 +76,8 @@ process SENTIEON_HAPLOTYPER { echo "Decoded and exported Sentieon test-license system environment variables" fi + $fix_ld_library_path + sentieon driver $args -r $fasta -t $task.cpus -i $input $interval_command $vcf_cmd $gvcf_cmd cat <<-END_VERSIONS > versions.yml @@ -77,8 +87,19 @@ process SENTIEON_HAPLOTYPER { """ stub: + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' + } + def prefix = task.ext.prefix ?: "${meta.id}" """ + $fix_ld_library_path + touch ${prefix}.unfiltered.vcf.gz touch ${prefix}.unfiltered.vcf.gz.tbi touch ${prefix}.g.vcf.gz diff --git a/modules/nf-core/sentieon/varcal/environment.yml b/modules/nf-core/sentieon/varcal/environment.yml index f04a8b78ce..93921ff046 100644 --- a/modules/nf-core/sentieon/varcal/environment.yml +++ b/modules/nf-core/sentieon/varcal/environment.yml @@ -3,3 +3,5 @@ channels: - conda-forge - bioconda - defaults +dependencies: + - bioconda::sentieon=202308.01 diff --git a/modules/nf-core/sentieon/varcal/main.nf b/modules/nf-core/sentieon/varcal/main.nf index 41e0ea40f5..7a0c807127 100644 --- a/modules/nf-core/sentieon/varcal/main.nf +++ b/modules/nf-core/sentieon/varcal/main.nf @@ -5,7 +5,10 @@ process SENTIEON_VARCAL { secret 'SENTIEON_LICENSE_BASE64' - container 'nf-core/sentieon:202112.06' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' : + 'biocontainers/sentieon:202308.01--h43eeafb_0' }" input: tuple val(meta), path(vcf), path(tbi) // input vcf and tbi of variants to recalibrate @@ -26,10 +29,15 @@ process SENTIEON_VARCAL { task.ext.when == null || task.ext.when script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def reference_command = fasta ? "--reference $fasta " : '' @@ -69,6 +77,8 @@ process SENTIEON_VARCAL { echo "Decoded and exported Sentieon test-license system environment variables" fi + $fix_ld_library_path + sentieon driver -r ${fasta} --algo VarCal \\ -v $vcf \\ --tranches_file ${prefix}.tranches \\ @@ -83,12 +93,19 @@ process SENTIEON_VARCAL { """ stub: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + // The following code sets LD_LIBRARY_PATH in the script-section when the module is run by Singularity. + // That turned out to be one way of overcoming the following issue with the Singularity-Sentieon-containers from galaxy, Sentieon (LD_LIBRARY_PATH) and the way Nextflow runs Singularity-containers. + // The galaxy container uses a runscript which is responsible for setting LD_PRELOAD properly. Nextflow executes singularity containers using `singularity exec`, which avoids the run script, leading to the LD_LIBRARY_PATH/libstdc++.so.6 error. + if (workflow.containerEngine == 'singularity') { + fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' + } else { + fix_ld_library_path = '' } + def prefix = task.ext.prefix ?: "${meta.id}" """ + $fix_ld_library_path + touch ${prefix}.recal touch ${prefix}.idx touch ${prefix}.tranches diff --git a/tests/test_sentieon_dnascope.yml b/tests/test_sentieon_dnascope.yml index f51e0bca72..946bed2d4f 100644 --- a/tests/test_sentieon_dnascope.yml +++ b/tests/test_sentieon_dnascope.yml @@ -17,7 +17,7 @@ - path: results/preprocessing/recalibrated/test/test.recal.cram.crai should_exist: false - path: results/reports/bcftools/sentieon_dnascope/test/test.dnascope.filtered.bcftools_stats.txt - md5sum: 912c7d5b31784c50e0a75b4fcfa4997b + md5sum: fb3923060b59b7dc18705cac5704caba - path: results/reports/vcftools/sentieon_dnascope/test/test.dnascope.filtered.FILTER.summary md5sum: e67b24d296810a075378e5864bcea0fa - path: results/reports/vcftools/sentieon_dnascope/test/test.dnascope.filtered.TsTv.count @@ -60,7 +60,7 @@ - path: results/preprocessing/recalibrated/test/test.recal.cram.crai should_exist: false - path: results/reports/bcftools/sentieon_dnascope/test/test.dnascope.filtered.bcftools_stats.txt - md5sum: 912c7d5b31784c50e0a75b4fcfa4997b + md5sum: fb3923060b59b7dc18705cac5704caba - path: results/reports/vcftools/sentieon_dnascope/test/test.dnascope.filtered.FILTER.summary md5sum: e67b24d296810a075378e5864bcea0fa - path: results/reports/vcftools/sentieon_dnascope/test/test.dnascope.filtered.TsTv.count