diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db5fc5117dc..354174ea269 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -542,6 +542,8 @@ jobs: tags: merquryfk/merquryfk - profile: conda tags: merquryfk/ploidyplot + - profile: conda + tags: quartonotebook - profile: conda tags: sentieon/bwaindex - profile: conda diff --git a/modules/nf-core/antismash/antismashlite/environment.yml b/modules/nf-core/antismash/antismashlite/environment.yml index 76de944b0c2..227b52645ca 100644 --- a/modules/nf-core/antismash/antismashlite/environment.yml +++ b/modules/nf-core/antismash/antismashlite/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::antismash-lite=6.1.1 + - bioconda::antismash-lite=7.1.0 diff --git a/modules/nf-core/antismash/antismashlite/main.nf b/modules/nf-core/antismash/antismashlite/main.nf index f0a890c4dff..b306e75d959 100644 --- a/modules/nf-core/antismash/antismashlite/main.nf +++ b/modules/nf-core/antismash/antismashlite/main.nf @@ -4,14 +4,14 @@ process ANTISMASH_ANTISMASHLITE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/antismash-lite:6.1.1--pyhdfd78af_0' : - 'biocontainers/antismash-lite:6.1.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/antismash-lite:7.1.0--pyhdfd78af_0' : + 'biocontainers/antismash-lite:7.1.0--pyhdfd78af_0' }" containerOptions { workflow.containerEngine == 'singularity' ? - "-B $antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" : + "-B $antismash_dir:/usr/local/lib/python3.10/site-packages/antismash" : workflow.containerEngine == 'docker' ? - "-v \$PWD/$antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" : + "-v \$PWD/$antismash_dir:/usr/local/lib/python3.10/site-packages/antismash" : '' } @@ -64,7 +64,33 @@ process ANTISMASH_ANTISMASHLITE { cat <<-END_VERSIONS > versions.yml "${task.process}": - antismash-lite: \$(antismash --version | sed 's/antiSMASH //') + antismash-lite: \$(echo \$(antismash --version) | sed 's/antiSMASH //') + END_VERSIONS + """ + + stub: + prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def VERSION = '7.1.0' // WARN: Version information not provided by tool during stub run. Please update this string when bumping container versions. + """ + mkdir -p ${prefix}/css + mkdir ${prefix}/images + mkdir ${prefix}/js + touch ${prefix}/NZ_CP069563.1.region001.gbk + touch ${prefix}/NZ_CP069563.1.region002.gbk + touch ${prefix}/css/bacteria.css + touch ${prefix}/genome.gbk + touch ${prefix}/genome.json + touch ${prefix}/genome.zip + touch ${prefix}/images/about.svg + touch ${prefix}/index.html + touch ${prefix}/js/antismash.js + touch ${prefix}/js/jquery.js + touch ${prefix}/regions.js + touch ${prefix}/test.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + antismash-lite: $VERSION END_VERSIONS """ } diff --git a/modules/nf-core/antismash/antismashlite/meta.yml b/modules/nf-core/antismash/antismashlite/meta.yml index 2c9ca7f15c4..21f506bd846 100644 --- a/modules/nf-core/antismash/antismashlite/meta.yml +++ b/modules/nf-core/antismash/antismashlite/meta.yml @@ -22,7 +22,7 @@ tools: documentation: "https://docs.antismash.secondarymetabolites.org" tool_dev_url: "https://github.com/antismash/antismash" doi: "10.1093/nar/gkab335" - licence: "['AGPL v3']" + licence: ["AGPL v3"] input: - meta: type: map diff --git a/modules/nf-core/antismash/antismashlite/tests/main.nf.test b/modules/nf-core/antismash/antismashlite/tests/main.nf.test new file mode 100644 index 00000000000..e4793eea83c --- /dev/null +++ b/modules/nf-core/antismash/antismashlite/tests/main.nf.test @@ -0,0 +1,126 @@ +nextflow_process { + + name "Test Process ANTISMASH_ANTISMASHLITE" + script "../main.nf" + process "ANTISMASH_ANTISMASHLITE" + + tag "modules" + tag "modules_nfcore" + tag "antismash" + tag "antismash/antismashlite" + tag "antismash/antismashlitedownloaddatabases" + tag "gunzip" + tag "untar" + + setup { + run("UNTAR", alias: "UNTAR_CSS") { + script "modules/nf-core/untar/main.nf" + process { + """ + input[0] = [ + [ ], + file('https://github.com/nf-core/test-datasets/raw/59ddeb5929f89ddddaff292d67f9025812762b87/data/delete_me/antismash/css.tar.gz', checkIfExists: true) + ] + """ + } + } + + run("UNTAR", alias: "UNTAR_DETECTION") { + script "modules/nf-core/untar/main.nf" + process { + """ + input[0] = [ + [ ], + file('https://github.com/nf-core/test-datasets/raw/59ddeb5929f89ddddaff292d67f9025812762b87/data/delete_me/antismash/detection.tar.gz', checkIfExists: true) + ] + """ + } + } + + run("UNTAR", alias: "UNTAR_MODULES") { + script "modules/nf-core/untar/main.nf" + process { + """ + input[0] = [ + [ ], + file('https://github.com/nf-core/test-datasets/raw/59ddeb5929f89ddddaff292d67f9025812762b87/data/delete_me/antismash/modules.tar.gz', checkIfExists: true) + ] + """ + } + } + + run("ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES") { + script "modules/nf-core/antismash/antismashlitedownloaddatabases" + process { + """ + input[0] = UNTAR_CSS.out.untar.map{ it[1] } + input[1] = UNTAR_DETECTION.out.untar.map{ it[1] } + input[2] = UNTAR_MODULES.out.untar.map{ it[1] } + """ + } + } + + run("GUNZIP") { + script "modules/nf-core/gunzip/main.nf" + process { + """ + input[0] = [ + [ id:'test' ], + file(params.test_data['bacteroides_fragilis']['genome']['genome_gbff_gz'], checkIfExists: true) + ] + """ + } + } + } + + test("antismashlite - bacteroides_fragilis - genome") { + + when { + process { + """ + input[0] = GUNZIP.out.gunzip + input[1] = ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database + input[2] = ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.antismash_dir + input[3] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.gbk_results.get(0).get(1).get(0)).text.contains("##antiSMASH-Data-START##") }, + { assert snapshot(process.out.html_accessory_files).match("html_accessory_files") }, + { assert path(process.out.gbk_input.get(0).get(1).get(0)).text.contains("##antiSMASH-Data-END##") }, + { assert path(process.out.zip.get(0).get(1)).exists() }, + { assert path(process.out.html.get(0).get(1)).text.contains("https://antismash.secondarymetabolites.org/") }, + { assert path(process.out.json_sideloading.get(0).get(1)).text.contains("\"seq_id\": \"NZ_CP069563.1\"") }, + { assert path(process.out.log.get(0).get(1)).text.contains("antiSMASH status: SUCCESS") }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + } + + test("antismashlite - bacteroides_fragilis - genome - stub") { + + options "-stub" + + when { + process { + """ + input[0] = GUNZIP.out.gunzip + input[1] = ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database + input[2] = ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.antismash_dir + input[3] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/antismash/antismashlite/tests/main.nf.test.snap b/modules/nf-core/antismash/antismashlite/tests/main.nf.test.snap new file mode 100644 index 00000000000..675829cd715 --- /dev/null +++ b/modules/nf-core/antismash/antismashlite/tests/main.nf.test.snap @@ -0,0 +1,301 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,2a1c54c017741b59c057a05453fc067d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T17:06:08.439031477" + }, + "html_accessory_files": { + "content": [ + [ + [ + { + "id": "test" + }, + [ + [ + "bacteria.css:md5,39c0ca9cbc64cb824dc958b26b5b4ab8" + ], + [ + "about.svg:md5,2573f954dd506e2d0878daed04f5420a", + "bacteria_about.png:md5,99cdc2aa09aee37553b10ca86b172170", + "bacteria_antismash_icon.svg:md5,23a265b0e1cf293a4743fe13030b636f", + "bacteria_antismash_logo.svg:md5,f80f639969ee6506571ffda2e197df93", + "bacteria_antismash_white.svg:md5,2c9da15cc168d8f796269d037b5e7f60", + "bacteria_download.png:md5,c3428df1cf17cb97e2897ca6daa93d48", + "bacteria_help.png:md5,359b68f90c73208eb389759c0f5c1091", + "bacteria_home.png:md5,6595d97ee49d251fe038207f82012eff", + "bacteria_logo.png:md5,013f84d6dd93cde96f07084ff63d855c", + "contact.svg:md5,53b878c2af4f8a80a647ac30f61e6bf6", + "download.svg:md5,722038156f4ece46747cbf6908501974", + "expand-arrows-alt-solid.svg:md5,21b37749f54320135a455ed266a7fc3a", + "external-link-alt-solid.svg:md5,ca337694c74e57f73d15ca9db30081ba", + "fungi_about.png:md5,4d55bf14df0340dca01a286487fa8448", + "fungi_antismash_icon.svg:md5,2acc19cc91d5d7285a72f0b3912e108a", + "fungi_antismash_icon_white.svg:md5,961f1c41e25036a625f115f209a961c7", + "fungi_antismash_logo.svg:md5,36560983a36f46786c98a05125b15724", + "fungi_download.png:md5,782580852674aab0b69b2b94a94c7615", + "fungi_help.png:md5,0ac06748f3177d150ab90997117c4f64", + "fungi_home.png:md5,880071898062d6dafe989ac73bb7bbea", + "fungi_logo.png:md5,29294392a3953fd1ba12d1a39cebaeeb", + "help.svg:md5,e7565a3cd74893422f2886a0af748df2", + "mail.png:md5,049f51233b29663e4e4e4c8097c2d096", + "minus-circle.svg:md5,b523305570d06b6e34cd7099bed22015", + "nostructure_icon.png:md5,fc982a5b84a1a99db607731625a87f88", + "plant_antismash_icon.svg:md5,e031de9570ef2809e52502481a5e77ea", + "plant_antismash_icon_white.svg:md5,10d25996b023dbdaed4a382471ab4877", + "plus-circle.svg:md5,cba2cdd9ef893274f572228b354718cf", + "question-circle-solid.svg:md5,6dbc83547e29ecedc7f2a5b81354353b", + "search-solid.svg:md5,aeab848c26357f3d120f3e58f1efa8f5" + ], + [ + "antismash.js:md5,c90571fe2580fd4feff9a37314f1fe6b", + "jquery.js:md5,397754ba49e9e0cf4e7c190da78dda05", + "jquery.tablesorter.min.js:md5,5e9e08cef4d1be0eaa538e6eb28809a7" + ] + ] + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T17:06:08.392236617" + }, + "antismashlite - bacteroides_fragilis - genome - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + [ + [ + "bacteria.css:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "about.svg:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "antismash.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "jquery.js:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ] + ], + "10": [ + [ + { + "id": "test" + }, + "genome.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test" + }, + [ + "NZ_CP069563.1.region001.gbk:md5,d41d8cd98f00b204e9800998ecf8427e", + "NZ_CP069563.1.region002.gbk:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "12": [ + + ], + "13": [ + [ + { + "id": "test" + }, + "index.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "14": [ + + ], + "15": [ + [ + { + "id": "test" + }, + "regions.js:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "16": [ + "versions.yml:md5,2a1c54c017741b59c057a05453fc067d" + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + + ], + "7": [ + [ + { + "id": "test" + }, + [ + "NZ_CP069563.1.region001.gbk:md5,d41d8cd98f00b204e9800998ecf8427e", + "NZ_CP069563.1.region002.gbk:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.gbk:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "8": [ + [ + { + "id": "test" + }, + "genome.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "9": [ + [ + { + "id": "test" + }, + "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "clusterblast_file": [ + + ], + "clusterblastoutput": [ + + ], + "gbk_input": [ + [ + { + "id": "test" + }, + [ + "NZ_CP069563.1.region001.gbk:md5,d41d8cd98f00b204e9800998ecf8427e", + "NZ_CP069563.1.region002.gbk:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.gbk:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "gbk_results": [ + [ + { + "id": "test" + }, + [ + "NZ_CP069563.1.region001.gbk:md5,d41d8cd98f00b204e9800998ecf8427e", + "NZ_CP069563.1.region002.gbk:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "html": [ + [ + { + "id": "test" + }, + "index.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "html_accessory_files": [ + [ + { + "id": "test" + }, + [ + [ + "bacteria.css:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "about.svg:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "antismash.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "jquery.js:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ] + ], + "json_results": [ + [ + { + "id": "test" + }, + "genome.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json_sideloading": [ + [ + { + "id": "test" + }, + "regions.js:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "knownclusterblast_dir": [ + + ], + "knownclusterblast_html": [ + + ], + "knownclusterblast_txt": [ + + ], + "knownclusterblastoutput": [ + + ], + "log": [ + [ + { + "id": "test" + }, + "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "svg_files_clusterblast": [ + + ], + "svg_files_knownclusterblast": [ + + ], + "versions": [ + "versions.yml:md5,2a1c54c017741b59c057a05453fc067d" + ], + "zip": [ + [ + { + "id": "test" + }, + "genome.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T17:06:15.671842533" + } +} \ No newline at end of file diff --git a/modules/nf-core/antismash/antismashlite/tests/tags.yml b/modules/nf-core/antismash/antismashlite/tests/tags.yml new file mode 100644 index 00000000000..020b39d68fe --- /dev/null +++ b/modules/nf-core/antismash/antismashlite/tests/tags.yml @@ -0,0 +1,2 @@ +antismash/antismashlite: + - "modules/nf-core/antismash/antismashlite/**" diff --git a/modules/nf-core/antismash/antismashlitedownloaddatabases/environment.yml b/modules/nf-core/antismash/antismashlitedownloaddatabases/environment.yml index e6288d56f18..b9323a931fd 100644 --- a/modules/nf-core/antismash/antismashlitedownloaddatabases/environment.yml +++ b/modules/nf-core/antismash/antismashlitedownloaddatabases/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::antismash-lite=6.1.1 + - bioconda::antismash-lite=7.1.0 diff --git a/modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf b/modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf index dec16bb3729..e63f20d2ea6 100644 --- a/modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf +++ b/modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf @@ -3,8 +3,8 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/antismash-lite:6.1.1--pyhdfd78af_0' : - 'biocontainers/antismash-lite:6.1.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/antismash-lite:7.1.0--pyhdfd78af_0' : + 'biocontainers/antismash-lite:7.1.0--pyhdfd78af_0' }" /* These files are normally downloaded/created by download-antismash-databases itself, and must be retrieved for input by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. This is solely for use for CI tests of the nf-core/module version of antiSMASH. @@ -14,9 +14,9 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { containerOptions { workflow.containerEngine == 'singularity' ? - "-B $database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css,$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection,$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" : + "-B $database_css:/usr/local/lib/python3.10/site-packages/antismash/outputs/html/css,$database_detection:/usr/local/lib/python3.10/site-packages/antismash/detection,$database_modules:/usr/local/lib/python3.10/site-packages/antismash/modules" : workflow.containerEngine == 'docker' ? - "-v \$PWD/$database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css -v \$PWD/$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection -v \$PWD/$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" : + "-v \$PWD/$database_css:/usr/local/lib/python3.10/site-packages/antismash/outputs/html/css -v \$PWD/$database_detection:/usr/local/lib/python3.10/site-packages/antismash/detection -v \$PWD/$database_modules:/usr/local/lib/python3.10/site-packages/antismash/modules" : '' } @@ -35,7 +35,7 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { script: def args = task.ext.args ?: '' - cp_cmd = ( session.config.conda && session.config.conda.enabled ) ? "cp -r \$(python -c 'import antismash;print(antismash.__file__.split(\"/__\")[0])') antismash_dir;" : "cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir;" + cp_cmd = ( session.config.conda && session.config.conda.enabled ) ? "cp -r \$(python -c 'import antismash;print(antismash.__file__.split(\"/__\")[0])') antismash_dir;" : "cp -r /usr/local/lib/python3.10/site-packages/antismash antismash_dir;" """ download-antismash-databases \\ --database-dir antismash_db \\ @@ -51,7 +51,8 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { stub: def args = task.ext.args ?: '' - cp_cmd = (session.config.conda && session.config.conda.enabled ) ? "cp -r \$(python -c 'import antismash;print(antismash.__file__.split(\"/__\")[0])') antismash_dir;" : "cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir;" + cp_cmd = (session.config.conda && session.config.conda.enabled ) ? "cp -r \$(python -c 'import antismash;print(antismash.__file__.split(\"/__\")[0])') antismash_dir;" : "cp -r /usr/local/lib/python3.10/site-packages/antismash antismash_dir;" + def VERSION = '7.1.0' // WARN: Version information not provided by tool during stub run. Please update this string when bumping container versions. """ echo "download-antismash-databases --database-dir antismash_db $args" @@ -62,7 +63,7 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { cat <<-END_VERSIONS > versions.yml "${task.process}": - antismash-lite: \$(antismash --version | sed 's/antiSMASH //') + antismash-lite: $VERSION END_VERSIONS """ } diff --git a/modules/nf-core/antismash/antismashlitedownloaddatabases/tests/main.nf.test b/modules/nf-core/antismash/antismashlitedownloaddatabases/tests/main.nf.test new file mode 100644 index 00000000000..bc7b5a80553 --- /dev/null +++ b/modules/nf-core/antismash/antismashlitedownloaddatabases/tests/main.nf.test @@ -0,0 +1,98 @@ +nextflow_process { + + name "Test Process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES" + script "../main.nf" + process "ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES" + + tag "modules" + tag "modules_nfcore" + tag "antismash" + tag "antismash/antismashlitedownloaddatabases" + tag "untar" + + setup { + + run("UNTAR", alias: "UNTAR_CSS") { + script "modules/nf-core/untar/main.nf" + process { + """ + input[0] = [ + [ ], + file('https://github.com/nf-core/test-datasets/raw/59ddeb5929f89ddddaff292d67f9025812762b87/data/delete_me/antismash/css.tar.gz', checkIfExists: true) + ] + """ + } + } + + run("UNTAR", alias: "UNTAR_DETECTION") { + script "modules/nf-core/untar/main.nf" + process { + """ + input[0] = [ + [ ], + file('https://github.com/nf-core/test-datasets/raw/59ddeb5929f89ddddaff292d67f9025812762b87/data/delete_me/antismash/detection.tar.gz', checkIfExists: true) + ] + """ + } + } + + run("UNTAR", alias: "UNTAR_MODULES") { + script "modules/nf-core/untar/main.nf" + process { + """ + input[0] = [ + [ ], + file('https://github.com/nf-core/test-datasets/raw/59ddeb5929f89ddddaff292d67f9025812762b87/data/delete_me/antismash/modules.tar.gz', checkIfExists: true) + ] + """ + } + } + } + +test("antiSMASH-lite downloaddatabases") { + when { + process { + """ + input[0] = UNTAR_CSS.out.untar.map{ it[1] } + input[1] = UNTAR_DETECTION.out.untar.map{ it[1] } + input[2] = UNTAR_MODULES.out.untar.map{ it[1] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot ( + file(process.out.database.get(0)).list().sort(), + process.out.versions, + ).match() } + ) + } + + } + + test("antiSMASH-lite downloaddatabases - stub") { + + options "-stub" + + when { + process { + """ + input[0] = UNTAR_CSS.out.untar.map{ it[1] } + input[1] = UNTAR_DETECTION.out.untar.map{ it[1] } + input[2] = UNTAR_MODULES.out.untar.map{ it[1] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/antismash/antismashlitedownloaddatabases/tests/main.nf.test.snap b/modules/nf-core/antismash/antismashlitedownloaddatabases/tests/main.nf.test.snap new file mode 100644 index 00000000000..93d071871fa --- /dev/null +++ b/modules/nf-core/antismash/antismashlitedownloaddatabases/tests/main.nf.test.snap @@ -0,0 +1,62 @@ +{ + "antiSMASH-lite downloaddatabases - stub": { + "content": [ + { + "0": [ + [ + + ] + ], + "1": [ + [ + + ] + ], + "2": [ + "versions.yml:md5,9eccc775a12d25ca5dfe334e8874f12a" + ], + "antismash_dir": [ + [ + + ] + ], + "database": [ + [ + + ] + ], + "versions": [ + "versions.yml:md5,9eccc775a12d25ca5dfe334e8874f12a" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T23:13:12.85814463" + }, + "antiSMASH-lite downloaddatabases": { + "content": [ + [ + "as-js", + "clusterblast", + "clustercompare", + "comparippson", + "knownclusterblast", + "nrps_pks", + "pfam", + "resfam", + "tigrfam" + ], + [ + "versions.yml:md5,9eccc775a12d25ca5dfe334e8874f12a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T23:12:29.947339678" + } +} \ No newline at end of file diff --git a/modules/nf-core/antismash/antismashlitedownloaddatabases/tests/tags.yml b/modules/nf-core/antismash/antismashlitedownloaddatabases/tests/tags.yml new file mode 100644 index 00000000000..1b01466ed2a --- /dev/null +++ b/modules/nf-core/antismash/antismashlitedownloaddatabases/tests/tags.yml @@ -0,0 +1,2 @@ +antismash/antismashlitedownloaddatabases: + - "modules/nf-core/antismash/antismashlitedownloaddatabases/**" diff --git a/modules/nf-core/bcftools/view/main.nf b/modules/nf-core/bcftools/view/main.nf index f3474885a24..5237adc8c9d 100644 --- a/modules/nf-core/bcftools/view/main.nf +++ b/modules/nf-core/bcftools/view/main.nf @@ -48,6 +48,7 @@ process BCFTOOLS_VIEW { """ stub: + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : diff --git a/modules/nf-core/bclconvert/Dockerfile b/modules/nf-core/bclconvert/Dockerfile index 34c81d8ef72..2124c7942dc 100644 --- a/modules/nf-core/bclconvert/Dockerfile +++ b/modules/nf-core/bclconvert/Dockerfile @@ -1,17 +1,34 @@ +# syntax=docker/dockerfile:1 # Dockerfile to create container with bcl-convert # Push to nfcore/bclconvert: FROM debian:bullseye-slim -LABEL authors="Matthias De Smet " \ - description="Docker image containing bcl-convert" +ARG BCLCONVERT_VERSION="4.2.7" +LABEL org.opencontainers.image.authors="Matthias De Smet " +LABEL org.opencontainers.image.description="Docker image containing bcl-convert" +LABEL org.opencontainers.image.version="$BCLCONVERT_VERSION" +LABEL org.opencontainers.image.documentation="https://github.com/nf-core/modules/blob/master/modules/nf-core/bclconvert/README.md" +LABEL org.opencontainers.image.source="https://github.com/nf-core/modules" +LABEL org.opencontainers.image.vendor="nf-core" +LABEL org.opencontainers.image.license="https://github.com/nf-core/modules/blob/master/modules/nf-core/bclconvert/LICENSE" + # Disclaimer: this container is not provided nor supported by Illumina # 'ps' command is need by some nextflow executions to collect system stats # Install procps and clean apt cache RUN apt-get update \ - && apt-get install -y \ + && apt-get install -y --no-install-recommends \ procps \ - && apt-get clean -y && rm -rf /var/lib/apt/lists/* + rpm2cpio \ + cpio \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* # Link hostname cmd to fix hardcoded path RUN ln -s /bin/hostname /usr/bin/hostname -COPY bcl-convert /usr/local/bin/bcl-convert -RUN chmod +x /usr/local/bin/bcl-convert +# Install bcl-convert +ADD --checksum=sha256:ea508d763dc27d30d1a34f6a38d8da31ea67797d7b4971e8c10677bc48539565 \ + https://s3.amazonaws.com/webdata.illumina.com/downloads/software/bcl-convert/bcl-convert-${BCLCONVERT_VERSION}-2.el7.x86_64.rpm \ + bcl-convert.rpm +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN rpm2cpio bcl-convert.rpm | cpio -idmv \ + && rm bcl-convert.rpm +RUN rm -rf /var/log/bcl-convert && ln -sfT /tmp /var/log/bcl-convert diff --git a/modules/nf-core/bclconvert/README.md b/modules/nf-core/bclconvert/README.md index 67148afa788..54679d0f33a 100644 --- a/modules/nf-core/bclconvert/README.md +++ b/modules/nf-core/bclconvert/README.md @@ -2,15 +2,15 @@ bcl-convert is a commercial tool from Illumina. The container provided for the bcl-convert nf-core module is not provided nor supported by Illumina. Updating the bcl-convert versions in the container and pushing the update to Dockerhub needs to be done manually. -1. Navigate to the appropriate download page. - [BCL Convert](https://support.illumina.com/sequencing/sequencing_software/bcl-convert/downloads.html): download the rpm of the desired bcl-convert version with `curl` or `wget`. -2. Unpack the RPM package using `rpm2cpio bcl-convert-*.rpm | cpio -i --make-directories`. Place the executable located in `/usr/bin/bcl-convert` in the same folder where the Dockerfile lies. +1. Navigate to the appropriate download page. - [BCL Convert](https://support.illumina.com/sequencing/sequencing_software/bcl-convert/downloads.html): find the latest version of bcl-convert +2. Update the `BCL_VERSION` in the `Dockerfile` (You might have to update the link in the `ADD` statement) 3. Create and test the container: ```bash docker build . -t quay.io/nf-core/bclconvert: ``` -4. Access rights are needed to push the container to the Dockerhub nfcore organization, please ask a core team member to do so. +4. Access rights are needed to push the container to the Dockerhub nf-core organization, please ask a core team member to do so. ```bash docker push quay.io/nf-core/bclconvert: diff --git a/modules/nf-core/custom/tx2gene/main.nf b/modules/nf-core/custom/tx2gene/main.nf index dff8f20c97f..99c00aa0692 100644 --- a/modules/nf-core/custom/tx2gene/main.nf +++ b/modules/nf-core/custom/tx2gene/main.nf @@ -9,14 +9,14 @@ process CUSTOM_TX2GENE { input: tuple val(meta), path(gtf) - tuple val(meta2), path ("quants") + tuple val(meta2), path ("quants/*") val quant_type val id val extra output: - tuple val(meta), path("*.tx2gene.tsv"), emit: tx2gene - path "versions.yml" , emit: versions + tuple val(meta), path("*tx2gene.tsv"), emit: tx2gene + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/custom/tx2gene/meta.yml b/modules/nf-core/custom/tx2gene/meta.yml index bea5f571d54..d991bf1be95 100644 --- a/modules/nf-core/custom/tx2gene/meta.yml +++ b/modules/nf-core/custom/tx2gene/meta.yml @@ -32,7 +32,7 @@ input: e.g. `[ id:'SRP123456' ]` - quants: type: directory - description: Path to a directory with subdirectories corresponding to + description: Paths to subdirectories corresponding to sample-wise runs of Salmon or Kallisto - quant_type: type: string diff --git a/modules/nf-core/custom/tx2gene/templates/tx2gene.py b/modules/nf-core/custom/tx2gene/templates/tx2gene.py index 9b1e1ec69cf..ee0a551fc0a 100755 --- a/modules/nf-core/custom/tx2gene/templates/tx2gene.py +++ b/modules/nf-core/custom/tx2gene/templates/tx2gene.py @@ -169,12 +169,14 @@ def map_transcripts_to_gene( # Main function to parse arguments and call the mapping function if __name__ == "__main__": - prefix = ( - "$task.ext.prefix" - if "$task.ext.prefix" != "null" - else f"$meta.id" - ) - if not map_transcripts_to_gene('$quant_type', '$gtf', 'quants', '$id', '$extra', f"{prefix}.tx2gene.tsv"): + if '${task.ext.prefix}' != "null": + prefix = "${task.ext.prefix}." + elif '$meta.id' != "null": + prefix = '${meta.id}.' + else: + prefix = '' + + if not map_transcripts_to_gene('$quant_type', '$gtf', 'quants', '$id', '$extra', f"{prefix}tx2gene.tsv"): logger.error("Failed to map transcripts to genes.") # Write the versions diff --git a/modules/nf-core/custom/tx2gene/tests/main.nf.test b/modules/nf-core/custom/tx2gene/tests/main.nf.test index 75ad0917d5c..c983bb1aa93 100644 --- a/modules/nf-core/custom/tx2gene/tests/main.nf.test +++ b/modules/nf-core/custom/tx2gene/tests/main.nf.test @@ -34,7 +34,7 @@ nextflow_process { [ id:'test'], // meta map file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true) ] - input[1] = UNTAR.out.untar + input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } input[2] = 'kallisto' input[3] = 'gene_id' input[4] = 'gene_name' @@ -79,7 +79,7 @@ nextflow_process { [ id:'test'], // meta map file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true) ] - input[1] = UNTAR.out.untar + input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } input[2] = 'kallisto' input[3] = 'gene_id' input[4] = 'gene_name' diff --git a/modules/nf-core/deeparg/downloaddata/main.nf b/modules/nf-core/deeparg/downloaddata/main.nf index f5688b9695c..787c0027968 100644 --- a/modules/nf-core/deeparg/downloaddata/main.nf +++ b/modules/nf-core/deeparg/downloaddata/main.nf @@ -5,12 +5,16 @@ process DEEPARG_DOWNLOADDATA { container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/deeparg:1.0.4--pyhdfd78af_0' : 'biocontainers/deeparg:1.0.4--pyhdfd78af_0' }" + /* - We have to force singularity to run with -B to allow reading of a problematic file with borked read-write permissions in an upstream dependency (theanos). + We have to force docker/singularity to mount a fake file to allow reading of a problematic file with borked read-write permissions in an upstream dependency (theanos). Original report: https://github.com/nf-core/funcscan/issues/23 */ - containerOptions { "${workflow.containerEngine}" == 'singularity' ? '-B $(which bash):/usr/local/lib/python2.7/site-packages/Theano-0.8.2-py2.7.egg-info/PKG-INFO' : '' } - + containerOptions { + "${workflow.containerEngine}" == 'singularity' ? '-B $(which bash):/usr/local/lib/python2.7/site-packages/Theano-0.8.2-py2.7.egg-info/PKG-INFO' : + "${workflow.containerEngine}" == 'docker' ? '-v $(which bash):/usr/local/lib/python2.7/site-packages/Theano-0.8.2-py2.7.egg-info/PKG-INFO' : + '' + } input: @@ -42,4 +46,16 @@ process DEEPARG_DOWNLOADDATA { deeparg: $VERSION END_VERSIONS """ + + stub: + def args = task.ext.args ?: '' + def VERSION='1.0.4' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + mkdir db/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deeparg: $VERSION + END_VERSIONS + """ } diff --git a/modules/nf-core/deeparg/downloaddata/tests/main.nf.test b/modules/nf-core/deeparg/downloaddata/tests/main.nf.test new file mode 100644 index 00000000000..8e8c7647684 --- /dev/null +++ b/modules/nf-core/deeparg/downloaddata/tests/main.nf.test @@ -0,0 +1,56 @@ +nextflow_process { + + name "Test Process DEEPARG_DOWNLOADDATA" + script "../main.nf" + process "DEEPARG_DOWNLOADDATA" + + tag "modules" + tag "modules_nfcore" + tag "deeparg" + tag "deeparg/downloaddata" + + test("downloaddata") { + + + when { + process { + """ + // No input required + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot ( + file(process.out.db.get(0)).list().sort(), + process.out.versions, + ).match() } + ) + } + + } + + test("downloaddata - stub") { + + options "-stub" + + when { + process { + """ + // No input required + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/deeparg/downloaddata/tests/main.nf.test.snap b/modules/nf-core/deeparg/downloaddata/tests/main.nf.test.snap new file mode 100644 index 00000000000..fca46527006 --- /dev/null +++ b/modules/nf-core/deeparg/downloaddata/tests/main.nf.test.snap @@ -0,0 +1,53 @@ +{ + "downloaddata": { + "content": [ + [ + "LICENSE:md5,f244898ceed024da6d64a1b97746edb1", + "README.md:md5,6c0450350c2d52c0f9b5d81c3d22ea7b", + "__MACOSX", + "bin", + "database", + "deeparg", + "deeparg.gz", + "gg13", + "model", + "scripts" + ], + [ + "versions.yml:md5,30e73617295a9f10ac7781bfe8ba617f" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T16:40:43.022804921" + }, + "downloaddata - stub": { + "content": [ + { + "0": [ + [ + + ] + ], + "1": [ + "versions.yml:md5,30e73617295a9f10ac7781bfe8ba617f" + ], + "db": [ + [ + + ] + ], + "versions": [ + "versions.yml:md5,30e73617295a9f10ac7781bfe8ba617f" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T16:40:47.261220647" + } +} \ No newline at end of file diff --git a/modules/nf-core/deeparg/downloaddata/tests/tags.yml b/modules/nf-core/deeparg/downloaddata/tests/tags.yml new file mode 100644 index 00000000000..b909db89dd1 --- /dev/null +++ b/modules/nf-core/deeparg/downloaddata/tests/tags.yml @@ -0,0 +1,2 @@ +deeparg/downloaddata: + - "modules/nf-core/deeparg/downloaddata/**" diff --git a/modules/nf-core/deeparg/predict/main.nf b/modules/nf-core/deeparg/predict/main.nf index 4fca811d010..20fd0a937b0 100644 --- a/modules/nf-core/deeparg/predict/main.nf +++ b/modules/nf-core/deeparg/predict/main.nf @@ -6,11 +6,16 @@ process DEEPARG_PREDICT { container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/deeparg:1.0.4--pyhdfd78af_0' : 'biocontainers/deeparg:1.0.4--pyhdfd78af_0' }" + /* - We have to force singularity to run with -B to allow reading of a problematic file with borked read-write permissions in an upstream dependency (theanos). - Original report: https://github.com/nf-core/funcscan/issues/23 + We have to force docker/singularity to mount a fake file to allow reading of a problematic file with borked read-write permissions in an upstream dependency (theanos). + Original report: https://github.com/nf-core/funcscan/issues/23 */ - containerOptions { "${workflow.containerEngine}" == 'singularity' ? '-B $(which bash):/usr/local/lib/python2.7/site-packages/Theano-0.8.2-py2.7.egg-info/PKG-INFO' : '' } + containerOptions { + "${workflow.containerEngine}" == 'singularity' ? '-B $(which bash):/usr/local/lib/python2.7/site-packages/Theano-0.8.2-py2.7.egg-info/PKG-INFO' : + "${workflow.containerEngine}" == 'docker' ? '-v $(which bash):/usr/local/lib/python2.7/site-packages/Theano-0.8.2-py2.7.egg-info/PKG-INFO' : + '' + } input: tuple val(meta), path(fasta), val(model) @@ -52,4 +57,20 @@ process DEEPARG_PREDICT { deeparg: $VERSION END_VERSIONS """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION='1.0.4' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + touch ${prefix}.align.daa + touch ${prefix}.align.daa.tsv + touch ${prefix}.mapping.ARG + touch ${prefix}.mapping.potential.ARG + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deeparg: $VERSION + END_VERSIONS + """ } diff --git a/modules/nf-core/deeparg/predict/tests/main.nf.test b/modules/nf-core/deeparg/predict/tests/main.nf.test new file mode 100644 index 00000000000..2c48e963d87 --- /dev/null +++ b/modules/nf-core/deeparg/predict/tests/main.nf.test @@ -0,0 +1,81 @@ +nextflow_process { + + name "Test Process DEEPARG_PREDICT" + script "../main.nf" + process "DEEPARG_PREDICT" + + tag "modules" + tag "modules_nfcore" + tag "deeparg" + tag "deeparg/predict" + tag "deeparg/downloaddata" + + setup { + run("DEEPARG_DOWNLOADDATA") { + script "../../../deeparg/downloaddata/main.nf" + process { + """ + // No input necessary + """ + } + } + + } + + test("bacteroides_fragilis - fasta") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), + 'LS' + ] + input[1] = DEEPARG_DOWNLOADDATA.out.db + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.daa_tsv, + process.out.arg, + file(process.out.daa[0][1]).name, + path(process.out.potential_arg[0][1]).readLines().first().contains("#ARG") + ).match() + } + ) + } + + } + + test("bacteroides_fragilis - fasta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), + 'LS' + ] + input[1] = DEEPARG_DOWNLOADDATA.out.db + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/deeparg/predict/tests/main.nf.test.snap b/modules/nf-core/deeparg/predict/tests/main.nf.test.snap new file mode 100644 index 00000000000..fa5df047889 --- /dev/null +++ b/modules/nf-core/deeparg/predict/tests/main.nf.test.snap @@ -0,0 +1,120 @@ +{ + "bacteroides_fragilis - fasta": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.align.daa.tsv:md5,46b6eba345742365fc1dbd5b4bacd3a2" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.mapping.ARG:md5,0e049e99eab4c55666062df21707d5b9" + ] + ], + "test.align.daa", + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T20:55:06.511718259" + }, + "bacteroides_fragilis - fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.align.daa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.align.daa.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mapping.ARG:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mapping.potential.ARG:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,1668194fbcb82f7cce4699baa00c02a1" + ], + "arg": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mapping.ARG:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "daa": [ + [ + { + "id": "test", + "single_end": false + }, + "test.align.daa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "daa_tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.align.daa.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "potential_arg": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mapping.potential.ARG:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,1668194fbcb82f7cce4699baa00c02a1" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T16:50:17.147755715" + } +} \ No newline at end of file diff --git a/modules/nf-core/deeparg/predict/tests/tags.yml b/modules/nf-core/deeparg/predict/tests/tags.yml new file mode 100644 index 00000000000..7fa73e37fd0 --- /dev/null +++ b/modules/nf-core/deeparg/predict/tests/tags.yml @@ -0,0 +1,2 @@ +deeparg/predict: + - "modules/nf-core/deeparg/predict/**" diff --git a/modules/nf-core/eklipse/main.nf b/modules/nf-core/eklipse/main.nf index b50df3c19b6..98c5778953d 100644 --- a/modules/nf-core/eklipse/main.nf +++ b/modules/nf-core/eklipse/main.nf @@ -33,8 +33,8 @@ process EKLIPSE { -in infile.txt \\ $args \\ -ref $ref_gb - mv eKLIPse_*/eKLIPse_deletions.csv eKLIPse_deletions.csv - mv eKLIPse_*/eKLIPse_genes.csv eKLIPse_genes.csv + mv eKLIPse_*/eKLIPse_deletions.csv eKLIPse_${prefix}_deletions.csv + mv eKLIPse_*/eKLIPse_genes.csv eKLIPse_${prefix}_genes.csv mv eKLIPse_*/eKLIPse_${prefix}.png eKLIPse_${prefix}.png cat <<-END_VERSIONS > versions.yml @@ -47,8 +47,8 @@ process EKLIPSE { def prefix = task.ext.prefix ?: "${meta.id}" def VERSION = "1.8" """ - touch eKLIPse_deletions.csv - touch eKLIPse_genes.csv + touch eKLIPse_${prefix}_deletions.csv + touch eKLIPse_${prefix}_genes.csv touch eKLIPse_${prefix}.png cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/eklipse/tests/main.nf.test.snap b/modules/nf-core/eklipse/tests/main.nf.test.snap index 87d79dac222..5969a1da0e7 100644 --- a/modules/nf-core/eklipse/tests/main.nf.test.snap +++ b/modules/nf-core/eklipse/tests/main.nf.test.snap @@ -1,11 +1,11 @@ { - "eklipse": { + "homo_sapiens [bam]": { "content": [ - "eKLIPse_deletions.csv:md5,8bcfdb8f3e8a63dcd211c2a53b6ca0a7", - "eKLIPse_genes.csv:md5,ec1a1f31d018ca66a46d8a2d17bc8d18", + "eKLIPse_test_deletions.csv:md5,8bcfdb8f3e8a63dcd211c2a53b6ca0a7", + "eKLIPse_test_genes.csv:md5,ec1a1f31d018ca66a46d8a2d17bc8d18", "eKLIPse_test.png:md5,d1ea2a548bc4f8d321b1128a61ea8b0a", "versions.yml:md5,8e6ebaa9abf72ced91c1f56acd10f131" ], - "timestamp": "2023-11-22T18:02:08.245264064" + "timestamp": "2024-02-11T14:55:25.205208435" } } \ No newline at end of file diff --git a/modules/nf-core/gsea/gsea/main.nf b/modules/nf-core/gsea/gsea/main.nf index d119dcb97be..6a060c46582 100644 --- a/modules/nf-core/gsea/gsea/main.nf +++ b/modules/nf-core/gsea/gsea/main.nf @@ -22,11 +22,11 @@ process GSEA_GSEA { tuple val(meta), path("*gsea_report_for_${target}.html") , emit: report_htmls_target tuple val(meta), path("*ranked_gene_list*.tsv") , emit: ranked_gene_list tuple val(meta), path("*gene_set_sizes.tsv") , emit: gene_set_sizes - tuple val(meta), path("*butterfly_plot.png") , emit: butterfly_plot tuple val(meta), path("*global_es_histogram.png") , emit: histogram tuple val(meta), path("*heat_map_1.png") , emit: heatmap tuple val(meta), path("*pvalues_vs_nes_plot.png") , emit: pvalues_vs_nes_plot tuple val(meta), path("*ranked_list_corr_2.png") , emit: ranked_list_corr + tuple val(meta), path("*butterfly_plot.png") , emit: butterfly_plot, optional: true tuple val(meta), path("*[!gene_set_size|gsea_report|ranked_gene_list]*.tsv"), emit: gene_set_tsv, optional: true tuple val(meta), path("*[!gsea_report|heat_map_corr_plot|index|pos_snapshot|neg_snapshot]*.html"), emit: gene_set_html, optional: true tuple val(meta), path("*[!butterfly|enplot|global_es_histogram|gset_rnd_es_dist|heat_map|pvalues_vs_nes_plot|ranked_list_corr]*.png"), emit: gene_set_heatmap, optional: true diff --git a/modules/nf-core/gsea/gsea/meta.yml b/modules/nf-core/gsea/gsea/meta.yml index 0ff81518d3f..fe2d4c95692 100644 --- a/modules/nf-core/gsea/gsea/meta.yml +++ b/modules/nf-core/gsea/gsea/meta.yml @@ -11,7 +11,7 @@ tools: homepage: "http://www.gsea-msigdb.org/gsea/index.jsp" documentation: "https://software.broadinstitute.org/cancer/software/gsea/wiki/index.php/Main_Page" doi: "10.1073/pnas.0506580102" - licence: "['BSD-3-clause']" + licence: ["BSD-3-clause"] input: - meta: type: map diff --git a/modules/nf-core/hamronization/abricate/environment.yml b/modules/nf-core/hamronization/abricate/environment.yml index 0d7c0e6628b..75f349f162f 100644 --- a/modules/nf-core/hamronization/abricate/environment.yml +++ b/modules/nf-core/hamronization/abricate/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::hamronization=1.1.1 + - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/abricate/main.nf b/modules/nf-core/hamronization/abricate/main.nf index 3c54b5bb59e..54cd9904547 100644 --- a/modules/nf-core/hamronization/abricate/main.nf +++ b/modules/nf-core/hamronization/abricate/main.nf @@ -4,8 +4,8 @@ process HAMRONIZATION_ABRICATE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/hamronization:1.1.1--pyhdfd78af_0': - 'biocontainers/hamronization:1.1.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/hamronization:1.1.4--pyhdfd78af_0': + 'biocontainers/hamronization:1.1.4--pyhdfd78af_0' }" input: tuple val(meta), path(report) @@ -34,6 +34,16 @@ process HAMRONIZATION_ABRICATE { --reference_database_version ${reference_db_version} \\ > ${prefix}.${format} + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.${format} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/hamronization/abricate/meta.yml b/modules/nf-core/hamronization/abricate/meta.yml index 40606f6fd32..4a0867d6ce5 100644 --- a/modules/nf-core/hamronization/abricate/meta.yml +++ b/modules/nf-core/hamronization/abricate/meta.yml @@ -11,7 +11,7 @@ tools: homepage: "https://github.com/pha4ge/hAMRonization/" documentation: "https://github.com/pha4ge/hAMRonization/" tool_dev_url: "https://github.com/pha4ge/hAMRonization" - licence: "['GNU Lesser General Public v3 (LGPL v3)']" + licence: ["GNU Lesser General Public v3 (LGPL v3)"] input: - meta: type: map @@ -23,15 +23,15 @@ input: description: Output TSV or CSV file from ABRicate pattern: "*.{csv,tsv}" - format: - type: value + type: string description: Type of report file to be produced pattern: "tsv|json" - software_version: - type: value + type: string description: Version of ABRicate used pattern: "[0-9].[0-9].[0-9]" - reference_db_version: - type: value + type: string description: Database version of ABRicate used pattern: "[0-9][0-9][0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9]" output: diff --git a/modules/nf-core/hamronization/abricate/tests/main.nf.test b/modules/nf-core/hamronization/abricate/tests/main.nf.test new file mode 100644 index 00000000000..569ff942c92 --- /dev/null +++ b/modules/nf-core/hamronization/abricate/tests/main.nf.test @@ -0,0 +1,55 @@ +nextflow_process { + + name "Test Process HAMRONIZATION_ABRICATE" + script "../main.nf" + process "HAMRONIZATION_ABRICATE" + + tag "modules" + tag "modules_nfcore" + tag "hamronization" + tag "hamronization/abricate" + + test("hamronization/abricate - bacteroides_fragilis - genome_abricate_tsv") { + + when { + process { + """ + input[0] = [ [ id:"test" ], file(params.test_data['bacteroides_fragilis']['hamronization']['genome_abricate_tsv'], checkIfExists: true) ] + input[1] = 'tsv' + input[2] = '1.0.1' + input[3] = '2021-Mar-27' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("hamronization/abricate - bacteroides_fragilis - genome_abricate_tsv - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [ id:"test" ], file(params.test_data['bacteroides_fragilis']['hamronization']['genome_abricate_tsv'], checkIfExists: true) ] + input[1] = 'tsv' + input[2] = '1.0.1' + input[3] = '2021-Mar-27' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/hamronization/abricate/tests/main.nf.test.snap b/modules/nf-core/hamronization/abricate/tests/main.nf.test.snap new file mode 100644 index 00000000000..47432f37462 --- /dev/null +++ b/modules/nf-core/hamronization/abricate/tests/main.nf.test.snap @@ -0,0 +1,80 @@ +{ + "hamronization/abricate - bacteroides_fragilis - genome_abricate_tsv": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + "test.tsv:md5,4b1024ba25c116a5312944f65dd40e9b" + ] + ], + "2": [ + "versions.yml:md5,c826615ee7b88b615cae5bded792b790" + ], + "json": [ + + ], + "tsv": [ + [ + { + "id": "test" + }, + "test.tsv:md5,4b1024ba25c116a5312944f65dd40e9b" + ] + ], + "versions": [ + "versions.yml:md5,c826615ee7b88b615cae5bded792b790" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T22:16:18.968989666" + }, + "hamronization/abricate - bacteroides_fragilis - genome_abricate_tsv - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,c826615ee7b88b615cae5bded792b790" + ], + "json": [ + + ], + "tsv": [ + [ + { + "id": "test" + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,c826615ee7b88b615cae5bded792b790" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T22:25:57.524839789" + } +} \ No newline at end of file diff --git a/modules/nf-core/hamronization/abricate/tests/tags.yml b/modules/nf-core/hamronization/abricate/tests/tags.yml new file mode 100644 index 00000000000..ed35a9690a0 --- /dev/null +++ b/modules/nf-core/hamronization/abricate/tests/tags.yml @@ -0,0 +1,2 @@ +hamronization/abricate: + - "modules/nf-core/hamronization/abricate/**" diff --git a/modules/nf-core/hamronization/amrfinderplus/environment.yml b/modules/nf-core/hamronization/amrfinderplus/environment.yml index c462be8e0cb..2f9cb27fb35 100644 --- a/modules/nf-core/hamronization/amrfinderplus/environment.yml +++ b/modules/nf-core/hamronization/amrfinderplus/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::hamronization=1.1.1 + - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/amrfinderplus/main.nf b/modules/nf-core/hamronization/amrfinderplus/main.nf index 1b8e3c1ad0f..22a56d6688d 100644 --- a/modules/nf-core/hamronization/amrfinderplus/main.nf +++ b/modules/nf-core/hamronization/amrfinderplus/main.nf @@ -4,8 +4,8 @@ process HAMRONIZATION_AMRFINDERPLUS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/hamronization:1.1.1--pyhdfd78af_0': - 'biocontainers/hamronization:1.1.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/hamronization:1.1.4--pyhdfd78af_0': + 'biocontainers/hamronization:1.1.4--pyhdfd78af_0' }" input: tuple val(meta), path(report) @@ -40,4 +40,15 @@ process HAMRONIZATION_AMRFINDERPLUS { hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.${format} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) + END_VERSIONS + """ } diff --git a/modules/nf-core/hamronization/amrfinderplus/meta.yml b/modules/nf-core/hamronization/amrfinderplus/meta.yml index 4790047e58b..c0997150582 100644 --- a/modules/nf-core/hamronization/amrfinderplus/meta.yml +++ b/modules/nf-core/hamronization/amrfinderplus/meta.yml @@ -13,7 +13,7 @@ tools: homepage: "https://github.com/pha4ge/hAMRonization/" documentation: "https://github.com/pha4ge/hAMRonization/" tool_dev_url: "https://github.com/pha4ge/hAMRonization" - licence: "['GNU Lesser General Public v3 (LGPL v3)']" + licence: ["GNU Lesser General Public v3 (LGPL v3)"] input: - meta: type: map @@ -25,15 +25,15 @@ input: description: Output .tsv file from AMRfinderPlus pattern: "*.tsv" - format: - type: value + type: string description: Type of report file to be produced pattern: "tsv|json" - software_version: - type: value + type: string description: Version of AMRfinder used pattern: "[0-9].[0-9].[0-9]" - reference_db_version: - type: value + type: string description: Database version of ncbi_AMRfinder used pattern: "[0-9]-[0-9]-[0-9].[0-9]" output: diff --git a/modules/nf-core/hamronization/amrfinderplus/tests/main.nf.test b/modules/nf-core/hamronization/amrfinderplus/tests/main.nf.test new file mode 100644 index 00000000000..d74f2f56f08 --- /dev/null +++ b/modules/nf-core/hamronization/amrfinderplus/tests/main.nf.test @@ -0,0 +1,64 @@ +nextflow_process { + + name "Test Process HAMRONIZATION_AMRFINDERPLUS" + script "../main.nf" + process "HAMRONIZATION_AMRFINDERPLUS" + + tag "modules" + tag "modules_nfcore" + tag "hamronization" + tag "hamronization/amrfinderplus" + + test("hamronization/amrfinderplus - delete_me/amrfinderplus - tsv") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/amrfinderplus/test_output.tsv", checkIfExists: true) + ] + input[1] = 'tsv' + input[2] = '3.10.30' + input[3] = '2022-05-26.1' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("hamronization/amrfinderplus - delete_me/amrfinderplus - tsv - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/amrfinderplus/test_output.tsv", checkIfExists: true) + ] + input[1] = 'tsv' + input[2] = '3.10.30' + input[3] = '2022-05-26.1' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/hamronization/amrfinderplus/tests/main.nf.test.snap b/modules/nf-core/hamronization/amrfinderplus/tests/main.nf.test.snap new file mode 100644 index 00000000000..486d8cdc078 --- /dev/null +++ b/modules/nf-core/hamronization/amrfinderplus/tests/main.nf.test.snap @@ -0,0 +1,84 @@ +{ + "hamronization/amrfinderplus - delete_me/amrfinderplus - tsv - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,8a2099aeaf76a6cacfca285faa389257" + ], + "json": [ + + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,8a2099aeaf76a6cacfca285faa389257" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T10:47:35.965140591" + }, + "hamronization/amrfinderplus - delete_me/amrfinderplus - tsv": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,cde9a32a5b0a8902c4a76ebd2a820d4d" + ] + ], + "2": [ + "versions.yml:md5,8a2099aeaf76a6cacfca285faa389257" + ], + "json": [ + + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,cde9a32a5b0a8902c4a76ebd2a820d4d" + ] + ], + "versions": [ + "versions.yml:md5,8a2099aeaf76a6cacfca285faa389257" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T10:47:30.194755603" + } +} \ No newline at end of file diff --git a/modules/nf-core/hamronization/amrfinderplus/tests/tags.yml b/modules/nf-core/hamronization/amrfinderplus/tests/tags.yml new file mode 100644 index 00000000000..d3791c05622 --- /dev/null +++ b/modules/nf-core/hamronization/amrfinderplus/tests/tags.yml @@ -0,0 +1,2 @@ +hamronization/amrfinderplus: + - "modules/nf-core/hamronization/amrfinderplus/**" diff --git a/modules/nf-core/hamronization/deeparg/environment.yml b/modules/nf-core/hamronization/deeparg/environment.yml index 86f99233d9f..c9db54c6a5e 100644 --- a/modules/nf-core/hamronization/deeparg/environment.yml +++ b/modules/nf-core/hamronization/deeparg/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::hamronization=1.1.1 + - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/deeparg/main.nf b/modules/nf-core/hamronization/deeparg/main.nf index d0542a65c39..be3ef0068b8 100644 --- a/modules/nf-core/hamronization/deeparg/main.nf +++ b/modules/nf-core/hamronization/deeparg/main.nf @@ -4,8 +4,8 @@ process HAMRONIZATION_DEEPARG { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/hamronization:1.1.1--pyhdfd78af_0': - 'biocontainers/hamronization:1.1.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/hamronization:1.1.4--pyhdfd78af_0': + 'biocontainers/hamronization:1.1.4--pyhdfd78af_0' }" input: tuple val(meta), path(report) @@ -36,6 +36,17 @@ process HAMRONIZATION_DEEPARG { > ${prefix}.${format} + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.${format} + cat <<-END_VERSIONS > versions.yml "${task.process}": hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) diff --git a/modules/nf-core/hamronization/deeparg/meta.yml b/modules/nf-core/hamronization/deeparg/meta.yml index 46f8174b65b..de01196e9d7 100644 --- a/modules/nf-core/hamronization/deeparg/meta.yml +++ b/modules/nf-core/hamronization/deeparg/meta.yml @@ -23,15 +23,15 @@ input: description: Output .mapping.ARG file from DeepARG pattern: "*.mapping.ARG" - format: - type: value + type: string description: Type of report file to be produced pattern: "tsv|json" - software_version: - type: value + type: string description: Version of DeepARG used pattern: "[0-9].[0-9].[0-9]" - reference_db_version: - type: value + type: integer description: Database version of DeepARG used pattern: "[0-9]" output: diff --git a/modules/nf-core/hamronization/deeparg/tests/main.nf.test b/modules/nf-core/hamronization/deeparg/tests/main.nf.test new file mode 100644 index 00000000000..88dd17008fc --- /dev/null +++ b/modules/nf-core/hamronization/deeparg/tests/main.nf.test @@ -0,0 +1,64 @@ +nextflow_process { + + name "Test Process HAMRONIZATION_DEEPARG" + script "../main.nf" + process "HAMRONIZATION_DEEPARG" + + tag "modules" + tag "modules_nfcore" + tag "hamronization" + tag "hamronization/deeparg" + + test("hamronization/deeparg - bacteroides_fragilis - genome_mapping_potential_arg") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['hamronization']['genome_mapping_potential_arg'], checkIfExists: true), + ] + input[1] = 'tsv' + input[2] = '1.0.2' + input[3] = '2' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("hamronization/deeparg - bacteroides_fragilis - genome_mapping_potential_arg - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['hamronization']['genome_mapping_potential_arg'], checkIfExists: true), + ] + input[1] = 'tsv' + input[2] = '1.0.2' + input[3] = '2' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/hamronization/deeparg/tests/main.nf.test.snap b/modules/nf-core/hamronization/deeparg/tests/main.nf.test.snap new file mode 100644 index 00000000000..d680080b690 --- /dev/null +++ b/modules/nf-core/hamronization/deeparg/tests/main.nf.test.snap @@ -0,0 +1,84 @@ +{ + "hamronization/deeparg - bacteroides_fragilis - genome_mapping_potential_arg - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,2f75284447982578412e05eb09c5367f" + ], + "json": [ + + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,2f75284447982578412e05eb09c5367f" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T00:43:44.834346159" + }, + "hamronization/deeparg - bacteroides_fragilis - genome_mapping_potential_arg": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,e886d665bf9fc266be8193859863d2f4" + ] + ], + "2": [ + "versions.yml:md5,2f75284447982578412e05eb09c5367f" + ], + "json": [ + + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,e886d665bf9fc266be8193859863d2f4" + ] + ], + "versions": [ + "versions.yml:md5,2f75284447982578412e05eb09c5367f" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T10:32:36.722182719" + } +} \ No newline at end of file diff --git a/modules/nf-core/hamronization/deeparg/tests/tags.yml b/modules/nf-core/hamronization/deeparg/tests/tags.yml new file mode 100644 index 00000000000..0dedf03de16 --- /dev/null +++ b/modules/nf-core/hamronization/deeparg/tests/tags.yml @@ -0,0 +1,2 @@ +hamronization/deeparg: + - "modules/nf-core/hamronization/deeparg/**" diff --git a/modules/nf-core/hamronization/fargene/environment.yml b/modules/nf-core/hamronization/fargene/environment.yml index 4f5a755795a..6507e7d42c6 100644 --- a/modules/nf-core/hamronization/fargene/environment.yml +++ b/modules/nf-core/hamronization/fargene/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::hamronization=1.1.1 + - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/fargene/main.nf b/modules/nf-core/hamronization/fargene/main.nf index 9f3de8021d7..ca1edc73983 100644 --- a/modules/nf-core/hamronization/fargene/main.nf +++ b/modules/nf-core/hamronization/fargene/main.nf @@ -4,8 +4,8 @@ process HAMRONIZATION_FARGENE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/hamronization:1.1.1--pyhdfd78af_0': - 'biocontainers/hamronization:1.1.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/hamronization:1.1.4--pyhdfd78af_0': + 'biocontainers/hamronization:1.1.4--pyhdfd78af_0' }" input: tuple val(meta), path(report) @@ -40,4 +40,15 @@ process HAMRONIZATION_FARGENE { hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + echo "stub" > ${prefix}.${format} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) + END_VERSIONS + """ } diff --git a/modules/nf-core/hamronization/fargene/meta.yml b/modules/nf-core/hamronization/fargene/meta.yml index 8bc16e362f1..45a3811de7d 100644 --- a/modules/nf-core/hamronization/fargene/meta.yml +++ b/modules/nf-core/hamronization/fargene/meta.yml @@ -13,7 +13,7 @@ tools: homepage: "https://github.com/pha4ge/hAMRonization/" documentation: "https://github.com/pha4ge/hAMRonization/" tool_dev_url: "https://github.com/pha4ge/hAMRonization" - licence: "['GNU Lesser General Public v3 (LGPL v3)']" + licence: ["GNU Lesser General Public v3 (LGPL v3)"] input: - meta: type: map @@ -25,15 +25,15 @@ input: description: Output .txt file from fARGene pattern: "*.txt" - format: - type: value + type: string description: Type of report file to be produced pattern: "tsv|json" - software_version: - type: value + type: string description: Version of fARGene used pattern: "[0-9].[0-9].[0-9]" - reference_db_version: - type: value + type: string description: Database version of fARGene used pattern: "[0-9].[0-9].[0-9]" output: diff --git a/modules/nf-core/hamronization/fargene/tests/main.nf.test b/modules/nf-core/hamronization/fargene/tests/main.nf.test new file mode 100644 index 00000000000..39fc6854813 --- /dev/null +++ b/modules/nf-core/hamronization/fargene/tests/main.nf.test @@ -0,0 +1,82 @@ +nextflow_process { + + name "Test Process HAMRONIZATION_FARGENE" + script "../main.nf" + process "HAMRONIZATION_FARGENE" + + tag "modules" + tag "modules_nfcore" + tag "hamronization" + tag "hamronization/fargene" + tag "gunzip" + tag "fargene" + + test("hamronization/fargene - bacteroides_fragilis - illumina - fa.gz/gunzip") { + setup { + + run("GUNZIP") { + script "../../../gunzip/main.nf" + process { + """ + input[0] = Channel.fromList([ + tuple([ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true)) + ]) + """ + } + } + + run("FARGENE") { + script "../../../fargene/main.nf" + process { + """ + input[0] = GUNZIP.out.gunzip + input[1] = 'class_a' + """ + } + } + } + + when { + process { + """ + input[0] = FARGENE.out.hmm + input[1] = 'tsv' + input[2] = '0.1' + input[3] = '0.1' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.tsv.get(0).get(1)).exists() }, // No md5 check because of empty file + { assert snapshot(process.out.versions).match("versions") } + ) + } + } + + test("hamronization/fargene - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [id: 'test'], file("dummy.fa") ] + input[1] = 'tsv' + input[2] = '0.1' + input[3] = '0.1' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/hamronization/fargene/tests/main.nf.test.snap b/modules/nf-core/hamronization/fargene/tests/main.nf.test.snap new file mode 100644 index 00000000000..92109281d86 --- /dev/null +++ b/modules/nf-core/hamronization/fargene/tests/main.nf.test.snap @@ -0,0 +1,53 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,a961ebe5815800b3b27c935a4ecbf7f3" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T01:00:12.698539434" + }, + "hamronization/fargene - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + "test.tsv:md5,f50b84b1db4b83ba62ec1deacc69c260" + ] + ], + "2": [ + "versions.yml:md5,a961ebe5815800b3b27c935a4ecbf7f3" + ], + "json": [ + + ], + "tsv": [ + [ + { + "id": "test" + }, + "test.tsv:md5,f50b84b1db4b83ba62ec1deacc69c260" + ] + ], + "versions": [ + "versions.yml:md5,a961ebe5815800b3b27c935a4ecbf7f3" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T01:00:18.784613823" + } +} \ No newline at end of file diff --git a/modules/nf-core/hamronization/fargene/tests/tags.yml b/modules/nf-core/hamronization/fargene/tests/tags.yml new file mode 100644 index 00000000000..4935792810f --- /dev/null +++ b/modules/nf-core/hamronization/fargene/tests/tags.yml @@ -0,0 +1,2 @@ +hamronization/fargene: + - "modules/nf-core/hamronization/fargene/**" diff --git a/modules/nf-core/hamronization/rgi/environment.yml b/modules/nf-core/hamronization/rgi/environment.yml index 6fa71205140..91d03e499b4 100644 --- a/modules/nf-core/hamronization/rgi/environment.yml +++ b/modules/nf-core/hamronization/rgi/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::hamronization=1.1.1 + - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/rgi/main.nf b/modules/nf-core/hamronization/rgi/main.nf index c9bfbeaa79c..9a99a0ffac2 100644 --- a/modules/nf-core/hamronization/rgi/main.nf +++ b/modules/nf-core/hamronization/rgi/main.nf @@ -4,8 +4,8 @@ process HAMRONIZATION_RGI { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/hamronization:1.1.1--pyhdfd78af_0': - 'biocontainers/hamronization:1.1.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/hamronization:1.1.4--pyhdfd78af_0': + 'biocontainers/hamronization:1.1.4--pyhdfd78af_0' }" input: tuple val(meta), path(report) @@ -40,4 +40,15 @@ process HAMRONIZATION_RGI { hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.${format} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) + END_VERSIONS + """ } diff --git a/modules/nf-core/hamronization/rgi/meta.yml b/modules/nf-core/hamronization/rgi/meta.yml index 5af86056ced..0cca850261c 100644 --- a/modules/nf-core/hamronization/rgi/meta.yml +++ b/modules/nf-core/hamronization/rgi/meta.yml @@ -13,7 +13,7 @@ tools: homepage: "https://github.com/pha4ge/hAMRonization/" documentation: "https://github.com/pha4ge/hAMRonization/" tool_dev_url: "https://github.com/pha4ge/hAMRonization" - licence: "['GNU Lesser General Public v3 (LGPL v3)']" + licence: ["GNU Lesser General Public v3 (LGPL v3)"] input: - meta: type: map @@ -25,15 +25,15 @@ input: description: Output .txt file from RGI pattern: "*.txt" - format: - type: value + type: string description: Type of report file to be produced pattern: "tsv|json" - software_version: - type: value + type: string description: Version of DeepARG used pattern: "[0-9].[0-9].[0-9]" - reference_db_version: - type: value + type: string description: Database version of DeepARG used pattern: "[0-9].[0-9].[0-9]" output: diff --git a/modules/nf-core/hamronization/rgi/tests/main.nf.test b/modules/nf-core/hamronization/rgi/tests/main.nf.test new file mode 100644 index 00000000000..3d1246c14be --- /dev/null +++ b/modules/nf-core/hamronization/rgi/tests/main.nf.test @@ -0,0 +1,70 @@ +nextflow_process { + + name "Test Process HAMRONIZATION_RGI" + script "../main.nf" + process "HAMRONIZATION_RGI" + + tag "modules" + tag "modules_nfcore" + tag "hamronization" + tag "hamronization/rgi" + tag "rgi/main" + + setup { + run("RGI_MAIN") { + script "../../../rgi/main/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true) + ] + """ + } + } + } + + test("hamronization/amrfinderplus - haemophilus_influenzae - genome - fna.gz") { + + when { + process { + """ + input[0] = RGI_MAIN.out.tsv + input[1] = 'tsv' + input[2] = '1.0.2' + input[3] = '3.2.3' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("hamronization/amrfinderplus - haemophilus_influenzae - genome - fna.gz - stub") { + + options "-stub" + + when { + process { + """ + input[0] = RGI_MAIN.out.tsv + input[1] = 'tsv' + input[2] = '1.0.2' + input[3] = '3.2.3' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/hamronization/rgi/tests/main.nf.test.snap b/modules/nf-core/hamronization/rgi/tests/main.nf.test.snap new file mode 100644 index 00000000000..919da9a4a76 --- /dev/null +++ b/modules/nf-core/hamronization/rgi/tests/main.nf.test.snap @@ -0,0 +1,84 @@ +{ + "hamronization/amrfinderplus - haemophilus_influenzae - genome - fna.gz": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,573e4aae777fc00485a033acb7dcc8fb" + ] + ], + "2": [ + "versions.yml:md5,aa58854ac6d5892e025ca2bd8db4e677" + ], + "json": [ + + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,573e4aae777fc00485a033acb7dcc8fb" + ] + ], + "versions": [ + "versions.yml:md5,aa58854ac6d5892e025ca2bd8db4e677" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T00:14:38.91140175" + }, + "hamronization/amrfinderplus - haemophilus_influenzae - genome - fna.gz - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,aa58854ac6d5892e025ca2bd8db4e677" + ], + "json": [ + + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,aa58854ac6d5892e025ca2bd8db4e677" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T00:24:48.757808054" + } +} \ No newline at end of file diff --git a/modules/nf-core/hamronization/rgi/tests/tags.yml b/modules/nf-core/hamronization/rgi/tests/tags.yml new file mode 100644 index 00000000000..40c55588304 --- /dev/null +++ b/modules/nf-core/hamronization/rgi/tests/tags.yml @@ -0,0 +1,2 @@ +hamronization/rgi: + - "modules/nf-core/hamronization/rgi/**" diff --git a/modules/nf-core/hamronization/summarize/environment.yml b/modules/nf-core/hamronization/summarize/environment.yml index 0f8f05d320a..1872a689cb5 100644 --- a/modules/nf-core/hamronization/summarize/environment.yml +++ b/modules/nf-core/hamronization/summarize/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::hamronization=1.1.1 + - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/summarize/main.nf b/modules/nf-core/hamronization/summarize/main.nf index 8d2310f4602..358ad83fd9b 100644 --- a/modules/nf-core/hamronization/summarize/main.nf +++ b/modules/nf-core/hamronization/summarize/main.nf @@ -3,8 +3,8 @@ process HAMRONIZATION_SUMMARIZE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/hamronization:1.1.1--pyhdfd78af_0': - 'biocontainers/hamronization:1.1.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/hamronization:1.1.4--pyhdfd78af_0': + 'biocontainers/hamronization:1.1.4--pyhdfd78af_0' }" input: path(reports) @@ -35,4 +35,15 @@ process HAMRONIZATION_SUMMARIZE { hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) END_VERSIONS """ + + stub: + def outformat = format == 'interactive' ? 'html' : format + """ + touch hamronization_combined_report.${outformat} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) + END_VERSIONS + """ } diff --git a/modules/nf-core/hamronization/summarize/meta.yml b/modules/nf-core/hamronization/summarize/meta.yml index 24ecff8e21e..7d4c7b688ba 100644 --- a/modules/nf-core/hamronization/summarize/meta.yml +++ b/modules/nf-core/hamronization/summarize/meta.yml @@ -17,7 +17,7 @@ input: description: List of multiple hAMRonization reports in either JSON or TSV format pattern: "*.{json,tsv}" - format: - type: value + type: string description: Type of final combined report file to be produced pattern: "tsv|json|interactive" output: diff --git a/modules/nf-core/hamronization/summarize/tests/main.nf.test b/modules/nf-core/hamronization/summarize/tests/main.nf.test new file mode 100644 index 00000000000..0c3da24cf87 --- /dev/null +++ b/modules/nf-core/hamronization/summarize/tests/main.nf.test @@ -0,0 +1,106 @@ +nextflow_process { + + name "Test Process HAMRONIZATION_SUMMARIZE" + script "../main.nf" + process "HAMRONIZATION_SUMMARIZE" + + tag "modules" + tag "modules_nfcore" + tag "hamronization" + tag "hamronization/summarize" + tag "hamronization/deeparg" + + setup { + run("HAMRONIZATION_DEEPARG", alias: "HAMRONIZATION_DEEPARG1") { + script "../../deeparg/main.nf" + process { + """ + input[0] = [ + [ id:'test1', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['hamronization']['genome_mapping_potential_arg'], checkIfExists: true), + ] + input[1] = 'tsv' + input[2] = '1.0.2' + input[3] = '2' + """ + } + } + + run("HAMRONIZATION_DEEPARG", alias: "HAMRONIZATION_DEEPARG2") { + script "../../deeparg/main.nf" + process { + """ + input[0] = [ + [ id:'test2', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['hamronization']['genome_mapping_potential_arg'], checkIfExists: true), + ] + input[1] = 'tsv' + input[2] = '1.0.2' + input[3] = '2' + """ + } + } + } + + test("hamronization/summarize - bacteroides_fragilis - hamronization - arg") { + + when { + process { + """ + ch_deeparg_run_one = HAMRONIZATION_DEEPARG1.out.tsv + ch_deeparg_run_two = HAMRONIZATION_DEEPARG2.out.tsv + + ch_deeparg_run_one + .mix( ch_deeparg_run_two ) + .map{ + [ it[1] ] + } + .collect() + .set { ch_input_for_summarize } + + input[0] = ch_input_for_summarize + input[1] = 'json' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("hamronization/summarize - stub") { + + options "-stub" + + when { + process { + """ + ch_deeparg_run_one = HAMRONIZATION_DEEPARG1.out.tsv + ch_deeparg_run_two = HAMRONIZATION_DEEPARG2.out.tsv + + ch_deeparg_run_one + .mix( ch_deeparg_run_two ) + .map{ + [ it[1] ] + } + .collect() + .set { ch_input_for_summarize } + + input[0] = ch_input_for_summarize + input[1] = 'json' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/hamronization/summarize/tests/main.nf.test.snap b/modules/nf-core/hamronization/summarize/tests/main.nf.test.snap new file mode 100644 index 00000000000..8449f2ed343 --- /dev/null +++ b/modules/nf-core/hamronization/summarize/tests/main.nf.test.snap @@ -0,0 +1,72 @@ +{ + "hamronization/summarize - stub": { + "content": [ + { + "0": [ + "hamronization_combined_report.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,c8de17c417d53c848738d4bf7a419e2e" + ], + "html": [ + + ], + "json": [ + "hamronization_combined_report.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "tsv": [ + + ], + "versions": [ + "versions.yml:md5,c8de17c417d53c848738d4bf7a419e2e" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T00:28:03.124164682" + }, + "hamronization/summarize - bacteroides_fragilis - hamronization - arg": { + "content": [ + { + "0": [ + "hamronization_combined_report.json:md5,b27855689f41a9a95ddcfbf6c02d3528" + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,c8de17c417d53c848738d4bf7a419e2e" + ], + "html": [ + + ], + "json": [ + "hamronization_combined_report.json:md5,b27855689f41a9a95ddcfbf6c02d3528" + ], + "tsv": [ + + ], + "versions": [ + "versions.yml:md5,c8de17c417d53c848738d4bf7a419e2e" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T15:04:33.885586093" + } +} \ No newline at end of file diff --git a/modules/nf-core/hamronization/summarize/tests/tags.yml b/modules/nf-core/hamronization/summarize/tests/tags.yml new file mode 100644 index 00000000000..f98ff5996e7 --- /dev/null +++ b/modules/nf-core/hamronization/summarize/tests/tags.yml @@ -0,0 +1,2 @@ +hamronization/summarize: + - "modules/nf-core/hamronization/summarize/**" diff --git a/modules/nf-core/quartonotebook/Dockerfile b/modules/nf-core/quartonotebook/Dockerfile new file mode 100644 index 00000000000..0acc6f0a24e --- /dev/null +++ b/modules/nf-core/quartonotebook/Dockerfile @@ -0,0 +1,38 @@ +# +# First stage: Quarto installation +# +FROM ubuntu:20.04 as quarto +ARG QUARTO_VERSION=1.3.433 +ARG TARGETARCH +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + && apt-get clean + +RUN mkdir -p /opt/quarto \ + && curl -o quarto.tar.gz -L "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-${TARGETARCH}.tar.gz" \ + && tar -zxvf quarto.tar.gz -C /opt/quarto/ --strip-components=1 \ + && rm quarto.tar.gz + +# +# Second stage: Conda environment +# +FROM condaforge/mambaforge:23.11.0-0 +COPY --from=quarto /opt/quarto /opt/quarto +ENV PATH="${PATH}:/opt/quarto/bin" + +# Install packages using Mamba; also remove static libraries, python bytecode +# files and javascript source maps that are not required for execution +COPY environment.yml ./ +RUN mamba env update --name base --file environment.yml \ + && mamba clean --all --force-pkgs-dirs --yes \ + && find /opt/conda -follow -type f -name '*.a' -delete \ + && find /opt/conda -follow -type f -name '*.pyc' -delete \ + && find /opt/conda -follow -type f -name '*.js.map' -delete + +CMD /bin/bash + +LABEL \ + authors = "Erik Fasterius" \ + description = "Dockerfile for the quartonotebook nf-core module" diff --git a/modules/nf-core/quartonotebook/environment.yml b/modules/nf-core/quartonotebook/environment.yml new file mode 100644 index 00000000000..1084ec03ee0 --- /dev/null +++ b/modules/nf-core/quartonotebook/environment.yml @@ -0,0 +1,12 @@ +name: quartonotebook + +channels: + - conda-forge + - bioconda + - defaults + +dependencies: + - conda-forge::jupyter=1.0.0 + - conda-forge::matplotlib=3.4.3 + - conda-forge::papermill=2.4.0 + - conda-forge::r-rmarkdown=2.25 diff --git a/modules/nf-core/quartonotebook/main.nf b/modules/nf-core/quartonotebook/main.nf new file mode 100644 index 00000000000..45a2d187d10 --- /dev/null +++ b/modules/nf-core/quartonotebook/main.nf @@ -0,0 +1,107 @@ +include { dumpParamsYaml; indentCodeBlock } from "./parametrize" + +process QUARTONOTEBOOK { + tag "$meta.id" + label 'process_low' + + // NB: You'll likely want to override this with a container containing all + // required dependencies for your analyses. You'll at least need Quarto + // itself, Papermill and whatever language you are running your analyses on; + // you can see an example in this module's Dockerfile. + container "docker.io/erikfas/quartonotebook" + + input: + tuple val(meta), path(notebook) + val parameters + path input_files + path extensions + + output: + tuple val(meta), path("*.html") , emit: html + tuple val(meta), path("${notebook}"), emit: notebook + tuple val(meta), path("artifacts/*"), emit: artifacts, optional: true + tuple val(meta), path("params.yml") , emit: params_yaml, optional: true + tuple val(meta), path("_extensions"), emit: extensions, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + // This is because of issues with getting a homogenous environment across + // both AMD64 and ARM64 architectures; please find more information at + // https://github.com/nf-core/modules/pull/4876#discussion_r1483541037. + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "The QUARTONOTEBOOK module does not support Conda/Mamba, please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def parametrize = (task.ext.parametrize == null) ? true : task.ext.parametrize + def implicit_params = (task.ext.implicit_params == null) ? true : task.ext.implicit_params + def meta_params = (task.ext.meta_params == null) ? true : task.ext.meta_params + + // Dump parameters to yaml file. + // Using a YAML file over using the CLI params because + // - No issue with escaping + // - Allows passing nested maps instead of just single values + // - Allows running with the language-agnostic `--execute-params` + def params_cmd = "" + def render_args = "" + if (parametrize) { + nb_params = [:] + if (implicit_params) { + nb_params["cpus"] = task.cpus + nb_params["artifact_dir"] = "artifacts" + nb_params["input_dir"] = "./" + } + if (meta_params) { + nb_params["meta"] = meta + } + nb_params += parameters + params_cmd = dumpParamsYaml(nb_params) + render_args = "--execute-params params.yml" + } + """ + # Dump .params.yml heredoc (section will be empty if parametrization is disabled) + ${indentCodeBlock(params_cmd, 4)} + + # Create output directory + mkdir artifacts + + # Set environment variables needed for Quarto rendering + export XDG_CACHE_HOME="./.xdg_cache_home" + export XDG_DATA_HOME="./.xdg_data_home" + + # Set parallelism for BLAS/MKL etc. to avoid over-booking of resources + export MKL_NUM_THREADS="$task.cpus" + export OPENBLAS_NUM_THREADS="$task.cpus" + export OMP_NUM_THREADS="$task.cpus" + export NUMBA_NUM_THREADS="$task.cpus" + + # Render notebook + quarto render \\ + ${notebook} \\ + ${render_args} \\ + ${args} \\ + --output ${prefix}.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + quarto: \$(quarto -v) + papermill: \$(papermill --version | cut -f1 -d' ') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + quarto: \$(quarto -v) + END_VERSIONS + """ +} diff --git a/modules/nf-core/quartonotebook/meta.yml b/modules/nf-core/quartonotebook/meta.yml new file mode 100644 index 00000000000..5d95e8b6630 --- /dev/null +++ b/modules/nf-core/quartonotebook/meta.yml @@ -0,0 +1,83 @@ +name: "quartonotebook" +description: Render a Quarto notebook, including parametrization. +keywords: + - quarto + - notebook + - reports + - python + - r +tools: + - quartonotebook: + description: An open-source scientific and technical publishing system. + homepage: https://quarto.org/ + documentation: https://quarto.org/docs/reference/ + tool_dev_url: https://github.com/quarto-dev/quarto-cli + licence: ["MIT"] + - papermill: + description: Parameterize, execute, and analyze notebooks + homepage: https://github.com/nteract/papermill + documentation: http://papermill.readthedocs.io/en/latest/ + tool_dev_url: https://github.com/nteract/papermill + licence: ["BSD 3-clause"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]`. + - notebook: + type: file + description: The Quarto notebook to be rendered. + pattern: "*.{qmd}" + - parameters: + type: map + description: | + Groovy map with notebook parameters which will be passed to Quarto to + generate parametrized reports. + - input_files: + type: file + description: One or multiple files serving as input data for the notebook. + pattern: "*" + - extensions: + type: file + description: | + A quarto `_extensions` directory with custom template(s) to be + available for rendering. + pattern: "*" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]`. + - html: + type: file + description: HTML report generated by Quarto. + pattern: "*.html" + - notebook: + type: file + description: The original, un-rendered notebook. + pattern: "*.[qmd,ipynb,rmd]" + - artifacts: + type: file + description: Artifacts generated during report rendering. + pattern: "*" + - params_yaml: + type: file + description: Parameters used during report rendering. + pattern: "*" + - extensions: + type: file + description: Quarto extensions used during report rendering. + pattern: "*" + - versions: + type: file + description: File containing software versions. + pattern: "versions.yml" + +authors: + - "@fasterius" +maintainers: + - "@fasterius" diff --git a/modules/nf-core/quartonotebook/parametrize.nf b/modules/nf-core/quartonotebook/parametrize.nf new file mode 100644 index 00000000000..b3d8ceaa572 --- /dev/null +++ b/modules/nf-core/quartonotebook/parametrize.nf @@ -0,0 +1,36 @@ +import org.yaml.snakeyaml.Yaml +import org.yaml.snakeyaml.DumperOptions + + +/** + * Multiline code blocks need to have the same indentation level + * as the `script:` section. This function re-indents code to the specified level. + */ +def indentCodeBlock(code, n_spaces) { + def indent_str = " ".multiply(n_spaces) + return code.stripIndent().split("\n").join("\n" + indent_str) +} + +/** + * Create a config YAML file from a groovy map + * + * @params task The process' `task` variable + * @returns a line to be inserted in the bash script. + */ +def dumpParamsYaml(params) { + DumperOptions options = new DumperOptions(); + options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); + def yaml = new Yaml(options) + def yaml_str = yaml.dump(params) + + // Writing the params.yml file directly as follows does not work. + // It only works in 'exec:', but not if there is a `script:` section: + // task.workDir.resolve('params.yml').text = yaml_str + + // Therefore, we inject it into the bash script: + return """\ + cat <<"END_PARAMS_SECTION" > ./params.yml + ${indentCodeBlock(yaml_str, 8)} + END_PARAMS_SECTION + """ +} diff --git a/modules/nf-core/quartonotebook/tests/main.nf.test b/modules/nf-core/quartonotebook/tests/main.nf.test new file mode 100644 index 00000000000..aeec8b1e504 --- /dev/null +++ b/modules/nf-core/quartonotebook/tests/main.nf.test @@ -0,0 +1,212 @@ +nextflow_process { + + name "Test Process QUARTONOTEBOOK" + script "../main.nf" + process "QUARTONOTEBOOK" + + tag "modules" + tag "modules_nfcore" + tag "quartonotebook" + + test("test notebook - [qmd:r]") { + + config "./no-parametrization.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['generic']['notebooks']['quarto_r'], checkIfExists: true) // Notebook + ] + input[1] = [:] // Parameters + input[2] = [] // Input files + input[3] = [] // Extensions + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + + } + + test("test notebook - [qmd:python]") { + + config "./no-parametrization.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['generic']['notebooks']['quarto_python'], checkIfExists: true) // Notebook + ] + input[1] = [] // Parameters + input[2] = [] // Input files + input[3] = [] // Extensions + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.versions, + process.out.artifacts, + process.out.params_yaml, + ).match() }, + { assert path(process.out.html[0][1]).readLines().any { it.contains('Hello world') } } + ) + } + + } + + test("test notebook - parametrized - [qmd:r]") { + + config "./with-parametrization.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['generic']['notebooks']['quarto_r'], checkIfExists: true) // Notebook + ] + input[1] = [input_filename: "hello.txt", n_iter: 12] // parameters + input[2] = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) // Input files + input[3] = [] // Extensions + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + + } + + test("test notebook - parametrized - [qmd:python]") { + + config "./with-parametrization.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['generic']['notebooks']['quarto_python'], checkIfExists: true) // Notebook + ] + input[1] = [input_filename: "hello.txt", n_iter: 12] // parameters + input[2] = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) // Input files + input[3] = [] // Extensions + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.versions, + process.out.artifacts, + process.out.params_yaml, + ).match() }, + { assert path(process.out.html[0][1]).readLines().any { it.contains('Hello world') } } + ) + } + + } + + test("test notebook - parametrized - [rmd]") { + + config "./with-parametrization.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['generic']['notebooks']['rmarkdown'], checkIfExists: true) // notebook + ] + input[1] = [input_filename: "hello.txt", n_iter: 12] // parameters + input[2] = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) // Input files + input[3] = [] // Extensions + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + + } + + test("test notebook - parametrized - [ipynb]") { + + config "./with-parametrization.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['generic']['notebooks']['ipython_ipynb'], checkIfExists: true) // notebook + ] + input[1] = [input_filename: "hello.txt", n_iter: 12] // parameters + input[2] = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) // Input files + input[3] = [] // Extensions + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + + } + + test("test notebook - stub - [qmd:r]") { + + config "./no-parametrization.config" + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['generic']['notebooks']['quarto_r'], checkIfExists: true) // Notebook + ] + input[1] = [:] // Parameters + input[2] = [] // Input files + input[3] = [] // Extensions + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/quartonotebook/tests/main.nf.test.snap b/modules/nf-core/quartonotebook/tests/main.nf.test.snap new file mode 100644 index 00000000000..f0f04cb5ec8 --- /dev/null +++ b/modules/nf-core/quartonotebook/tests/main.nf.test.snap @@ -0,0 +1,433 @@ +{ + "test notebook - stub - [qmd:r]": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "quarto_r.qmd:md5,b3fa8b456efae62495c0b278a4f7694c" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + "versions.yml:md5,93481281b24bb1b44ecc4387e0957a0e" + ], + "artifacts": [ + + ], + "extensions": [ + + ], + "html": [ + [ + { + "id": "test" + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "notebook": [ + [ + { + "id": "test" + }, + "quarto_r.qmd:md5,b3fa8b456efae62495c0b278a4f7694c" + ] + ], + "params_yaml": [ + + ], + "versions": [ + "versions.yml:md5,93481281b24bb1b44ecc4387e0957a0e" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T11:06:33.408525" + }, + "test notebook - [qmd:r]": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.html:md5,f09282296a5eee0154665975d842c07e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "quarto_r.qmd:md5,b3fa8b456efae62495c0b278a4f7694c" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ], + "artifacts": [ + + ], + "extensions": [ + + ], + "html": [ + [ + { + "id": "test" + }, + "test.html:md5,f09282296a5eee0154665975d842c07e" + ] + ], + "notebook": [ + [ + { + "id": "test" + }, + "quarto_r.qmd:md5,b3fa8b456efae62495c0b278a4f7694c" + ] + ], + "params_yaml": [ + + ], + "versions": [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T11:05:50.985424" + }, + "test notebook - parametrized - [qmd:python]": { + "content": [ + [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ], + [ + [ + { + "id": "test" + }, + "artifact.txt:md5,8ddd8be4b179a529afa5f2ffae4b9858" + ] + ], + [ + [ + { + "id": "test" + }, + "params.yml:md5,efd62bc975f429e8749ba787a93042dd" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T09:21:18.194591" + }, + "test notebook - parametrized - [rmd]": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.html:md5,2b2026646ed8b59d49fdcbd54cb3a463" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "rmarkdown_notebook.Rmd:md5,1f5e4efbb41fd499b23c5bea2fc32e68" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "artifact.txt:md5,b10a8db164e0754105b7a99be72e3fe5" + ] + ], + "3": [ + [ + { + "id": "test" + }, + "params.yml:md5,efd62bc975f429e8749ba787a93042dd" + ] + ], + "4": [ + + ], + "5": [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ], + "artifacts": [ + [ + { + "id": "test" + }, + "artifact.txt:md5,b10a8db164e0754105b7a99be72e3fe5" + ] + ], + "extensions": [ + + ], + "html": [ + [ + { + "id": "test" + }, + "test.html:md5,2b2026646ed8b59d49fdcbd54cb3a463" + ] + ], + "notebook": [ + [ + { + "id": "test" + }, + "rmarkdown_notebook.Rmd:md5,1f5e4efbb41fd499b23c5bea2fc32e68" + ] + ], + "params_yaml": [ + [ + { + "id": "test" + }, + "params.yml:md5,efd62bc975f429e8749ba787a93042dd" + ] + ], + "versions": [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T11:06:25.046249" + }, + "test notebook - parametrized - [ipynb]": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.html:md5,d7378ec0d1fd83b44424a68bf03a8fc3" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "ipython_notebook.ipynb:md5,02a206bf6c66396827dd310e7443926d" + ] + ], + "2": [ + + ], + "3": [ + [ + { + "id": "test" + }, + "params.yml:md5,efd62bc975f429e8749ba787a93042dd" + ] + ], + "4": [ + + ], + "5": [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ], + "artifacts": [ + + ], + "extensions": [ + + ], + "html": [ + [ + { + "id": "test" + }, + "test.html:md5,d7378ec0d1fd83b44424a68bf03a8fc3" + ] + ], + "notebook": [ + [ + { + "id": "test" + }, + "ipython_notebook.ipynb:md5,02a206bf6c66396827dd310e7443926d" + ] + ], + "params_yaml": [ + [ + { + "id": "test" + }, + "params.yml:md5,efd62bc975f429e8749ba787a93042dd" + ] + ], + "versions": [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T11:06:30.278412" + }, + "test notebook - [qmd:python]": { + "content": [ + [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ], + [ + + ], + [ + + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T09:21:00.324109" + }, + "test notebook - parametrized - [qmd:r]": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.html:md5,a25cdff28851a163d28669d4e62655af" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "quarto_r.qmd:md5,b3fa8b456efae62495c0b278a4f7694c" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "artifact.txt:md5,b10a8db164e0754105b7a99be72e3fe5" + ] + ], + "3": [ + [ + { + "id": "test" + }, + "params.yml:md5,efd62bc975f429e8749ba787a93042dd" + ] + ], + "4": [ + + ], + "5": [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ], + "artifacts": [ + [ + { + "id": "test" + }, + "artifact.txt:md5,b10a8db164e0754105b7a99be72e3fe5" + ] + ], + "extensions": [ + + ], + "html": [ + [ + { + "id": "test" + }, + "test.html:md5,a25cdff28851a163d28669d4e62655af" + ] + ], + "notebook": [ + [ + { + "id": "test" + }, + "quarto_r.qmd:md5,b3fa8b456efae62495c0b278a4f7694c" + ] + ], + "params_yaml": [ + [ + { + "id": "test" + }, + "params.yml:md5,efd62bc975f429e8749ba787a93042dd" + ] + ], + "versions": [ + "versions.yml:md5,55e1f767fbd72aae14cbbfb638e38a90" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-09T11:06:08.013103" + } +} \ No newline at end of file diff --git a/modules/nf-core/quartonotebook/tests/no-parametrization.config b/modules/nf-core/quartonotebook/tests/no-parametrization.config new file mode 100644 index 00000000000..f6865149a06 --- /dev/null +++ b/modules/nf-core/quartonotebook/tests/no-parametrization.config @@ -0,0 +1,9 @@ +profiles { + docker { + docker.runOptions = '-u $(id -u):$(id -g)' + } +} + +process { + ext.parametrize = false +} diff --git a/modules/nf-core/quartonotebook/tests/tags.yml b/modules/nf-core/quartonotebook/tests/tags.yml new file mode 100644 index 00000000000..638b0ce24c1 --- /dev/null +++ b/modules/nf-core/quartonotebook/tests/tags.yml @@ -0,0 +1,2 @@ +quartonotebook: + - "modules/nf-core/quartonotebook/**" diff --git a/modules/nf-core/quartonotebook/tests/with-parametrization.config b/modules/nf-core/quartonotebook/tests/with-parametrization.config new file mode 100644 index 00000000000..ab7df66f5ea --- /dev/null +++ b/modules/nf-core/quartonotebook/tests/with-parametrization.config @@ -0,0 +1,5 @@ +profiles { + docker { + docker.runOptions = '-u $(id -u):$(id -g)' + } +} diff --git a/modules/nf-core/rhocall/viz/main.nf b/modules/nf-core/rhocall/viz/main.nf index 7c4b9d07487..4191ef3bca9 100644 --- a/modules/nf-core/rhocall/viz/main.nf +++ b/modules/nf-core/rhocall/viz/main.nf @@ -42,6 +42,7 @@ process RHOCALL_VIZ { stub: prefix = task.ext.prefix ?: "${meta.id}" """ + mkdir ${prefix} touch ${prefix}/${prefix}.bed touch ${prefix}/${prefix}.wig diff --git a/modules/nf-core/rsem/preparereference/tests/main.nf.test b/modules/nf-core/rsem/preparereference/tests/main.nf.test index a1d948d4bee..b4493d1ab19 100644 --- a/modules/nf-core/rsem/preparereference/tests/main.nf.test +++ b/modules/nf-core/rsem/preparereference/tests/main.nf.test @@ -16,8 +16,8 @@ nextflow_process { } process { """ - input[0] = Channel.of([file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)]) - input[1] = Channel.of([file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)]) + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)) + input[1] = Channel.of(file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true)) """ } } diff --git a/modules/nf-core/rseqc/bamstat/tests/main.nf.test b/modules/nf-core/rseqc/bamstat/tests/main.nf.test index 1facabea063..2f209b0a761 100644 --- a/modules/nf-core/rseqc/bamstat/tests/main.nf.test +++ b/modules/nf-core/rseqc/bamstat/tests/main.nf.test @@ -22,7 +22,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam') ] """ } diff --git a/modules/nf-core/rseqc/bamstat/tests/main.nf.test.snap b/modules/nf-core/rseqc/bamstat/tests/main.nf.test.snap index 57c764e5740..6e3f0364e17 100644 --- a/modules/nf-core/rseqc/bamstat/tests/main.nf.test.snap +++ b/modules/nf-core/rseqc/bamstat/tests/main.nf.test.snap @@ -26,6 +26,10 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, "timestamp": "2023-12-14T17:00:23.830276754" } } \ No newline at end of file diff --git a/modules/nf-core/sentieon/applyvarcal/main.nf b/modules/nf-core/sentieon/applyvarcal/main.nf index 304d0a04319..d1d3435dc93 100644 --- a/modules/nf-core/sentieon/applyvarcal/main.nf +++ b/modules/nf-core/sentieon/applyvarcal/main.nf @@ -27,7 +27,7 @@ process SENTIEON_APPLYVARCAL { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -74,7 +74,7 @@ process SENTIEON_APPLYVARCAL { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/bwaindex/main.nf b/modules/nf-core/sentieon/bwaindex/main.nf index 0d99cb6742c..e36dcc3413b 100644 --- a/modules/nf-core/sentieon/bwaindex/main.nf +++ b/modules/nf-core/sentieon/bwaindex/main.nf @@ -22,7 +22,7 @@ process SENTIEON_BWAINDEX { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -52,7 +52,7 @@ process SENTIEON_BWAINDEX { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/bwamem/main.nf b/modules/nf-core/sentieon/bwamem/main.nf index e25515e7eb7..230297d087c 100644 --- a/modules/nf-core/sentieon/bwamem/main.nf +++ b/modules/nf-core/sentieon/bwamem/main.nf @@ -27,7 +27,7 @@ process SENTIEON_BWAMEM { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -77,7 +77,7 @@ process SENTIEON_BWAMEM { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/datametrics/main.nf b/modules/nf-core/sentieon/datametrics/main.nf index 3be2d11ab86..d1678187169 100644 --- a/modules/nf-core/sentieon/datametrics/main.nf +++ b/modules/nf-core/sentieon/datametrics/main.nf @@ -31,7 +31,7 @@ process SENTIEON_DATAMETRICS { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -83,7 +83,7 @@ process SENTIEON_DATAMETRICS { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/dedup/main.nf b/modules/nf-core/sentieon/dedup/main.nf index 316993cc158..fbcd595f477 100644 --- a/modules/nf-core/sentieon/dedup/main.nf +++ b/modules/nf-core/sentieon/dedup/main.nf @@ -32,7 +32,7 @@ process SENTIEON_DEDUP { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -84,7 +84,7 @@ process SENTIEON_DEDUP { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/dnamodelapply/main.nf b/modules/nf-core/sentieon/dnamodelapply/main.nf index 1cbb02e3b37..b728a5ec311 100644 --- a/modules/nf-core/sentieon/dnamodelapply/main.nf +++ b/modules/nf-core/sentieon/dnamodelapply/main.nf @@ -28,7 +28,7 @@ process SENTIEON_DNAMODELAPPLY { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -77,7 +77,7 @@ process SENTIEON_DNAMODELAPPLY { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/dnascope/main.nf b/modules/nf-core/sentieon/dnascope/main.nf index 7e5adefc7c6..6adea35eea0 100644 --- a/modules/nf-core/sentieon/dnascope/main.nf +++ b/modules/nf-core/sentieon/dnascope/main.nf @@ -35,7 +35,7 @@ process SENTIEON_DNASCOPE { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -94,7 +94,7 @@ process SENTIEON_DNASCOPE { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/gvcftyper/main.nf b/modules/nf-core/sentieon/gvcftyper/main.nf index d2be759fe30..4b5c9df4e38 100644 --- a/modules/nf-core/sentieon/gvcftyper/main.nf +++ b/modules/nf-core/sentieon/gvcftyper/main.nf @@ -29,7 +29,7 @@ process SENTIEON_GVCFTYPER { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -72,7 +72,7 @@ process SENTIEON_GVCFTYPER { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/haplotyper/main.nf b/modules/nf-core/sentieon/haplotyper/main.nf index d349525dea5..87a93434741 100644 --- a/modules/nf-core/sentieon/haplotyper/main.nf +++ b/modules/nf-core/sentieon/haplotyper/main.nf @@ -33,7 +33,7 @@ process SENTIEON_HAPLOTYPER { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -90,7 +90,7 @@ process SENTIEON_HAPLOTYPER { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/readwriter/main.nf b/modules/nf-core/sentieon/readwriter/main.nf index b9afe576bde..0bace53833f 100644 --- a/modules/nf-core/sentieon/readwriter/main.nf +++ b/modules/nf-core/sentieon/readwriter/main.nf @@ -28,7 +28,7 @@ process SENTIEON_READWRITER { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -82,7 +82,7 @@ process SENTIEON_READWRITER { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/tnfilter/main.nf b/modules/nf-core/sentieon/tnfilter/main.nf index 2550aab8993..75c4c48ef4c 100644 --- a/modules/nf-core/sentieon/tnfilter/main.nf +++ b/modules/nf-core/sentieon/tnfilter/main.nf @@ -28,7 +28,7 @@ process SENTIEON_TNFILTER { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -82,7 +82,7 @@ process SENTIEON_TNFILTER { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/tnhaplotyper2/main.nf b/modules/nf-core/sentieon/tnhaplotyper2/main.nf index 0fc2dd8a5a4..840d9486a9c 100644 --- a/modules/nf-core/sentieon/tnhaplotyper2/main.nf +++ b/modules/nf-core/sentieon/tnhaplotyper2/main.nf @@ -38,7 +38,7 @@ process SENTIEON_TNHAPLOTYPER2 { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -109,7 +109,7 @@ process SENTIEON_TNHAPLOTYPER2 { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/tnscope/main.nf b/modules/nf-core/sentieon/tnscope/main.nf index 913b8173f86..4ec778e4014 100644 --- a/modules/nf-core/sentieon/tnscope/main.nf +++ b/modules/nf-core/sentieon/tnscope/main.nf @@ -31,7 +31,7 @@ process SENTIEON_TNSCOPE { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -89,7 +89,7 @@ process SENTIEON_TNSCOPE { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/varcal/main.nf b/modules/nf-core/sentieon/varcal/main.nf index 7a0c807127c..17a3b718454 100644 --- a/modules/nf-core/sentieon/varcal/main.nf +++ b/modules/nf-core/sentieon/varcal/main.nf @@ -32,7 +32,7 @@ process SENTIEON_VARCAL { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -96,7 +96,7 @@ process SENTIEON_VARCAL { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/sentieon/wgsmetrics/main.nf b/modules/nf-core/sentieon/wgsmetrics/main.nf index b16641d9194..a028e4a157d 100644 --- a/modules/nf-core/sentieon/wgsmetrics/main.nf +++ b/modules/nf-core/sentieon/wgsmetrics/main.nf @@ -28,7 +28,7 @@ process SENTIEON_WGSMETRICS { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' @@ -78,7 +78,7 @@ process SENTIEON_WGSMETRICS { // 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') { + if (workflow.containerEngine in ['singularity','apptainer']) { fix_ld_library_path = 'LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH;export LD_LIBRARY_PATH' } else { fix_ld_library_path = '' diff --git a/modules/nf-core/seqkit/concat/environment.yml b/modules/nf-core/seqkit/concat/environment.yml new file mode 100644 index 00000000000..67f003dc24c --- /dev/null +++ b/modules/nf-core/seqkit/concat/environment.yml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +name: "seqkit_concat" +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - "bioconda::seqkit=2.7.0" diff --git a/modules/nf-core/seqkit/concat/main.nf b/modules/nf-core/seqkit/concat/main.nf new file mode 100644 index 00000000000..534db39c76a --- /dev/null +++ b/modules/nf-core/seqkit/concat/main.nf @@ -0,0 +1,46 @@ +process SEQKIT_CONCAT { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqkit:2.7.0--h9ee0642_0': + 'biocontainers/seqkit:2.7.0--h9ee0642_0' }" + + input: + tuple val(meta), path(input, stageAs: 'in/*') + + output: + tuple val(meta), path("*.{fasta,fastq,fa,fq,fas,fna,faa}"), emit: fastx + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + def file_type = input instanceof List ? input[0].getExtension() : input.getExtension() + """ + seqkit \\ + concat \\ + $args \\ + in/* > ${prefix}.${file_type} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$(seqkit version | cut -d' ' -f2) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$(seqkit version | cut -d' ' -f2) + END_VERSIONS + """ +} diff --git a/modules/nf-core/seqkit/concat/meta.yml b/modules/nf-core/seqkit/concat/meta.yml new file mode 100644 index 00000000000..2fd9ff24cf1 --- /dev/null +++ b/modules/nf-core/seqkit/concat/meta.yml @@ -0,0 +1,54 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "seqkit_concat" +description: Concatenating multiple uncompressed sequence files together +keywords: + - concat + - fasta + - fastq + - merge +tools: + - seqkit: + description: | + Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. + homepage: https://github.com/shenwei356/seqkit + documentation: https://bioinf.shenwei.me/seqkit/ + tool_dev_url: https://github.com/shenwei356/seqkit + doi: 10.1371/journal.pone.0163962 + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + + - input: + type: file + description: Sequence file in fasta/q format + pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}" + +## TODO nf-core: Add a description of all of the variables used as output +output: + #Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + + - fastx: + type: file + description: A concatenated sequence file + pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}" + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@DLBPointon" +maintainers: + - "@DLBPointon" diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test new file mode 100644 index 00000000000..89440947a41 --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test @@ -0,0 +1,66 @@ +nextflow_process { + + name "Test Process SEQKIT_CONCAT" + script "../main.nf" + process "SEQKIT_CONCAT" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "seqkit" + tag "seqkit/concat" + + test("sarscov2 and human primers - fasta") { + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['pacbio']['primers'], checkIfExists: true ) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match()} + ) + with(process.out.fastx) { + // Including headers from both input files + assert path(get(0).get(1)).readLines().any { it.contains('>NEB_Clontech_3p') } + assert path(get(0).get(1)).readLines().any { it.contains('>MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome') } + } + } + } + + test("sarscov2 and human primers - fasta - stub") { + + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['pacbio']['primers'], checkIfExists: true ) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match()} + ) + } + } +} diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap new file mode 100644 index 00000000000..d4be00e5b0d --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -0,0 +1,18 @@ +{ + "sarscov2 and human primers - fasta": { + "content": [ + [ + "versions.yml:md5,ab83026872e602f48838e90b954f0c12" + ] + ], + "timestamp": "2024-02-07T16:51:29.211368" + }, + "sarscov2 and human primers - fasta - stub": { + "content": [ + [ + "versions.yml:md5,ab83026872e602f48838e90b954f0c12" + ] + ], + "timestamp": "2024-02-07T16:51:37.962459" + } +} \ No newline at end of file diff --git a/modules/nf-core/seqkit/concat/tests/nextflow.config b/modules/nf-core/seqkit/concat/tests/nextflow.config new file mode 100644 index 00000000000..89d4fe3a412 --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: SEQKIT_CONCAT { + ext.args = "--full" + } +} diff --git a/modules/nf-core/seqkit/concat/tests/tags.yml b/modules/nf-core/seqkit/concat/tests/tags.yml new file mode 100644 index 00000000000..cabcd5cf3dc --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/tags.yml @@ -0,0 +1,2 @@ +seqkit/concat: + - "modules/nf-core/seqkit/concat/**" diff --git a/modules/nf-core/sortmerna/main.nf b/modules/nf-core/sortmerna/main.nf index 29c640c64b6..2712bf58963 100644 --- a/modules/nf-core/sortmerna/main.nf +++ b/modules/nf-core/sortmerna/main.nf @@ -20,77 +20,64 @@ process SORTMERNA { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - if (meta.single_end) { - """ - sortmerna \\ - ${'--ref '+fastas.join(' --ref ')} \\ - --reads $reads \\ - --threads $task.cpus \\ - --workdir . \\ - --aligned rRNA_reads \\ - --fastx \\ - --other non_rRNA_reads \\ - $args - - mv non_rRNA_reads.f*q.gz ${prefix}.non_rRNA.fastq.gz - mv rRNA_reads.log ${prefix}.sortmerna.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') - END_VERSIONS - """ + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def reads_input = reads instanceof List ? reads.collect{"--reads $it"}.join(' ') : "--reads $reads" + def n_fastq = reads instanceof List ? reads.size() : 1 + if ( n_fastq == 1 ) { + mv_cmd = "mv non_rRNA_reads.f*q.gz ${prefix}.non_rRNA.fastq.gz" + paired_cmd = '' + out2_cmd = '' } else { - """ - sortmerna \\ - ${'--ref '+fastas.join(' --ref ')} \\ - --reads ${reads[0]} \\ - --reads ${reads[1]} \\ - --threads $task.cpus \\ - --workdir . \\ - --aligned rRNA_reads \\ - --fastx \\ - --other non_rRNA_reads \\ - --paired_in \\ - --out2 \\ - $args - + mv_cmd = """ mv non_rRNA_reads_fwd.f*q.gz ${prefix}_1.non_rRNA.fastq.gz mv non_rRNA_reads_rev.f*q.gz ${prefix}_2.non_rRNA.fastq.gz - mv rRNA_reads.log ${prefix}.sortmerna.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') - END_VERSIONS - """ + """.stripIndent() + paired_cmd = "--paired_in" + out2_cmd = "--out2" } + """ + sortmerna \\ + ${'--ref '+fastas.join(' --ref ')} \\ + $reads_input \\ + --threads $task.cpus \\ + --workdir . \\ + --aligned rRNA_reads \\ + --fastx \\ + --other non_rRNA_reads \\ + $paired_cmd \\ + $out2_cmd \\ + $args + + $mv_cmd + mv rRNA_reads.log ${prefix}.sortmerna.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') + END_VERSIONS + """ stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - if (meta.single_end) { - """ - touch ${prefix}.non_rRNA.fastq.gz - touch ${prefix}.sortmerna.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') - END_VERSIONS - """ + def reads_input = reads instanceof List ? reads.collect{"--reads $it"}.join(' ') : "--reads $reads" + def n_fastq = reads instanceof List ? reads.size() : 1 + if ( n_fastq == 1 ) { + mv_cmd = "touch ${prefix}.non_rRNA.fastq.gz" } else { - """ + mv_cmd = """ touch ${prefix}_1.non_rRNA.fastq.gz touch ${prefix}_2.non_rRNA.fastq.gz - touch ${prefix}.sortmerna.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') - END_VERSIONS - """ + """.stripIndent() } + """ + $mv_cmd + touch ${prefix}.sortmerna.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') + END_VERSIONS + """ } diff --git a/modules/nf-core/sortmerna/tests/main.nf.test b/modules/nf-core/sortmerna/tests/main.nf.test index c7ae014bc69..40b5b55fc12 100644 --- a/modules/nf-core/sortmerna/tests/main.nf.test +++ b/modules/nf-core/sortmerna/tests/main.nf.test @@ -12,10 +12,10 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test', single_end:true ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] - ] - input[1] = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + input[0] = [ [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true) ] + ] + input[1] = [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] """ } } @@ -47,10 +47,10 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test', single_end:true ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] - ] - input[1] = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + input[0] = [ [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true) ] + ] + input[1] = [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] """ } } @@ -78,11 +78,14 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test', single_end:false ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] - ] - input[1] = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_2.fastq.gz", checkIfExists: true) + ] + ] + input[1] = [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] """ } } @@ -114,11 +117,13 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test', single_end:false ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] - ] - input[1] = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + input[0] = [ [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_2.fastq.gz", checkIfExists: true) + ] + ] + input[1] = [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] """ } } diff --git a/modules/nf-core/sortmerna/tests/main.nf.test.snap b/modules/nf-core/sortmerna/tests/main.nf.test.snap index e5eaa06fb12..3a25cd88da5 100644 --- a/modules/nf-core/sortmerna/tests/main.nf.test.snap +++ b/modules/nf-core/sortmerna/tests/main.nf.test.snap @@ -4,55 +4,55 @@ [ "test.non_rRNA.fastq.gz", "test.sortmerna.log", - "{id=test, single_end=true}" + "{id=test}" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2023-12-21T11:56:00.15356" + "timestamp": "2024-02-07T12:28:29.197913" }, "sarscov2 paired_end_match": { "content": [ [ + "{id=test}", [ "test_1.non_rRNA.fastq.gz", "test_2.non_rRNA.fastq.gz" ], - "test.sortmerna.log", - "{id=test, single_end=false}" + "test.sortmerna.log" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-01T12:16:08.266820184" + "timestamp": "2024-02-07T12:28:49.914992" }, "versions_paired_end_stub": { "content": [ [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" + "versions.yml:md5,5a099f3eea59b9deee96deffcf3387f5" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-01T12:10:57.850054063" + "timestamp": "2024-02-07T12:27:11.223149" }, "versions_paired_end": { "content": [ [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" + "versions.yml:md5,5a099f3eea59b9deee96deffcf3387f5" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-01T12:10:47.066657228" + "timestamp": "2024-02-07T12:27:04.517155" }, "versions_single_end": { "content": [ @@ -83,30 +83,30 @@ [ "test.non_rRNA.fastq.gz", "test.sortmerna.log", - "{id=test, single_end=true}" + "{id=test}" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-01T12:15:30.47928718" + "timestamp": "2024-02-07T12:28:23.20327" }, "sarscov2 paired_end-for_stub_match": { "content": [ [ + "{id=test}", [ "test_1.non_rRNA.fastq.gz", "test_2.non_rRNA.fastq.gz" ], - "test.sortmerna.log", - "{id=test, single_end=false}" + "test.sortmerna.log" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2023-12-21T12:00:47.879193" + "timestamp": "2024-02-07T12:28:56.063579" } } \ No newline at end of file diff --git a/modules/nf-core/star/align/tests/main.nf.test b/modules/nf-core/star/align/tests/main.nf.test index c18e37ec840..6ecd778639c 100644 --- a/modules/nf-core/star/align/tests/main.nf.test +++ b/modules/nf-core/star/align/tests/main.nf.test @@ -9,38 +9,38 @@ nextflow_process { tag "star/align" tag "star/genomegenerate" - test("homo_sapiens - single_end") { - config "./nextflow.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] - ]) - """ - } + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ } } + } + + test("homo_sapiens - single_end") { + config "./nextflow.config" when { process { """ input[0] = Channel.of([ [ id:'test', single_end:true ], // meta map - [ file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true) ] ]) input[1] = STAR_GENOMEGENERATE.out.index input[2] = Channel.of([ [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] ]) input[3] = false input[4] = 'illumina' @@ -75,38 +75,20 @@ nextflow_process { test("homo_sapiens - paired_end") { config "./nextflow.config" - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) ] ]) input[1] = STAR_GENOMEGENERATE.out.index input[2] = Channel.of([ [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] ]) input[3] = false input[4] = 'illumina' @@ -141,38 +123,20 @@ nextflow_process { test("homo_sapiens - paired_end - arriba") { config "./nextflow.arriba.config" - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) ] ]) input[1] = STAR_GENOMEGENERATE.out.index input[2] = Channel.of([ [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] ]) input[3] = false input[4] = 'illumina' @@ -207,38 +171,20 @@ nextflow_process { test("homo_sapiens - paired_end - starfusion") { config "./nextflow.starfusion.config" - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) ] ]) input[1] = STAR_GENOMEGENERATE.out.index input[2] = Channel.of([ [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] ]) input[3] = false input[4] = 'illumina' @@ -273,40 +219,22 @@ nextflow_process { test("homo_sapiens - paired_end - multiple") { config "./nextflow.config" - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) ] ]) input[1] = STAR_GENOMEGENERATE.out.index input[2] = Channel.of([ [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] ]) input[3] = false input[4] = 'illumina' diff --git a/modules/nf-core/star/genomegenerate/tests/main.nf.test b/modules/nf-core/star/genomegenerate/tests/main.nf.test index 069c7ad094a..c17c8ba45d6 100644 --- a/modules/nf-core/star/genomegenerate/tests/main.nf.test +++ b/modules/nf-core/star/genomegenerate/tests/main.nf.test @@ -15,11 +15,11 @@ nextflow_process { """ input[0] = Channel.of([ [ id:'test_fasta' ], - [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] ]) input[1] = Channel.of([ [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] ]) """ } @@ -43,11 +43,11 @@ nextflow_process { """ input[0] = Channel.of([ [ id:'test_fasta' ], - [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] ]) input[1] = Channel.of([ [ id:'test_gtf' ], - [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] ]) """ } @@ -69,7 +69,7 @@ nextflow_process { """ input[0] = Channel.of([ [ id:'test_fasta' ], - [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] ]) input[1] = Channel.of([ [], [] ]) """ @@ -95,7 +95,7 @@ nextflow_process { """ input[0] = Channel.of([ [ id:'test_fasta' ], - [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] ]) input[1] = Channel.of([ [], [] ]) """ diff --git a/modules/nf-core/tximeta/tximport/environment.yml b/modules/nf-core/tximeta/tximport/environment.yml new file mode 100644 index 00000000000..24b202222e3 --- /dev/null +++ b/modules/nf-core/tximeta/tximport/environment.yml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +name: "tximeta_tximport" +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - "bioconda::bioconductor-tximeta=1.20.1" diff --git a/modules/nf-core/tximeta/tximport/main.nf b/modules/nf-core/tximeta/tximport/main.nf new file mode 100644 index 00000000000..1f7aec3986e --- /dev/null +++ b/modules/nf-core/tximeta/tximport/main.nf @@ -0,0 +1,48 @@ +process TXIMETA_TXIMPORT { + label "process_medium" + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bioconductor-tximeta%3A1.20.1--r43hdfd78af_0' : + 'biocontainers/bioconductor-tximeta:1.20.1--r43hdfd78af_0' }" + + input: + tuple val(meta), path("quants/*") + tuple val(meta2), path(tx2gene) + tuple val(meta3), path(coldata) + val quant_type + + output: + tuple val(meta), path("*gene_tpm.tsv") , emit: tpm_gene + tuple val(meta), path("*gene_counts.tsv") , emit: counts_gene + tuple val(meta), path("*gene_counts_length_scaled.tsv"), emit: counts_gene_length_scaled + tuple val(meta), path("*gene_counts_scaled.tsv") , emit: counts_gene_scaled + tuple val(meta), path("*gene_lengths.tsv") , emit: lengths_gene + tuple val(meta), path("*transcript_tpm.tsv") , emit: tpm_transcript + tuple val(meta), path("*transcript_counts.tsv") , emit: counts_transcript + tuple val(meta), path("*transcript_lengths.tsv") , emit: lengths_transcript + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + template 'tximport.r' + + stub: + """ + touch ${meta.id}.gene_tpm.tsv + touch ${meta.id}.gene_counts.tsv + touch ${meta.id}.gene_counts_length_scaled.tsv + touch ${meta.id}.gene_counts_scaled.tsv + touch ${meta.id}.gene_lengths.tsv + touch ${meta.id}.transcript_tpm.tsv + touch ${meta.id}.transcript_counts.tsv + touch ${meta.id}.transcript_lengths.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + r: \$( R --version | sed '1!d; s/.*version //; s/ .*//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/tximeta/tximport/meta.yml b/modules/nf-core/tximeta/tximport/meta.yml new file mode 100644 index 00000000000..8b7b632bdcf --- /dev/null +++ b/modules/nf-core/tximeta/tximport/meta.yml @@ -0,0 +1,120 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "tximeta_tximport" +description: | + Import transcript-level abundances and estimated counts for gene-level + analysis packages +keywords: + - gene + - kallisto + - pseudoalignment + - salmon + - transcript +tools: + - "tximeta": + description: "Transcript Quantification Import with Automatic Metadata" + homepage: "https://bioconductor.org/packages/release/bioc/html/tximeta.html" + documentation: "https://bioconductor.org/packages/release/bioc/vignettes/tximeta/inst/doc/tximeta.html" + tool_dev_url: "https://github.com/thelovelab/tximeta" + doi: "10.1371/journal.pcbi.1007664" + licence: ["GPL-2"] + +input: + - meta: + type: map + description: | + Groovy Map containing information related to the experiment as a whole + e.g. `[ id:'SRP123456' ]` + - quants: + type: directory + description: Paths to subdirectories corresponding to + sample-wise runs of Salmon or Kallisto + - meta2: + type: map + description: | + Groovy Map containing reference information related to the species + reference e.g. `[ id:'yeast' ]` + - tx2gene: + type: file + description: A transcript to gene mapping table such as those generated + by custom/tx2gene + pattern: "*.{csv,tsv}" + - meta3: + type: map + description: | + Groovy Map containing information related to the experiment as a whole + e.g. `[ id:'SRP123456' ]` + - coldata: + type: file + description: | + Optional 'coldata' file equivalent to a sample sheet where the first + column corresponds to the sample names (directory names in the input + salmon/ kallisto results) + pattern: "*.{csv,tsv}" + - quant_type: + type: string + description: Quantification type, 'kallisto' or 'salmon' + +output: + - meta: + type: map + description: | + Groovy Map containing information related to the experiment as a whole + e.g. `[ id:'SRP123456' ]` + - tpm_gene: + type: file + description: | + Abundance (TPM) values derived from tximport output after + summarizeToGene(), without a 'countsFromAbundance' specification + pattern: "*gene_tpm.tsv" + - counts_gene: + type: file + description: | + Count values derived from tximport output after + summarizeToGene(), without a 'countsFromAbundance' specification + pattern: "*gene_counts.tsv" + - counts_gene_length_scaled: + type: file + description: | + Count values derived from tximport output after summarizeToGene(), with + a 'countsFromAbundance' specification of 'lengthScaledTPM' + pattern: "*gene_counts_length_scaled.tsv" + - counts_gene_scaled: + type: file + description: | + Count values derived from tximport output after summarizeToGene(), with + a 'countsFromAbundance' specification of 'scaledTPM' + pattern: "*gene_counts_scaled.tsv" + - gene_lengths: + type: file + description: | + Length values derived from tximport output after summarizeToGene(), + without a 'countsFromAbundance' specification + pattern: "*gene_lengths.tsv" + - tpm_transcript: + type: file + description: | + Abundance (TPM) values derived from tximport output without + summarizeToGene(), without a 'countsFromAbundance' specification + pattern: "*transcript_tpm.tsv" + - counts_transcript: + type: file + description: | + Count values derived from tximport output without + summarizeToGene(), without a 'countsFromAbundance' specification + pattern: "*transcript_counts.tsv" + - transcript_lengths: + type: file + description: | + Length values derived from tximport output without summarizeToGene(), + without a 'countsFromAbundance' specification + pattern: "*gene_lengths.tsv" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@pinin4fjords" +maintainers: + - "@pinin4fjords" diff --git a/modules/nf-core/tximeta/tximport/templates/tximport.r b/modules/nf-core/tximeta/tximport/templates/tximport.r new file mode 100755 index 00000000000..e255017f878 --- /dev/null +++ b/modules/nf-core/tximeta/tximport/templates/tximport.r @@ -0,0 +1,227 @@ +#!/usr/bin/env Rscript + +# Script for importing and processing transcript-level quantifications. +# Written by Lorena Pantano, later modified by Jonathan Manning, and released +# under the MIT license. + +# Loading required libraries +library(SummarizedExperiment) +library(tximport) + +################################################ +################################################ +## Functions ## +################################################ +################################################ + +#' Build a table from a SummarizedExperiment object +#' +#' This function takes a SummarizedExperiment object and a specific slot name to extract +#' assay data. It then combines the first two columns of the rowData with the specified +#' assay data slot into a new data table. +#' +#' @param se.obj A SummarizedExperiment object from which to build the table. +#' @param slot The name of the slot in the assays list from which to extract data. +#' +#' @return A data frame combining the first two columns of the rowData with the assay data from the specified slot. + +build_table <- function(se.obj, slot) { + cbind(rowData(se.obj)[,1:2], assays(se.obj)[[slot]]) +} + +#' Write a table to a file from a SummarizedExperiment object with given parameters +#' +#' This function generates a table from a SummarizedExperiment object using specified parameters +#' and writes the resulting table to a file. The file name is constructed using a prefix and a +#' suffix from the parameters, and the table is written with tab separation, without quoting text, +#' and without row names. +#' +#' @param params A list containing the parameters needed for file generation and table writing. +#' The list should include: +#' - `obj`: A SummarizedExperiment object from which to build the table. +#' - `slot`: The name of the slot in the assays list from which to extract data. +#' - `suffix`: Suffix to use for generating the file name. +#' +#' @return NULL The function is called for its side effect of writing a file and does not return anything. + +write_se_table <- function(params, prefix) { + file_name <- paste0(prefix, ".", params\$suffix) + write.table(build_table(params\$obj, params\$slot), file_name, + sep="\t", quote=FALSE, row.names = FALSE) +} + +#' Read Transcript Metadata from a Given Path +#' +#' This function reads transcript metadata from a specified file path. The file is expected to +#' be a tab-separated values file without headers, containing transcript information. The function +#' checks if the file is empty and stops execution with an error message if so. It reads the file +#' into a data frame, expecting columns for transcript IDs, gene IDs, and gene names. Additional +#' processing is done to ensure compatibility with a predefined data structure (e.g., `txi[[1]]`), +#' including adding missing entries and reordering based on the transcript IDs found in `txi[[1]]`. +#' +#' @param tinfo_path The file path to the transcript information file. +#' +#' @return A list containing three elements: +#' - `transcript`: A data frame with transcript IDs, gene IDs, and gene names, indexed by transcript IDs. +#' - `gene`: A data frame with unique gene IDs and gene names. +#' - `tx2gene`: A data frame mapping transcript IDs to gene IDs. + +read_transcript_info <- function(tinfo_path){ + info <- file.info(tinfo_path) + if (info\$size == 0) { + stop("tx2gene file is empty") + } + + transcript_info <- read.csv(tinfo_path, sep="\t", header = FALSE, + col.names = c("tx", "gene_id", "gene_name")) + + extra <- setdiff(rownames(txi[[1]]), as.character(transcript_info[["tx"]])) + transcript_info <- rbind(transcript_info, data.frame(tx=extra, gene_id=extra, gene_name=extra)) + transcript_info <- transcript_info[match(rownames(txi[[1]]), transcript_info[["tx"]]), ] + rownames(transcript_info) <- transcript_info[["tx"]] + + list(transcript = transcript_info, + gene = unique(transcript_info[,2:3]), + tx2gene = transcript_info[,1:2]) +} + +#' Create a SummarizedExperiment Object +#' +#' Constructs a SummarizedExperiment object using provided matrices for counts, abundance, and length, +#' along with metadata for columns and rows. This function facilitates the organization of experimental +#' data (e.g., RNA-seq or other high-throughput data) in a structured format that is convenient for +#' further analyses and visualization. +#' +#' @param counts A matrix or DataFrame containing counts data, with rows as features (e.g., genes) and +#' columns as samples. +#' @param abundance A matrix or DataFrame containing abundance data (e.g., TPM or FPKM) with the same +#' dimensions and row/column names as the counts data. +#' @param length A matrix or DataFrame containing feature lengths, matching the dimensions and row/column +#' names of the counts data. +#' @param col_data A DataFrame containing sample-level metadata, with rows corresponding to columns in the +#' counts, abundance, and length matrices. +#' @param row_data A DataFrame containing feature-level metadata, with rows corresponding to features in +#' the counts, abundance, and length matrices. +#' +#' @return A SummarizedExperiment object containing the supplied data and metadata. + +create_summarized_experiment <- function(counts, abundance, length, col_data, row_data) { + SummarizedExperiment(assays = list(counts = counts, abundance = abundance, length = length), + colData = col_data, + rowData = row_data) +} + +################################################ +################################################ +## Main script starts here ## +################################################ +################################################ + +# Define pattern for file names based on quantification type +pattern <- ifelse('$quant_type' == "kallisto", "abundance.tsv", "quant.sf") +fns <- list.files('quants', pattern = pattern, recursive = T, full.names = T) +names <- basename(dirname(fns)) +names(fns) <- names +dropInfReps <- '$quant_type' == "kallisto" + +# Import transcript-level quantifications +txi <- tximport(fns, type = '$quant_type', txOut = TRUE, dropInfReps = dropInfReps) + +# Read transcript and sample data +transcript_info <- read_transcript_info('$tx2gene') + +if (file.exists('$coldata')) { + coldata <- read.csv('$coldata', sep="\t") + coldata <- coldata[match(names, coldata[,1]),] + coldata <- cbind(files = fns, coldata) +} else { + message("ColData not available: ", '$coldata') + coldata <- data.frame(files = fns, names = names) +} +rownames(coldata) <- coldata[["names"]] + +# Create initial SummarizedExperiment object +se <- create_summarized_experiment(txi[["counts"]], txi[["abundance"]], txi[["length"]], + DataFrame(coldata), transcript_info\$transcript) + +# Setting parameters for writing tables +params <- list( + list(obj = se, slot = "abundance", suffix = "transcript_tpm.tsv"), + list(obj = se, slot = "counts", suffix = "transcript_counts.tsv"), + list(obj = se, slot = "length", suffix = "transcript_lengths.tsv") +) + +# Process gene-level data if tx2gene mapping is available +if ("tx2gene" %in% names(transcript_info) && !is.null(transcript_info\$tx2gene)) { + tx2gene <- transcript_info\$tx2gene + gi <- summarizeToGene(txi, tx2gene = tx2gene) + gi.ls <- summarizeToGene(txi, tx2gene = tx2gene, countsFromAbundance = "lengthScaledTPM") + gi.s <- summarizeToGene(txi, tx2gene = tx2gene, countsFromAbundance = "scaledTPM") + + gene_info <- transcript_info\$gene[match(rownames(gi[[1]]), transcript_info\$gene[["gene_id"]]),] + rownames(gene_info) <- gene_info[["tx"]] + + col_data_frame <- DataFrame(coldata) + + # Create gene-level SummarizedExperiment objects + gse <- create_summarized_experiment(gi[["counts"]], gi[["abundance"]], gi[["length"]], + col_data_frame, gene_info) + gse.ls <- create_summarized_experiment(gi.ls[["counts"]], gi.ls[["abundance"]], gi.ls[["length"]], + col_data_frame, gene_info) + gse.s <- create_summarized_experiment(gi.s[["counts"]], gi.s[["abundance"]], gi.s[["length"]], + col_data_frame, gene_info) + + params <- c(params, list( + list(obj = gse, slot = "length", suffix = "gene_lengths.tsv"), + list(obj = gse, slot = "abundance", suffix = "gene_tpm.tsv"), + list(obj = gse, slot = "counts", suffix = "gene_counts.tsv"), + list(obj = gse.ls, slot = "abundance", suffix = "gene_tpm_length_scaled.tsv"), + list(obj = gse.ls, slot = "counts", suffix = "gene_counts_length_scaled.tsv"), + list(obj = gse.s, slot = "abundance", suffix = "gene_tpm_scaled.tsv"), + list(obj = gse.s, slot = "counts", suffix = "gene_counts_scaled.tsv") + )) +} + +# Writing tables for each set of parameters + +prefix <- '' +if ('$task.ext.prefix' != 'null'){ + prefix = '$task.ext.prefix' +} else if ('$meta.id' != 'null'){ + prefix = '$meta.id' +} + +done <- lapply(params, write_se_table, prefix) + +################################################ +################################################ +## R SESSION INFO ## +################################################ +################################################ + +sink(paste(prefix, "R_sessionInfo.log", sep = '.')) +citation("tximeta") +print(sessionInfo()) +sink() + +################################################ +################################################ +## VERSIONS FILE ## +################################################ +################################################ + +r.version <- strsplit(version[['version.string']], ' ')[[1]][3] +tximeta.version <- as.character(packageVersion('tximeta')) + +writeLines( + c( + '"${task.process}":', + paste(' r-base:', r.version), + paste(' bioconductor-tximeta:', tximeta.version) + ), +'versions.yml') + +################################################ +################################################ +################################################ +################################################ diff --git a/modules/nf-core/tximeta/tximport/tests/main.nf.test b/modules/nf-core/tximeta/tximport/tests/main.nf.test new file mode 100644 index 00000000000..27061ec44c4 --- /dev/null +++ b/modules/nf-core/tximeta/tximport/tests/main.nf.test @@ -0,0 +1,199 @@ +nextflow_process { + + name "Test Process TXIMETA_TXIMPORT" + script "../main.nf" + process "TXIMETA_TXIMPORT" + + tag "modules" + tag "modules_nfcore" + tag "custom/tx2gene" + tag "tximeta" + tag "tximeta/tximport" + tag "untar" + + test("saccharomyces_cerevisiae - kallisto - gtf") { + + setup { + + run("UNTAR") { + script "../../../untar/main.nf" + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.test_data['saccharomyces_cerevisiae']['genome']['kallisto_results'], checkIfExists: true) + ] + """ + } + } + run("CUSTOM_TX2GENE") { + script "../../../custom/tx2gene/main.nf" + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } + input[2] = 'kallisto' + input[3] = 'gene_id' + input[4] = 'gene_name' + """ + } + } + } + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } + input[1] = CUSTOM_TX2GENE.out.tx2gene + input[2] = Channel.of([ [], [] ]) + input[3] = 'kallisto' + """ + } + } + + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.tpm_gene).match('tpm_gene_kallisto') }, + { assert snapshot(process.out.counts_gene).match('counts_gene_kallisto') }, + { assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_kallisto') }, + { assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_kallisto') }, + { assert snapshot(process.out.lengths_gene).match('lengths_gene_kallisto') }, + { assert snapshot(process.out.tpm_transcript).match('tpm_transcript_kallisto') }, + { assert snapshot(process.out.counts_transcript).match('counts_transcript_kallisto') }, + { assert snapshot(process.out.lengths_transcript).match('lengths_transcript_kallisto') }, + { assert snapshot(process.out.versions).match('versions_kallisto') }, + ) + } + + } + + test("saccharomyces_cerevisiae - kallisto - gtf - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ [], [] ]) + input[1] = Channel.of([ [], [] ]) + input[2] = Channel.of([ [], [] ]) + input[3] = 'kallisto' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.tpm_gene).match('tpm_gene_kallisto -stub') }, + { assert snapshot(process.out.counts_gene).match('counts_gene_kallisto - stub') }, + { assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_kallisto - stub') }, + { assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_kallisto - stub') }, + { assert snapshot(process.out.lengths_gene).match('lengths_gene_kallisto - stub') }, + { assert snapshot(process.out.tpm_transcript).match('tpm_transcript_kallisto - stub') }, + { assert snapshot(process.out.counts_transcript).match('counts_transcript_kallisto - stub') }, + { assert snapshot(process.out.lengths_transcript).match('lengths_transcript_kallisto - stub') }, + { assert snapshot(process.out.versions).match('versions_kallisto - stub') }, + ) + } + + } + test("saccharomyces_cerevisiae - salmon - gtf") { + + setup { + + run("UNTAR") { + script "../../../untar/main.nf" + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.test_data['saccharomyces_cerevisiae']['genome']['salmon_results'], checkIfExists: true) + ] + """ + } + } + run("CUSTOM_TX2GENE") { + script "../../../custom/tx2gene/main.nf" + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } + input[2] = 'salmon' + input[3] = 'gene_id' + input[4] = 'gene_name' + """ + } + } + } + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } + input[1] = CUSTOM_TX2GENE.out.tx2gene + input[2] = Channel.of([ [], [] ]) + input[3] = 'salmon' + """ + } + } + + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.tpm_gene).match('tpm_gene_salmon') }, + { assert snapshot(process.out.counts_gene).match('counts_gene_salmon') }, + { assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_salmon') }, + { assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_salmon') }, + { assert snapshot(process.out.lengths_gene).match('lengths_gene_salmon') }, + { assert snapshot(process.out.tpm_transcript).match('tpm_transcript_salmon') }, + { assert snapshot(process.out.counts_transcript).match('counts_transcript_salmon') }, + { assert snapshot(process.out.lengths_transcript).match('lengths_transcript_salmon') }, + { assert snapshot(process.out.versions).match('versions_salmon') }, + ) + } + + } + + test("saccharomyces_cerevisiae - salmon - gtf - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ [], [] ]) + input[1] = Channel.of([ [], [] ]) + input[2] = Channel.of([ [], [] ]) + input[3] = 'salmon' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.tpm_gene).match('tpm_gene_salmon -stub') }, + { assert snapshot(process.out.counts_gene).match('counts_gene_salmon - stub') }, + { assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_salmon - stub') }, + { assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_salmon - stub') }, + { assert snapshot(process.out.lengths_gene).match('lengths_gene_salmon - stub') }, + { assert snapshot(process.out.tpm_transcript).match('tpm_transcript_salmon - stub') }, + { assert snapshot(process.out.counts_transcript).match('counts_transcript_salmon - stub') }, + { assert snapshot(process.out.lengths_transcript).match('lengths_transcript_salmon - stub') }, + { assert snapshot(process.out.versions).match('versions_salmon - stub') }, + ) + } + + } +} + diff --git a/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap b/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap new file mode 100644 index 00000000000..11b79dbb635 --- /dev/null +++ b/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap @@ -0,0 +1,594 @@ +{ + "tpm_gene_salmon -stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:57.624950043" + }, + "tpm_transcript_salmon - stub": { + "content": [ + [ + [ + [ + + ], + "[].transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:57.67112954" + }, + "lengths_gene_kallisto - stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:25.185576246" + }, + "counts_gene_scaled_salmon - stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_counts_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:57.653958581" + }, + "counts_gene_kallisto - stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:25.165389568" + }, + "lengths_transcript_salmon - stub": { + "content": [ + [ + [ + [ + + ], + "[].transcript_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:57.688955249" + }, + "versions_salmon - stub": { + "content": [ + [ + "versions.yml:md5,721fc5c3bfa6792e8982f2662908b836" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:57.698863128" + }, + "counts_gene_length_scaled_kallisto": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_counts_length_scaled.tsv:md5,4944841ac711124d29673b6b6ed16ef3" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:13.767001542" + }, + "lengths_transcript_salmon": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.transcript_lengths.tsv:md5,db6d8ab9f8e1123d5984fd534b4347dc" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:45.710229136" + }, + "counts_transcript_kallisto": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.transcript_counts.tsv:md5,42e0106e75fa97c1c684c6d9060f1724" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:13.7960929" + }, + "tpm_gene_kallisto -stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:25.155684508" + }, + "counts_transcript_kallisto - stub": { + "content": [ + [ + [ + [ + + ], + "[].transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:25.207029265" + }, + "counts_transcript_salmon": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.transcript_counts.tsv:md5,ff0f5be09ca7a322672c0074ba35da17" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:45.703693047" + }, + "lengths_gene_salmon - stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:57.66270305" + }, + "tpm_gene_salmon": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_tpm.tsv:md5,6076364cc78741a4f8bc8935a045d13d" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:45.66339226" + }, + "tpm_transcript_salmon": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.transcript_tpm.tsv:md5,7a334b565e1e865efb1caf615f194ef7" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:45.697263797" + }, + "lengths_transcript_kallisto": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.transcript_lengths.tsv:md5,f974b52840431a5dae57bcb615badbf1" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:13.80450998" + }, + "counts_gene_length_scaled_kallisto - stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_counts_length_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:25.171915858" + }, + "counts_transcript_salmon - stub": { + "content": [ + [ + [ + [ + + ], + "[].transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:57.680037609" + }, + "counts_gene_scaled_kallisto": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_counts_scaled.tsv:md5,39d14e361434978b3cadae901a26a028" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:13.772150052" + }, + "counts_gene_salmon": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_counts.tsv:md5,c14cab7e15cfac73ec0602dc2c404551" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:45.67022546" + }, + "versions_salmon": { + "content": [ + [ + "versions.yml:md5,a6476f297a8e9396f4cfc151cd7f25ed" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:45.719355986" + }, + "counts_gene_length_scaled_salmon": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_counts_length_scaled.tsv:md5,5f92a6784f6edc5e3b336c71c3ee7daf" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:45.676693139" + }, + "tpm_gene_kallisto": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_tpm.tsv:md5,85d108269769ae0d841247b9b9ed922d" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:13.748907143" + }, + "lengths_transcript_kallisto - stub": { + "content": [ + [ + [ + [ + + ], + "[].transcript_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:25.217230264" + }, + "lengths_gene_kallisto": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_lengths.tsv:md5,db6becdf807fd164a9c63dd1dd916d9c" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:13.778373051" + }, + "counts_gene_scaled_kallisto - stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_counts_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:25.177826097" + }, + "tpm_transcript_kallisto": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.transcript_tpm.tsv:md5,65862ed9d4a05abfab952e680dc0e49d" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:13.786421751" + }, + "lengths_gene_salmon": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_lengths.tsv:md5,1691ea2677612805cd699265c83024d7" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:45.690776907" + }, + "counts_gene_length_scaled_salmon - stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_counts_length_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:57.645938511" + }, + "counts_gene_kallisto": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_counts.tsv:md5,e89c28692ea214396b2d4cb702a804c3" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:13.762000393" + }, + "versions_kallisto": { + "content": [ + [ + "versions.yml:md5,a6476f297a8e9396f4cfc151cd7f25ed" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:13.812751439" + }, + "counts_gene_salmon - stub": { + "content": [ + [ + [ + [ + + ], + "[].gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:57.637020412" + }, + "versions_kallisto - stub": { + "content": [ + [ + "versions.yml:md5,721fc5c3bfa6792e8982f2662908b836" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:25.226293343" + }, + "tpm_transcript_kallisto - stub": { + "content": [ + [ + [ + [ + + ], + "[].transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:25.195424656" + }, + "counts_gene_scaled_salmon": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gene_counts_scaled.tsv:md5,fdfb3d23aaf5d4316d81247ec4664ca0" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T11:43:45.682361988" + } +} \ No newline at end of file diff --git a/modules/nf-core/tximeta/tximport/tests/tags.yml b/modules/nf-core/tximeta/tximport/tests/tags.yml new file mode 100644 index 00000000000..fc96a89e0be --- /dev/null +++ b/modules/nf-core/tximeta/tximport/tests/tags.yml @@ -0,0 +1,2 @@ +tximeta/tximport: + - "modules/nf-core/tximeta/tximport/**" diff --git a/modules/nf-core/umitools/extract/tests/main.nf.test b/modules/nf-core/umitools/extract/tests/main.nf.test index 22242d1df59..83a77a1b19e 100644 --- a/modules/nf-core/umitools/extract/tests/main.nf.test +++ b/modules/nf-core/umitools/extract/tests/main.nf.test @@ -18,8 +18,8 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] - ] + [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true) ] + ] """ } } diff --git a/modules/nf-core/wfmash/environment.yml b/modules/nf-core/wfmash/environment.yml index 4e7e66c3766..071aa5a797a 100644 --- a/modules/nf-core/wfmash/environment.yml +++ b/modules/nf-core/wfmash/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::wfmash=0.12.5 + - bioconda::wfmash=0.12.6 diff --git a/modules/nf-core/wfmash/main.nf b/modules/nf-core/wfmash/main.nf index 3e1592f4ada..7c64148bfd6 100644 --- a/modules/nf-core/wfmash/main.nf +++ b/modules/nf-core/wfmash/main.nf @@ -4,8 +4,8 @@ process WFMASH { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/wfmash:0.12.5--h11f254b_0': - 'biocontainers/wfmash:0.12.5--h11f254b_0' }" + 'https://depot.galaxyproject.org/singularity/wfmash:0.12.6--h11f254b_0': + 'biocontainers/wfmash:0.12.6--h11f254b_0' }" input: tuple val(meta), path(fasta_gz), path(paf), path(gzi), path(fai) diff --git a/subworkflows/nf-core/bam_rseqc/tests/main.nf.test.snap b/subworkflows/nf-core/bam_rseqc/tests/main.nf.test.snap index 1680e55c9b4..8bd21052f07 100644 --- a/subworkflows/nf-core/bam_rseqc/tests/main.nf.test.snap +++ b/subworkflows/nf-core/bam_rseqc/tests/main.nf.test.snap @@ -1,34 +1,66 @@ { - "innerdistance_all": { + "bamstat_txt": { "content": [ [ [ { "id": "test" }, - "test.inner_distance.txt:md5,a1acc9def0f64a5500d4c4cb47cbe32b" - ], + "test.bam_stat.txt:md5,2675857864c1d1139b2a19d25dc36b09" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2023-12-08T14:37:45.671792186" + }, + "readduplication_all": { + "content": [ + [ [ { "id": "test" }, - "test.inner_distance_freq.txt:md5,3fc037501f5899b5da009c8ce02fc25e" + "test.DupRate_plot.r:md5,3c0325095cee4835b921e57d61c23dca" ], [ { "id": "test" }, - "test.inner_distance_mean.txt:md5,58398b7d5a29a5e564f9e3c50b55996c" + "test.pos.DupRate.xls:md5,a859bc2031d46bf1cc4336205847caa3" ], [ { "id": "test" }, - "test.inner_distance_plot.r:md5,5859fbd5b42046d47e8b9aa85077f4ea" + "test.seq.DupRate.xls:md5,ee8783399eec5a18522a6f08bece338b" ] ] ], - "timestamp": "2023-12-08T14:37:45.734509133" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2023-12-08T14:37:45.927253593" + }, + "tin_txt": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.paired_end.sorted.summary.txt:md5,9d98447e178b89a89f6f5aba7a772fe6" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-06T15:29:37.545261" }, "junctionsaturation_all": { "content": [ @@ -41,6 +73,10 @@ ] ] ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, "timestamp": "2023-12-08T14:37:45.825157699" }, "versions": { @@ -56,96 +92,96 @@ "versions.yml:md5,fd16f1098b9c285f3ea7bd3daf4e8f10" ] ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, "timestamp": "2023-12-14T14:58:10.874440924" }, - "tin": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.paired_end.sorted.summary.txt:md5,9d98447e178b89a89f6f5aba7a772fe6" - ] - ] - ], - "timestamp": "2023-12-08T14:37:45.935155313" - }, - "bamstat_txt": { + "readdistribution_txt": { "content": [ [ [ { "id": "test" }, - "test.bam_stat.txt:md5,2675857864c1d1139b2a19d25dc36b09" + "test.read_distribution.txt:md5,56893fdc0809d968629a363551a1655f" ] ] ], - "timestamp": "2023-12-08T14:37:45.671792186" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2023-12-08T14:37:45.841855468" }, - "inferexperiment": { + "innerdistance_all": { "content": [ [ [ { "id": "test" }, - "test.infer_experiment.txt:md5,f9d0bfc239df637cd8aeda40ade3c59a" - ] - ] - ], - "timestamp": "2023-12-08T14:37:45.747507043" - }, - "readduplication_all": { - "content": [ - [ + "test.inner_distance.txt:md5,a1acc9def0f64a5500d4c4cb47cbe32b" + ], [ { "id": "test" }, - "test.DupRate_plot.r:md5,3c0325095cee4835b921e57d61c23dca" + "test.inner_distance_freq.txt:md5,3fc037501f5899b5da009c8ce02fc25e" ], [ { "id": "test" }, - "test.pos.DupRate.xls:md5,a859bc2031d46bf1cc4336205847caa3" + "test.inner_distance_mean.txt:md5,58398b7d5a29a5e564f9e3c50b55996c" ], [ { "id": "test" }, - "test.seq.DupRate.xls:md5,ee8783399eec5a18522a6f08bece338b" + "test.inner_distance_plot.r:md5,5859fbd5b42046d47e8b9aa85077f4ea" ] ] ], - "timestamp": "2023-12-08T14:37:45.927253593" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2023-12-08T14:37:45.734509133" }, - "junctionannotation_all": { + "inferexperiment_txt": { "content": [ [ [ { "id": "test" }, - "test.junction_annotation.log:md5,d75e0f5d62fada8aa9449991b209554c" + "test.infer_experiment.txt:md5,f9d0bfc239df637cd8aeda40ade3c59a" ] ] ], - "timestamp": "2023-12-14T17:42:43.31783911" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-06T15:29:37.537104" }, - "readdistribution_txt": { + "junctionannotation_all": { "content": [ [ [ { "id": "test" }, - "test.read_distribution.txt:md5,56893fdc0809d968629a363551a1655f" + "test.junction_annotation.log:md5,d75e0f5d62fada8aa9449991b209554c" ] ] ], - "timestamp": "2023-12-08T14:37:45.841855468" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2023-12-14T17:42:43.31783911" } -} +} \ No newline at end of file diff --git a/subworkflows/nf-core/preprocess_rnaseq/tests/main.nf.test b/subworkflows/nf-core/preprocess_rnaseq/tests/main.nf.test index 791d0e9f464..78c0ce74a7c 100644 --- a/subworkflows/nf-core/preprocess_rnaseq/tests/main.nf.test +++ b/subworkflows/nf-core/preprocess_rnaseq/tests/main.nf.test @@ -23,13 +23,16 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.of([ [ id:'test', single_end:false, strandedness:'auto' ], // meta map - [file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_2_fastq_gz'], checkIfExists: true) - ]]) // ch_reads - input[1] = Channel.of(file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)) // ch_fasta - input[2] = Channel.of(file(params.test_data['homo_sapiens']['genome']['transcriptome_fasta'], checkIfExists: true)) // ch_transcript_fasta - input[3] = Channel.of(file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)) // ch_gtf + input[0] = Channel.of([ + [ id:'test', single_end:false, strandedness:'auto' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) + ] + ]) // ch_reads + input[1] = Channel.of(file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)) // ch_fasta + input[2] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true)) // ch_transcript_fasta + input[3] = Channel.of(file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true)) // ch_gtf input[4] = [] // ch_salmon_index input[5] = [] // ch_bbsplit_index input[6] = [] // ch_ribo_db @@ -69,13 +72,16 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.of([ [ id:'test', single_end:false, strandedness:'auto' ], // meta map - [file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_2_fastq_gz'], checkIfExists: true) - ]]) // ch_reads - input[1] = Channel.of(file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)) // ch_fasta - input[2] = Channel.of(file(params.test_data['homo_sapiens']['genome']['transcriptome_fasta'], checkIfExists: true)) // ch_transcript_fasta - input[3] = Channel.of(file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)) // ch_gtf + input[0] = Channel.of([ + [ id:'test', single_end:false, strandedness:'auto' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) + ] + ]) // ch_reads + input[1] = Channel.of(file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)) // ch_fasta + input[2] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true)) // ch_transcript_fasta + input[3] = Channel.of(file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true)) // ch_gtf input[4] = [] // ch_salmon_index input[5] = [] // ch_bbsplit_index input[6] = [] // ch_ribo_db diff --git a/subworkflows/nf-core/preprocess_rnaseq/tests/main.nf.test.snap b/subworkflows/nf-core/preprocess_rnaseq/tests/main.nf.test.snap index 264c1ff9148..691e07ac0b2 100644 --- a/subworkflows/nf-core/preprocess_rnaseq/tests/main.nf.test.snap +++ b/subworkflows/nf-core/preprocess_rnaseq/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "single_end": false, "strandedness": "auto" }, - 31828 + 3022 ] ] ], @@ -16,79 +16,79 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T17:03:17.65199684" + "timestamp": "2024-02-07T11:05:51.060371" }, "trimgalore_test_pe_reads_2_lines": { - "content": "1fb3f17574c8d4bc147054efc370705a", + "content": "eccf3e9e74589ff01c77fce7f4548e41", "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T20:34:36.937705622" + "timestamp": "2024-02-07T11:16:44.427598" }, "fastp_test_pe_reads_1_size": { "content": [ - 939632 + 4508 ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T17:03:12.664499082" + "timestamp": "2024-02-07T11:05:51.019935" }, "trimgalore_test_pe_reads_1_size": { "content": [ - 939632 + 4508 ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T20:34:32.674462193" + "timestamp": "2024-02-07T11:16:44.398923" }, "trimgalore_test_pe_reads_1_lines": { - "content": "c505f587d2864e41499d4f7546c0a777", + "content": "3868fc1caf09367141d2bbf47e158823", "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T20:34:32.668662623" + "timestamp": "2024-02-07T11:16:44.395858" }, "fastp_test_pe_reads_2_lines": { - "content": "1fb3f17574c8d4bc147054efc370705a", + "content": "eccf3e9e74589ff01c77fce7f4548e41", "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T17:03:17.648440471" + "timestamp": "2024-02-07T11:05:51.05632" }, "fastp_test_pe_reads_2_size": { "content": [ - 939632 + 4508 ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T17:03:17.650545591" + "timestamp": "2024-02-07T11:05:51.058326" }, "trimgalore_test_pe_reads_2_size": { "content": [ - 939632 + 4508 ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T20:34:36.942171292" + "timestamp": "2024-02-07T11:16:44.430226" }, "fastp_test_pe_reads_1_lines": { - "content": "c505f587d2864e41499d4f7546c0a777", + "content": "3868fc1caf09367141d2bbf47e158823", "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T17:03:12.660913832" + "timestamp": "2024-02-07T11:05:51.015562" }, "trimgalore_read_count": { "content": [ @@ -99,7 +99,7 @@ "single_end": false, "strandedness": "auto" }, - 31828 + 3022 ] ] ], @@ -107,6 +107,6 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-01-31T20:34:36.947394381" + "timestamp": "2024-02-07T11:16:44.432645" } } \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index 6d805bb3fda..c1aecf6e42b 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -13,8 +13,12 @@ import nextflow.extension.FilesEx workflow UTILS_NFCORE_PIPELINE { + take: + nextflow_cli_args + main: valid_config = checkConfigProvided() + checkProfileProvided(nextflow_cli_args) emit: valid_config @@ -43,6 +47,20 @@ def checkConfigProvided() { return valid_config } +// +// Exit pipeline if --profile contains spaces +// +def checkProfileProvided(nextflow_cli_args) { + if (workflow.profile.endsWith(',')) { + error "The `-profile` option cannot end with a trailing comma, please remove it and re-run the pipeline!\n" + + "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + } + if (nextflow_cli_args[0]) { + log.warn "nf-core pipelines do not accept positional arguments. The positional argument `${nextflow_cli_args[0]}` has been detected.\n" + + "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + } +} + // // Citation string for pipeline // diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml b/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml index dd1462b2322..d08d24342d8 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml +++ b/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml @@ -7,7 +7,11 @@ keywords: - initialise - version components: [] -input: [] +input: + - nextflow_cli_args: + type: list + description: | + Nextflow CLI positional arguments output: - success: type: boolean diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test index f7ea05fcd7f..1dc317f8f7b 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test @@ -21,6 +21,26 @@ nextflow_function { } } + test("Test Function checkProfileProvided") { + + function "checkProfileProvided" + + when { + function { + """ + input[0] = [] + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + test("Test Function workflowCitation") { function "workflowCitation" diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap index afb9ab4dca2..10f948e629c 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap @@ -1,4 +1,8 @@ { + "Test Function checkProfileProvided": { + "content": null, + "timestamp": "2024-02-09T15:43:55.145717" + }, "Test Function checkConfigProvided": { "content": [ true diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test index c5f7776a671..8940d32d1ef 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test @@ -11,6 +11,14 @@ nextflow_workflow { test("Should run without failures") { + when { + workflow { + """ + input[0] = [] + """ + } + } + then { assertAll( { assert workflow.success }, diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index f43ae7d9559..2597b91e5c7 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -31,12 +31,6 @@ annotsv/annotsv: annotsv/installannotations: - modules/nf-core/annotsv/installannotations/** - tests/modules/nf-core/annotsv/installannotations/** -antismash/antismashlite: - - modules/nf-core/antismash/antismashlite/** - - tests/modules/nf-core/antismash/antismashlite/** -antismash/antismashlitedownloaddatabases: - - modules/nf-core/antismash/antismashlitedownloaddatabases/** - - tests/modules/nf-core/antismash/antismashlitedownloaddatabases/** arcashla/extract: - modules/nf-core/arcashla/extract/** - tests/modules/nf-core/arcashla/extract/** @@ -530,12 +524,6 @@ dastool/scaffolds2bin: dedup: - modules/nf-core/dedup/** - tests/modules/nf-core/dedup/** -deeparg/downloaddata: - - modules/nf-core/deeparg/downloaddata/** - - tests/modules/nf-core/deeparg/downloaddata/** -deeparg/predict: - - modules/nf-core/deeparg/predict/** - - tests/modules/nf-core/deeparg/predict/** deeptmhmm: - modules/nf-core/deeptmhmm/** - tests/modules/nf-core/deeptmhmm/** @@ -1038,24 +1026,6 @@ gunc/run: gvcftools/extractvariants: - modules/nf-core/gvcftools/extractvariants/** - tests/modules/nf-core/gvcftools/extractvariants/** -hamronization/abricate: - - modules/nf-core/hamronization/abricate/** - - tests/modules/nf-core/hamronization/abricate/** -hamronization/amrfinderplus: - - modules/nf-core/hamronization/amrfinderplus/** - - tests/modules/nf-core/hamronization/amrfinderplus/** -hamronization/deeparg: - - modules/nf-core/hamronization/deeparg/** - - tests/modules/nf-core/hamronization/deeparg/** -hamronization/fargene: - - modules/nf-core/hamronization/fargene/** - - tests/modules/nf-core/hamronization/fargene/** -hamronization/rgi: - - modules/nf-core/hamronization/rgi/** - - tests/modules/nf-core/hamronization/rgi/** -hamronization/summarize: - - modules/nf-core/hamronization/summarize/** - - tests/modules/nf-core/hamronization/summarize/** hapibd: - modules/nf-core/hapibd/** - tests/modules/nf-core/hapibd/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index cfcdd51f009..f9087dc32b3 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -627,7 +627,8 @@ params { 'saccharomyces_cerevisiae' { 'genome' { genome_gfp_gtf = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/genome_gfp.gtf" - kallisto_results = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/kallisto_results.tar.gz" + kallisto_results = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/kallisto_results.tar.gz" + salmon_results = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/salmon_results.tar.gz" } } 'generic' { @@ -638,6 +639,8 @@ params { rmarkdown = "${params.test_data_base}/data/generic/notebooks/rmarkdown/rmarkdown_notebook.Rmd" ipython_md = "${params.test_data_base}/data/generic/notebooks/jupyter/ipython_notebook.md" ipython_ipynb = "${params.test_data_base}/data/generic/notebooks/jupyter/ipython_notebook.ipynb" + quarto_r = "${params.test_data_base}/data/generic/notebooks/quarto/quarto_r.qmd" + quarto_python = "${params.test_data_base}/data/generic/notebooks/quarto/quarto_python.qmd" } 'tar' { tar_gz = "${params.test_data_base}/data/generic/tar/hello.tar.gz" diff --git a/tests/modules/nf-core/antismash/antismashlite/main.nf b/tests/modules/nf-core/antismash/antismashlite/main.nf deleted file mode 100644 index 09b37b3668d..00000000000 --- a/tests/modules/nf-core/antismash/antismashlite/main.nf +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { ANTISMASH_ANTISMASHLITE } from '../../../../../modules/nf-core/antismash/antismashlite/main.nf' -include { ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES } from '../../../../modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf' -include { GUNZIP as GUNZIP1 } from '../../../../../modules/nf-core/gunzip/main.nf' -include { GUNZIP as GUNZIP2 } from '../../../../../modules/nf-core/gunzip/main.nf' -include { UNTAR as UNTAR1 } from '../../../../../modules/nf-core/untar/main.nf' -include { UNTAR as UNTAR2 } from '../../../../../modules/nf-core/untar/main.nf' -include { UNTAR as UNTAR3 } from '../../../../../modules/nf-core/untar/main.nf' - -workflow test_antismashlite { - genome_fna = [ - [ id:'test' ], - file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) - ] - - genome_gff = [ - [], - file(params.test_data['bacteroides_fragilis']['genome']['genome_gff_gz'], checkIfExists: true) - ] - - // hash 91bb8781c576967e23d2c5315dd4d43213575033 is for antismash version 6.1.1 - antismash_css = [ - [], - file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/css.tar.gz', checkIfExists: true) - ] - - antismash_detection = [ - [], - file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/detection.tar.gz', checkIfExists: true) - ] - - antismash_modules = [ - [], - file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/modules.tar.gz', checkIfExists: true) - ] - - GUNZIP1 ( genome_fna ) - GUNZIP2 ( genome_gff ) - UNTAR1 ( antismash_css ) - UNTAR2 ( antismash_detection ) - UNTAR3 ( antismash_modules ) - ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } ) - ANTISMASH_ANTISMASHLITE ( GUNZIP1.out.gunzip, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.antismash_dir, GUNZIP2.out.gunzip.map{ it[1] } ) -} diff --git a/tests/modules/nf-core/antismash/antismashlite/nextflow.config b/tests/modules/nf-core/antismash/antismashlite/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/antismash/antismashlite/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/antismash/antismashlite/test.yml b/tests/modules/nf-core/antismash/antismashlite/test.yml deleted file mode 100644 index dda9c9a3971..00000000000 --- a/tests/modules/nf-core/antismash/antismashlite/test.yml +++ /dev/null @@ -1,97 +0,0 @@ -- name: antismash antismashlite test_antismashlite - command: nextflow run ./tests/modules/nf-core/antismash/antismashlite -entry test_antismashlite -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/antismash/antismashlite/nextflow.config - tags: - - antismash - - antismash/antismashlite - files: - - path: output/antismash/test/NZ_CP069563.1.region001.gbk - contains: - - "##antiSMASH-Data-END##" - - path: output/antismash/test/NZ_CP069563.1.region002.gbk - contains: - - "##antiSMASH-Data-END##" - - path: output/antismash/test/css/bacteria.css - md5sum: d9c34889e2a676442ad5301d88b1b425 - - path: output/antismash/test/genome.gbk - contains: - - "##antiSMASH-Data-END##" - - path: output/antismash/test/genome.json - contains: - - "genome.fna" - - "records" - - path: output/antismash/test/genome.zip - - path: output/antismash/test/images/about.svg - md5sum: 2573f954dd506e2d0878daed04f5420a - - path: output/antismash/test/images/bacteria_about.png - md5sum: 99cdc2aa09aee37553b10ca86b172170 - - path: output/antismash/test/images/bacteria_antismash_icon.svg - md5sum: 23a265b0e1cf293a4743fe13030b636f - - path: output/antismash/test/images/bacteria_antismash_logo.svg - md5sum: f80f639969ee6506571ffda2e197df93 - - path: output/antismash/test/images/bacteria_antismash_white.svg - md5sum: 2c9da15cc168d8f796269d037b5e7f60 - - path: output/antismash/test/images/bacteria_download.png - md5sum: c3428df1cf17cb97e2897ca6daa93d48 - - path: output/antismash/test/images/bacteria_help.png - md5sum: 359b68f90c73208eb389759c0f5c1091 - - path: output/antismash/test/images/bacteria_home.png - md5sum: 6595d97ee49d251fe038207f82012eff - - path: output/antismash/test/images/bacteria_logo.png - md5sum: 013f84d6dd93cde96f07084ff63d855c - - path: output/antismash/test/images/contact.svg - md5sum: 53b878c2af4f8a80a647ac30f61e6bf6 - - path: output/antismash/test/images/download.svg - md5sum: 722038156f4ece46747cbf6908501974 - - path: output/antismash/test/images/expand-arrows-alt-solid.svg - md5sum: 21b37749f54320135a455ed266a7fc3a - - path: output/antismash/test/images/external-link-alt-solid.svg - md5sum: ca337694c74e57f73d15ca9db30081ba - - path: output/antismash/test/images/fungi_about.png - md5sum: 4d55bf14df0340dca01a286487fa8448 - - path: output/antismash/test/images/fungi_antismash_icon.svg - md5sum: 2acc19cc91d5d7285a72f0b3912e108a - - path: output/antismash/test/images/fungi_antismash_icon_white.svg - md5sum: 961f1c41e25036a625f115f209a961c7 - - path: output/antismash/test/images/fungi_antismash_logo.svg - md5sum: 36560983a36f46786c98a05125b15724 - - path: output/antismash/test/images/fungi_download.png - md5sum: 782580852674aab0b69b2b94a94c7615 - - path: output/antismash/test/images/fungi_help.png - md5sum: 0ac06748f3177d150ab90997117c4f64 - - path: output/antismash/test/images/fungi_home.png - md5sum: 880071898062d6dafe989ac73bb7bbea - - path: output/antismash/test/images/fungi_logo.png - md5sum: 29294392a3953fd1ba12d1a39cebaeeb - - path: output/antismash/test/images/help.svg - md5sum: e7565a3cd74893422f2886a0af748df2 - - path: output/antismash/test/images/mail.png - md5sum: 049f51233b29663e4e4e4c8097c2d096 - - path: output/antismash/test/images/minus-circle.svg - md5sum: b523305570d06b6e34cd7099bed22015 - - path: output/antismash/test/images/nostructure_icon.png - md5sum: fc982a5b84a1a99db607731625a87f88 - - path: output/antismash/test/images/plant_antismash_icon.svg - md5sum: e031de9570ef2809e52502481a5e77ea - - path: output/antismash/test/images/plant_antismash_icon_white.svg - md5sum: 10d25996b023dbdaed4a382471ab4877 - - path: output/antismash/test/images/plus-circle.svg - md5sum: cba2cdd9ef893274f572228b354718cf - - path: output/antismash/test/images/question-circle-solid.svg - md5sum: 6dbc83547e29ecedc7f2a5b81354353b - - path: output/antismash/test/images/search-solid.svg - md5sum: aeab848c26357f3d120f3e58f1efa8f5 - - path: output/antismash/test/index.html - md5sum: 471f04db1e7c6e055bc0892fe1f637a4 - - path: output/antismash/test/js/antismash.js - md5sum: 55a3f55e1eb5d6ab3fa73d867da12bbd - - path: output/antismash/test/js/jquery.js - md5sum: 397754ba49e9e0cf4e7c190da78dda05 - - path: output/antismash/test/js/jquery.tablesorter.min.js - md5sum: 5e9e08cef4d1be0eaa538e6eb28809a7 - - path: output/antismash/test/regions.js - contains: - - '"seq_id": "NZ_CP069563.1"' - - path: output/antismash/test/test.log - contains: - - "antiSMASH status: SUCCESS" - - path: output/antismash/versions.yml diff --git a/tests/modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf b/tests/modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf deleted file mode 100644 index 90d56004092..00000000000 --- a/tests/modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { UNTAR as UNTAR1 } from '../../../../../modules/nf-core/untar/main.nf' -include { UNTAR as UNTAR2 } from '../../../../../modules/nf-core/untar/main.nf' -include { UNTAR as UNTAR3 } from '../../../../../modules/nf-core/untar/main.nf' -include { ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES } from '../../../../../modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf' - -workflow test_antismash_antismashlitedownloaddatabases { - - // hash 91bb8781c576967e23d2c5315dd4d43213575033 is for antismash version 6.1.1 - antismash_css = [ - [], - file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/css.tar.gz', checkIfExists: true) - ] - - antismash_detection = [ - [], - file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/detection.tar.gz', checkIfExists: true) - ] - - antismash_modules = [ - [], - file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/modules.tar.gz', checkIfExists: true) - ] - - - UNTAR1 ( antismash_css ) - UNTAR2 ( antismash_detection ) - UNTAR3 ( antismash_modules ) - - ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } ) -} diff --git a/tests/modules/nf-core/antismash/antismashlitedownloaddatabases/nextflow.config b/tests/modules/nf-core/antismash/antismashlitedownloaddatabases/nextflow.config deleted file mode 100644 index 06a716aa512..00000000000 --- a/tests/modules/nf-core/antismash/antismashlitedownloaddatabases/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/tests/modules/nf-core/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/nf-core/antismash/antismashlitedownloaddatabases/test.yml deleted file mode 100644 index 3e59e0e8f3f..00000000000 --- a/tests/modules/nf-core/antismash/antismashlitedownloaddatabases/test.yml +++ /dev/null @@ -1,14 +0,0 @@ -- name: antismash antismashlitedownloaddatabases test_antismash_antismashlitedownloaddatabases - command: nextflow run ./tests/modules/nf-core/antismash/antismashlitedownloaddatabases -entry test_antismash_antismashlitedownloaddatabases -c ./tests/config/nextflow.config - tags: - - antismash/antismashlitedownloaddatabases - - antismash - files: - - path: output/antismash/antismash_db - - path: output/antismash/antismash_db/clusterblast - - path: output/antismash/antismash_db/clustercompare - - path: output/antismash/antismash_db/pfam - - path: output/antismash/antismash_db/resfam - - path: output/antismash/antismash_db/tigrfam - - path: output/antismash/antismash_dir - - path: output/antismash/antismash_dir/detection/hmm_detection/data/bgc_seeds.hmm diff --git a/tests/modules/nf-core/deeparg/downloaddata/main.nf b/tests/modules/nf-core/deeparg/downloaddata/main.nf deleted file mode 100644 index eecbdabc8da..00000000000 --- a/tests/modules/nf-core/deeparg/downloaddata/main.nf +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { DEEPARG_DOWNLOADDATA } from '../../../../../modules/nf-core/deeparg/downloaddata/main.nf' - -workflow test_deeparg_downloaddata { - DEEPARG_DOWNLOADDATA ( ) -} diff --git a/tests/modules/nf-core/deeparg/downloaddata/nextflow.config b/tests/modules/nf-core/deeparg/downloaddata/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/deeparg/downloaddata/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/deeparg/downloaddata/test.yml b/tests/modules/nf-core/deeparg/downloaddata/test.yml deleted file mode 100644 index bebb4122075..00000000000 --- a/tests/modules/nf-core/deeparg/downloaddata/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: deeparg downloaddata test_deeparg_downloaddata - command: nextflow run ./tests/modules/nf-core/deeparg/downloaddata -entry test_deeparg_downloaddata -c ./tests/config/nextflow.config - tags: - - deeparg - - deeparg/downloaddata - files: - - path: output/deeparg/db/ - - path: output/deeparg/db/gg13/dataset.rev.2.bt2 - md5sum: 99d90f132fc2795d5a527ce31f1c4d30 diff --git a/tests/modules/nf-core/deeparg/predict/main.nf b/tests/modules/nf-core/deeparg/predict/main.nf deleted file mode 100644 index 5037e398d1e..00000000000 --- a/tests/modules/nf-core/deeparg/predict/main.nf +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { DEEPARG_DOWNLOADDATA } from '../../../../../modules/nf-core/deeparg/downloaddata/main.nf' -include { DEEPARG_PREDICT } from '../../../../../modules/nf-core/deeparg/predict/main.nf' - -workflow test_deeparg_predict { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), - 'LS' - ] - - DEEPARG_DOWNLOADDATA( ) - DEEPARG_PREDICT ( input, DEEPARG_DOWNLOADDATA.out.db ) - -} diff --git a/tests/modules/nf-core/deeparg/predict/nextflow.config b/tests/modules/nf-core/deeparg/predict/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/deeparg/predict/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/deeparg/predict/test.yml b/tests/modules/nf-core/deeparg/predict/test.yml deleted file mode 100644 index e098aa536cc..00000000000 --- a/tests/modules/nf-core/deeparg/predict/test.yml +++ /dev/null @@ -1,15 +0,0 @@ -- name: deeparg predict test_deeparg_predict - command: nextflow run ./tests/modules/nf-core/deeparg/predict -entry test_deeparg_predict -c ./tests/config/nextflow.config - tags: - - deeparg/predict - - deeparg - files: - - path: output/deeparg/test.align.daa - - path: output/deeparg/test.align.daa.tsv - md5sum: 46b6eba345742365fc1dbd5b4bacd3a2 - - path: output/deeparg/test.mapping.ARG - md5sum: 0e049e99eab4c55666062df21707d5b9 - - path: output/deeparg/test.mapping.potential.ARG - contains: - - "#ARG" - - path: output/deeparg/versions.yml diff --git a/tests/modules/nf-core/hamronization/abricate/main.nf b/tests/modules/nf-core/hamronization/abricate/main.nf deleted file mode 100644 index 51fbf61ad5a..00000000000 --- a/tests/modules/nf-core/hamronization/abricate/main.nf +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { HAMRONIZATION_ABRICATE } from '../../../../../modules/nf-core/hamronization/abricate/main.nf' - -workflow test_hamronization_abricate { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['bacteroides_fragilis']['hamronization']['genome_abricate_tsv'], checkIfExists: true), - ] - - HAMRONIZATION_ABRICATE ( input, 'tsv', '1.0.1', '2021-Mar-27' ) -} diff --git a/tests/modules/nf-core/hamronization/abricate/nextflow.config b/tests/modules/nf-core/hamronization/abricate/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/hamronization/abricate/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/hamronization/abricate/test.yml b/tests/modules/nf-core/hamronization/abricate/test.yml deleted file mode 100644 index b2c4047d0c3..00000000000 --- a/tests/modules/nf-core/hamronization/abricate/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: hamronization abricate test_hamronization_abricate - command: nextflow run ./tests/modules/nf-core/hamronization/abricate -entry test_hamronization_abricate -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/hamronization/abricate/nextflow.config - tags: - - hamronization/abricate - - hamronization - files: - - path: output/hamronization/test.tsv - contains: - - "input_file_name gene_symbol gene_name reference_database_name reference_database_version reference_accession analysis_software_name analysis_software_version genetic_variation_type antimicrobial_agent coverage_percentage coverage_depth coverage_ratio drug_class input_gene_length input_gene_start input_gene_stop input_protein_length input_protein_start input_protein_stop input_sequence_id nucleotide_mutation nucleotide_mutation_interpretation predicted_phenotype predicted_phenotype_confidence_level amino_acid_mutation amino_acid_mutation_interpretation reference_gene_length reference_gene_start reference_gene_stop reference_protein_length reference_protein_start reference_protein_stop resistance_mechanism strand_orientation sequence_identity" diff --git a/tests/modules/nf-core/hamronization/amrfinderplus/main.nf b/tests/modules/nf-core/hamronization/amrfinderplus/main.nf deleted file mode 100644 index 2410104ce3d..00000000000 --- a/tests/modules/nf-core/hamronization/amrfinderplus/main.nf +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 -include { HAMRONIZATION_AMRFINDERPLUS } from '../../../../../modules/nf-core/hamronization/amrfinderplus/main.nf' - -workflow test_hamronization_amrfinderplus { - - input = [ - [ id:'test', single_end:false ], // meta map - file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/amrfinderplus/test_output.tsv", checkIfExists: true) - ] - - HAMRONIZATION_AMRFINDERPLUS ( input, 'tsv', '3.10.30', '2022-05-26.1' ) -} diff --git a/tests/modules/nf-core/hamronization/amrfinderplus/nextflow.config b/tests/modules/nf-core/hamronization/amrfinderplus/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/hamronization/amrfinderplus/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/hamronization/amrfinderplus/test.yml b/tests/modules/nf-core/hamronization/amrfinderplus/test.yml deleted file mode 100644 index 8cd42a902a3..00000000000 --- a/tests/modules/nf-core/hamronization/amrfinderplus/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: hamronization amrfinderplus test_hamronization_amrfinderplus - command: nextflow run ./tests/modules/nf-core/hamronization/amrfinderplus -entry test_hamronization_amrfinderplus -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/hamronization/amrfinderplus/nextflow.config - tags: - - hamronization - - hamronization/amrfinderplus - files: - - path: output/hamronization/test.tsv - contains: - - "input_file_name gene_symbol gene_name reference_database_name reference_database_version reference_accession analysis_software_name analysis_software_version genetic_variation_type antimicrobial_agent coverage_percentage coverage_depth coverage_ratio drug_class input_gene_length input_gene_start input_gene_stop input_protein_length input_protein_start input_protein_stop input_sequence_id nucleotide_mutation nucleotide_mutation_interpretation predicted_phenotype predicted_phenotype_confidence_level amino_acid_mutation amino_acid_mutation_interpretation reference_gene_length reference_gene_start reference_gene_stop reference_protein_length reference_protein_start reference_protein_stop resistance_mechanism strand_orientation sequence_identity" diff --git a/tests/modules/nf-core/hamronization/deeparg/main.nf b/tests/modules/nf-core/hamronization/deeparg/main.nf deleted file mode 100644 index ad452e0d415..00000000000 --- a/tests/modules/nf-core/hamronization/deeparg/main.nf +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { HAMRONIZATION_DEEPARG } from '../../../../../modules/nf-core/hamronization/deeparg/main.nf' - -workflow test_hamronization_deeparg { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['bacteroides_fragilis']['hamronization']['genome_mapping_potential_arg'], checkIfExists: true), - ] - - HAMRONIZATION_DEEPARG ( input, 'tsv', '1.0.2', '2' ) -} diff --git a/tests/modules/nf-core/hamronization/deeparg/nextflow.config b/tests/modules/nf-core/hamronization/deeparg/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/hamronization/deeparg/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/hamronization/deeparg/test.yml b/tests/modules/nf-core/hamronization/deeparg/test.yml deleted file mode 100644 index f5a2ce83b24..00000000000 --- a/tests/modules/nf-core/hamronization/deeparg/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: hamronization deeparg test_hamronization_deeparg - command: nextflow run ./tests/modules/nf-core/hamronization/deeparg -entry test_hamronization_deeparg -c ./tests/config/nextflow.config - tags: - - hamronization - - hamronization/deeparg - files: - - path: output/hamronization/test.tsv - contains: - - "input_file_name gene_symbol gene_name reference_database_name reference_database_version reference_accession analysis_software_name analysis_software_version genetic_variation_type antimicrobial_agent coverage_percentage coverage_depth coverage_ratio drug_class input_gene_length input_gene_start input_gene_stop input_protein_length input_protein_start input_protein_stop input_sequence_id nucleotide_mutation nucleotide_mutation_interpretation predicted_phenotype predicted_phenotype_confidence_level amino_acid_mutation amino_acid_mutation_interpretation reference_gene_length reference_gene_start reference_gene_stop reference_protein_length reference_protein_start reference_protein_stop resistance_mechanism strand_orientation sequence_identity" diff --git a/tests/modules/nf-core/hamronization/fargene/main.nf b/tests/modules/nf-core/hamronization/fargene/main.nf deleted file mode 100644 index 6ded7b2ac34..00000000000 --- a/tests/modules/nf-core/hamronization/fargene/main.nf +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { GUNZIP } from '../../../../modules/nf-core/gunzip/main.nf' -include { FARGENE } from '../../../../modules/nf-core/fargene/main.nf' -include { HAMRONIZATION_FARGENE } from '../../../../../modules/nf-core/hamronization/fargene/main.nf' - -workflow test_hamronization_fargene { - - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) ] - hmm_model = 'class_a' - - GUNZIP ( input ) - FARGENE ( GUNZIP.out.gunzip, hmm_model ) - - HAMRONIZATION_FARGENE ( FARGENE.out.hmm, 'tsv', '0.1', '0.1' ) -} diff --git a/tests/modules/nf-core/hamronization/fargene/nextflow.config b/tests/modules/nf-core/hamronization/fargene/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/hamronization/fargene/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/hamronization/fargene/test.yml b/tests/modules/nf-core/hamronization/fargene/test.yml deleted file mode 100644 index ebde50d6f53..00000000000 --- a/tests/modules/nf-core/hamronization/fargene/test.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: hamronization fargene test_hamronization_fargene - command: nextflow run ./tests/modules/nf-core/hamronization/fargene -entry test_hamronization_fargene -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/hamronization/fargene/nextflow.config - tags: - - hamronization - - hamronization/fargene - files: - - path: output/hamronization/test.tsv diff --git a/tests/modules/nf-core/hamronization/rgi/main.nf b/tests/modules/nf-core/hamronization/rgi/main.nf deleted file mode 100644 index ef9c5a9fd89..00000000000 --- a/tests/modules/nf-core/hamronization/rgi/main.nf +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 -include { RGI_MAIN } from '../../../../../modules/nf-core/rgi/main/main.nf' -include { HAMRONIZATION_RGI } from '../../../../../modules/nf-core/hamronization/rgi/main.nf' - -workflow test_hamronization_rgi { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true) - ] - - RGI_MAIN ( input ) - HAMRONIZATION_RGI ( RGI_MAIN.out.tsv, 'tsv', '1.0.2', '3.2.3' ) -} diff --git a/tests/modules/nf-core/hamronization/rgi/nextflow.config b/tests/modules/nf-core/hamronization/rgi/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/hamronization/rgi/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/hamronization/rgi/test.yml b/tests/modules/nf-core/hamronization/rgi/test.yml deleted file mode 100644 index cd8e2c6bd72..00000000000 --- a/tests/modules/nf-core/hamronization/rgi/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: hamronization rgi - command: nextflow run ./tests/modules/nf-core/hamronization/rgi -entry test_hamronization_rgi -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/hamronization/rgi/nextflow.config - tags: - - hamronization - - hamronization/rgi - files: - - path: output/hamronization/test.tsv - contains: - - "input_file_name gene_symbol gene_name reference_database_name reference_database_version reference_accession analysis_software_name analysis_software_version genetic_variation_type antimicrobial_agent coverage_percentage coverage_depth coverage_ratio drug_class input_gene_length input_gene_start input_gene_stop input_protein_length input_protein_start input_protein_stop input_sequence_id nucleotide_mutation nucleotide_mutation_interpretation predicted_phenotype predicted_phenotype_confidence_level amino_acid_mutation amino_acid_mutation_interpretation reference_gene_length reference_gene_start reference_gene_stop reference_protein_length reference_protein_start reference_protein_stop resistance_mechanism strand_orientation sequence_identity" diff --git a/tests/modules/nf-core/hamronization/summarize/main.nf b/tests/modules/nf-core/hamronization/summarize/main.nf deleted file mode 100644 index b5f096c0b13..00000000000 --- a/tests/modules/nf-core/hamronization/summarize/main.nf +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { HAMRONIZATION_DEEPARG } from '../../../../../modules/nf-core/hamronization/deeparg/main.nf' -include { HAMRONIZATION_DEEPARG as HAMRONIZATION_DEEPARG_SECOND } from '../../../../../modules/nf-core/hamronization/deeparg/main.nf' -include { HAMRONIZATION_SUMMARIZE } from '../../../../../modules/nf-core/hamronization/summarize/main.nf' - -workflow test_hamronization_summarize { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['bacteroides_fragilis']['hamronization']['genome_mapping_potential_arg'], checkIfExists: true), - ] - - input2 = [ - [ id:'test2', single_end:false ], // meta map - file(params.test_data['bacteroides_fragilis']['hamronization']['genome_mapping_potential_arg'], checkIfExists: true), - ] - - HAMRONIZATION_DEEPARG ( input, 'tsv', '1.0.2', '2' ) - HAMRONIZATION_DEEPARG_SECOND ( input2, 'tsv', '1.0.2', '2' ) - - ch_deeparg_run_one = HAMRONIZATION_DEEPARG.out.tsv - ch_deeparg_run_two = HAMRONIZATION_DEEPARG_SECOND.out.tsv - - ch_deeparg_run_one - .mix( ch_deeparg_run_two ) - .map{ - [ it[1] ] - } - .collect() - .set { ch_input_for_summarize } - - HAMRONIZATION_SUMMARIZE ( ch_input_for_summarize , 'json' ) -} diff --git a/tests/modules/nf-core/hamronization/summarize/nextflow.config b/tests/modules/nf-core/hamronization/summarize/nextflow.config deleted file mode 100644 index 8730f1c4b93..00000000000 --- a/tests/modules/nf-core/hamronization/summarize/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/tests/modules/nf-core/hamronization/summarize/test.yml b/tests/modules/nf-core/hamronization/summarize/test.yml deleted file mode 100644 index 17be8f273b9..00000000000 --- a/tests/modules/nf-core/hamronization/summarize/test.yml +++ /dev/null @@ -1,12 +0,0 @@ -- name: hamronization summarize test_hamronization_summarize - command: nextflow run ./tests/modules/nf-core/hamronization/summarize -entry test_hamronization_summarize -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/hamronization/summarize/nextflow.config - tags: - - hamronization - - hamronization/summarize - files: - - path: output/hamronization/hamronization_combined_report.json - md5sum: ab0c899664398193a25a699b92f960b9 - - path: output/hamronization/test.tsv - md5sum: e886d665bf9fc266be8193859863d2f4 - - path: output/hamronization/test2.tsv - md5sum: 2d94ecb8be8d9036877e47a81ae92a41