From 49fe8a149a4a22278d286e1a9dbf83d82ade81db Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Fri, 19 Sep 2025 13:53:57 +0100 Subject: [PATCH 1/8] Update to include tmpdir --- .../diamond/blastp/diamond-blastp.diff | 21 +++++++++++++++++-- modules/nf-core/diamond/blastp/main.nf | 3 +++ .../diamond/blastx/diamond-blastx.diff | 21 +++++++++++++++++-- modules/nf-core/diamond/blastx/main.nf | 3 +++ 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/diamond/blastp/diamond-blastp.diff b/modules/nf-core/diamond/blastp/diamond-blastp.diff index 12608ea0..0ebe59eb 100644 --- a/modules/nf-core/diamond/blastp/diamond-blastp.diff +++ b/modules/nf-core/diamond/blastp/diamond-blastp.diff @@ -1,4 +1,7 @@ -Changes in module 'nf-core/diamond/blastp' +Changes in component 'nf-core/diamond/blastp' +'modules/nf-core/diamond/blastp/meta.yml' is unchanged +'modules/nf-core/diamond/blastp/environment.yml' is unchanged +Changes in 'diamond/blastp/main.nf': --- modules/nf-core/diamond/blastp/main.nf +++ modules/nf-core/diamond/blastp/main.nf @@ -12,6 +12,7 @@ @@ -17,13 +20,27 @@ Changes in module 'nf-core/diamond/blastp' switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break -@@ -59,6 +61,7 @@ +@@ -51,6 +53,8 @@ + gzip -c -d ${fasta} > ${fasta_name} + fi + ++ mkdir ./tmpdir/ ++ + DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` + + diamond \\ +@@ -59,7 +63,9 @@ --db \$DB \\ --query ${fasta_name} \\ --outfmt ${outfmt} ${columns} \\ + ${exclude_taxon} \\ ${args} \\ ++ --tmpdir ./tmpdir/ \\ --out ${prefix}.${out_ext} + cat <<-END_VERSIONS > versions.yml +'modules/nf-core/diamond/blastp/tests/main.nf.test' is unchanged +'modules/nf-core/diamond/blastp/tests/main.nf.test.snap' is unchanged +'modules/nf-core/diamond/blastp/tests/tags.yml' is unchanged ************************************************************ diff --git a/modules/nf-core/diamond/blastp/main.nf b/modules/nf-core/diamond/blastp/main.nf index ae5a1248..d2040260 100644 --- a/modules/nf-core/diamond/blastp/main.nf +++ b/modules/nf-core/diamond/blastp/main.nf @@ -53,6 +53,8 @@ process DIAMOND_BLASTP { gzip -c -d ${fasta} > ${fasta_name} fi + mkdir ./tmpdir/ + DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` diamond \\ @@ -63,6 +65,7 @@ process DIAMOND_BLASTP { --outfmt ${outfmt} ${columns} \\ ${exclude_taxon} \\ ${args} \\ + --tmpdir ./tmpdir/ \\ --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/diamond/blastx/diamond-blastx.diff b/modules/nf-core/diamond/blastx/diamond-blastx.diff index eff4326a..28444535 100644 --- a/modules/nf-core/diamond/blastx/diamond-blastx.diff +++ b/modules/nf-core/diamond/blastx/diamond-blastx.diff @@ -1,4 +1,7 @@ -Changes in module 'nf-core/diamond/blastx' +Changes in component 'nf-core/diamond/blastx' +'modules/nf-core/diamond/blastx/meta.yml' is unchanged +'modules/nf-core/diamond/blastx/environment.yml' is unchanged +Changes in 'diamond/blastx/main.nf': --- modules/nf-core/diamond/blastx/main.nf +++ modules/nf-core/diamond/blastx/main.nf @@ -12,6 +12,7 @@ @@ -17,13 +20,27 @@ Changes in module 'nf-core/diamond/blastx' switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break -@@ -60,6 +62,7 @@ +@@ -52,6 +54,8 @@ + gzip -c -d ${fasta} > ${fasta_name} + fi + ++ mkdir ./tmpdir/ ++ + DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` + + diamond \\ +@@ -60,7 +64,9 @@ --db \$DB \\ --query ${fasta_name} \\ --outfmt ${outfmt} ${columns} \\ + ${exclude_taxon} \\ ${args} \\ ++ --tmpdir ./tmpdir/ \\ --out ${prefix}.${out_ext} \\ --log + +'modules/nf-core/diamond/blastx/tests/main.nf.test' is unchanged +'modules/nf-core/diamond/blastx/tests/main.nf.test.snap' is unchanged +'modules/nf-core/diamond/blastx/tests/tags.yml' is unchanged ************************************************************ diff --git a/modules/nf-core/diamond/blastx/main.nf b/modules/nf-core/diamond/blastx/main.nf index dfa82e24..a3fbb1c4 100644 --- a/modules/nf-core/diamond/blastx/main.nf +++ b/modules/nf-core/diamond/blastx/main.nf @@ -54,6 +54,8 @@ process DIAMOND_BLASTX { gzip -c -d ${fasta} > ${fasta_name} fi + mkdir ./tmpdir/ + DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` diamond \\ @@ -64,6 +66,7 @@ process DIAMOND_BLASTX { --outfmt ${outfmt} ${columns} \\ ${exclude_taxon} \\ ${args} \\ + --tmpdir ./tmpdir/ \\ --out ${prefix}.${out_ext} \\ --log From 29d3bc73f617a92a665fdc7de9fe538ea668cfc4 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Fri, 19 Sep 2025 13:55:18 +0100 Subject: [PATCH 2/8] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0926d1e4..f5791e16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The pipeline now stops on Busco failures - Update resource requirements for BLASTN modules (#191) and BLOBTOOLKIT_WINDOWSTATS - Fixed the `test_full` profile (Sanger only) +- Addition of `--tmpdir` to Diamond blast modules (#200) ### Software dependencies From cba18cc3641da56e8d543c9e994ed8fd614c13c7 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Fri, 19 Sep 2025 15:51:03 +0100 Subject: [PATCH 3/8] Correction based on comments from @muffato --- conf/modules.config | 5 +- modules.json | 82 ++++++++++++++----- .../diamond/blastp/diamond-blastp.diff | 20 +++-- modules/nf-core/diamond/blastp/main.nf | 7 +- .../diamond/blastx/diamond-blastx.diff | 20 +++-- modules/nf-core/diamond/blastx/main.nf | 7 +- 6 files changed, 99 insertions(+), 42 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 87f686aa..af65237f 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -105,11 +105,11 @@ process { } withName: "DIAMOND_BLASTP" { - ext.args = "--evalue 1.0e-25 --max-target-seqs 10 --max-hsps 1" + ext.args = { "--evalue 1.0e-25 --max-target-seqs 10 --max-hsps 1" + ( params.use_work_dir_as_temp ? " --tmpdir ./blastp_tmp/" : "" ) } } withName: "DIAMOND_BLASTX" { - ext.args = "--evalue 1.0e-25 --max-target-seqs 10 --max-hsps 1" + ext.args = { "--evalue 1.0e-25 --max-target-seqs 10 --max-hsps 1" + ( params.use_work_dir_as_temp ? " --tmpdir ./blastp_tmp/" : "" ) } } withName: "BLOBTK_DEPTH" { @@ -178,4 +178,3 @@ process { } } - diff --git a/modules.json b/modules.json index a2111293..c9b77b70 100644 --- a/modules.json +++ b/modules.json @@ -8,95 +8,129 @@ "blast/blastn": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/blast/blastn/blast-blastn.diff" }, "busco/busco": { "branch": "master", "git_sha": "36c6c8445284e021d95ce30cdf743baef66b21aa", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/busco/busco/busco-busco.diff" }, "cat/cat": { "branch": "master", "git_sha": "08108058ea36a63f141c25c4e75f9f872a5b2296", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "diamond/blastp": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/diamond/blastp/diamond-blastp.diff" }, "diamond/blastx": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/diamond/blastx/diamond-blastx.diff" }, "fastawindows": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/fastawindows/fastawindows.diff" }, "gunzip": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "minimap2/align": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/minimap2/align/minimap2-align.diff" }, "multiqc": { "branch": "master", "git_sha": "f0719ae309075ae4a291533883847c3f7c441dad", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "pigz/compress": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/flagstat": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/index": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/view": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/view/samtools-view.diff" }, "seqtk/subseq": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/seqtk/subseq/seqtk-subseq.diff" }, "untar": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "windowmasker/mkcounts": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "windowmasker/ustat": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] } } }, @@ -105,20 +139,26 @@ "utils_nextflow_pipeline": { "branch": "master", "git_sha": "c2b22d85f30a706a3073387f30380704fcae013b", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "51ae5406a030d4da1e49e4dab49756844fdd6c7a", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/diamond/blastp/diamond-blastp.diff b/modules/nf-core/diamond/blastp/diamond-blastp.diff index 0ebe59eb..81a8b4a4 100644 --- a/modules/nf-core/diamond/blastp/diamond-blastp.diff +++ b/modules/nf-core/diamond/blastp/diamond-blastp.diff @@ -20,25 +20,31 @@ Changes in 'diamond/blastp/main.nf': switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break -@@ -51,6 +53,8 @@ +@@ -46,10 +48,16 @@ + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break + } ++ ++ def tmpdir_arg = args =~ /--tmpdir\s+(\S+)/ ++ def tmpdir = tmpdir_arg ? tmpdir_arg[0][1] : '' ++ + """ + if [ "${is_compressed}" == "true" ]; then gzip -c -d ${fasta} > ${fasta_name} fi - -+ mkdir ./tmpdir/ + ++ ${tmpdir ? "mkdir -p ${tmpdir}" : ''} + DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` - diamond \\ -@@ -59,7 +63,9 @@ +@@ -59,6 +67,7 @@ --db \$DB \\ --query ${fasta_name} \\ --outfmt ${outfmt} ${columns} \\ + ${exclude_taxon} \\ ${args} \\ -+ --tmpdir ./tmpdir/ \\ --out ${prefix}.${out_ext} - cat <<-END_VERSIONS > versions.yml 'modules/nf-core/diamond/blastp/tests/main.nf.test' is unchanged 'modules/nf-core/diamond/blastp/tests/main.nf.test.snap' is unchanged diff --git a/modules/nf-core/diamond/blastp/main.nf b/modules/nf-core/diamond/blastp/main.nf index d2040260..382d149d 100644 --- a/modules/nf-core/diamond/blastp/main.nf +++ b/modules/nf-core/diamond/blastp/main.nf @@ -48,12 +48,16 @@ process DIAMOND_BLASTP { log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); break } + + def tmpdir_arg = args =~ /--tmpdir\s+(\S+)/ + def tmpdir = tmpdir_arg ? tmpdir_arg[0][1] : '' + """ if [ "${is_compressed}" == "true" ]; then gzip -c -d ${fasta} > ${fasta_name} fi - mkdir ./tmpdir/ + ${tmpdir ? "mkdir -p ${tmpdir}" : ''} DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` @@ -65,7 +69,6 @@ process DIAMOND_BLASTP { --outfmt ${outfmt} ${columns} \\ ${exclude_taxon} \\ ${args} \\ - --tmpdir ./tmpdir/ \\ --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/diamond/blastx/diamond-blastx.diff b/modules/nf-core/diamond/blastx/diamond-blastx.diff index 28444535..04b7d3c2 100644 --- a/modules/nf-core/diamond/blastx/diamond-blastx.diff +++ b/modules/nf-core/diamond/blastx/diamond-blastx.diff @@ -20,25 +20,31 @@ Changes in 'diamond/blastx/main.nf': switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break -@@ -52,6 +54,8 @@ +@@ -47,10 +49,16 @@ + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break + } ++ ++ def tmpdir_arg = args =~ /--tmpdir\s+(\S+)/ ++ def tmpdir = tmpdir_arg ? tmpdir_arg[0][1] : '' ++ + """ + if [ "${is_compressed}" == "true" ]; then gzip -c -d ${fasta} > ${fasta_name} fi - -+ mkdir ./tmpdir/ + ++ ${tmpdir ? "mkdir -p ${tmpdir}" : ''} + DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` - diamond \\ -@@ -60,7 +64,9 @@ +@@ -60,6 +68,7 @@ --db \$DB \\ --query ${fasta_name} \\ --outfmt ${outfmt} ${columns} \\ + ${exclude_taxon} \\ ${args} \\ -+ --tmpdir ./tmpdir/ \\ --out ${prefix}.${out_ext} \\ --log - 'modules/nf-core/diamond/blastx/tests/main.nf.test' is unchanged 'modules/nf-core/diamond/blastx/tests/main.nf.test.snap' is unchanged diff --git a/modules/nf-core/diamond/blastx/main.nf b/modules/nf-core/diamond/blastx/main.nf index a3fbb1c4..9eddc5a4 100644 --- a/modules/nf-core/diamond/blastx/main.nf +++ b/modules/nf-core/diamond/blastx/main.nf @@ -49,12 +49,16 @@ process DIAMOND_BLASTX { log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); break } + + def tmpdir_arg = args =~ /--tmpdir\s+(\S+)/ + def tmpdir = tmpdir_arg ? tmpdir_arg[0][1] : '' + """ if [ "${is_compressed}" == "true" ]; then gzip -c -d ${fasta} > ${fasta_name} fi - mkdir ./tmpdir/ + ${tmpdir ? "mkdir -p ${tmpdir}" : ''} DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` @@ -66,7 +70,6 @@ process DIAMOND_BLASTX { --outfmt ${outfmt} ${columns} \\ ${exclude_taxon} \\ ${args} \\ - --tmpdir ./tmpdir/ \\ --out ${prefix}.${out_ext} \\ --log From c2dd92e60a9d91df723ac8b9e7e7be593502a302 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Fri, 19 Sep 2025 15:51:50 +0100 Subject: [PATCH 4/8] linter! --- modules.json | 82 ++++++++++++++-------------------------------------- 1 file changed, 21 insertions(+), 61 deletions(-) diff --git a/modules.json b/modules.json index c9b77b70..a2111293 100644 --- a/modules.json +++ b/modules.json @@ -8,129 +8,95 @@ "blast/blastn": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/blast/blastn/blast-blastn.diff" }, "busco/busco": { "branch": "master", "git_sha": "36c6c8445284e021d95ce30cdf743baef66b21aa", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/busco/busco/busco-busco.diff" }, "cat/cat": { "branch": "master", "git_sha": "08108058ea36a63f141c25c4e75f9f872a5b2296", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "diamond/blastp": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/diamond/blastp/diamond-blastp.diff" }, "diamond/blastx": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/diamond/blastx/diamond-blastx.diff" }, "fastawindows": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/fastawindows/fastawindows.diff" }, "gunzip": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/align": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/minimap2/align/minimap2-align.diff" }, "multiqc": { "branch": "master", "git_sha": "f0719ae309075ae4a291533883847c3f7c441dad", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "pigz/compress": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/index": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/view": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/view/samtools-view.diff" }, "seqtk/subseq": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/seqtk/subseq/seqtk-subseq.diff" }, "untar": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "windowmasker/mkcounts": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "windowmasker/ustat": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] } } }, @@ -139,26 +105,20 @@ "utils_nextflow_pipeline": { "branch": "master", "git_sha": "c2b22d85f30a706a3073387f30380704fcae013b", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "51ae5406a030d4da1e49e4dab49756844fdd6c7a", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} From 82b98906e9a10b1732592801ba6157e1443d43c9 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Mon, 22 Sep 2025 11:09:53 +0100 Subject: [PATCH 5/8] Updates based on comments --- CHANGELOG.md | 1 + modules.json | 82 ++++++++++++++----- .../diamond/blastp/diamond-blastp.diff | 18 ++-- modules/nf-core/diamond/blastp/main.nf | 6 +- .../diamond/blastx/diamond-blastx.diff | 18 ++-- modules/nf-core/diamond/blastx/main.nf | 6 +- nextflow.config | 2 +- nextflow_schema.json | 4 +- 8 files changed, 77 insertions(+), 60 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5791e16..83d084ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update resource requirements for BLASTN modules (#191) and BLOBTOOLKIT_WINDOWSTATS - Fixed the `test_full` profile (Sanger only) - Addition of `--tmpdir` to Diamond blast modules (#200) +- `--use_work_dir_as_temp` is no longer a hidden param. ### Software dependencies diff --git a/modules.json b/modules.json index a2111293..c9b77b70 100644 --- a/modules.json +++ b/modules.json @@ -8,95 +8,129 @@ "blast/blastn": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/blast/blastn/blast-blastn.diff" }, "busco/busco": { "branch": "master", "git_sha": "36c6c8445284e021d95ce30cdf743baef66b21aa", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/busco/busco/busco-busco.diff" }, "cat/cat": { "branch": "master", "git_sha": "08108058ea36a63f141c25c4e75f9f872a5b2296", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "diamond/blastp": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/diamond/blastp/diamond-blastp.diff" }, "diamond/blastx": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/diamond/blastx/diamond-blastx.diff" }, "fastawindows": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/fastawindows/fastawindows.diff" }, "gunzip": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "minimap2/align": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/minimap2/align/minimap2-align.diff" }, "multiqc": { "branch": "master", "git_sha": "f0719ae309075ae4a291533883847c3f7c441dad", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "pigz/compress": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/flagstat": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/index": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/view": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/view/samtools-view.diff" }, "seqtk/subseq": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/seqtk/subseq/seqtk-subseq.diff" }, "untar": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "windowmasker/mkcounts": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "windowmasker/ustat": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] } } }, @@ -105,20 +139,26 @@ "utils_nextflow_pipeline": { "branch": "master", "git_sha": "c2b22d85f30a706a3073387f30380704fcae013b", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "51ae5406a030d4da1e49e4dab49756844fdd6c7a", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/diamond/blastp/diamond-blastp.diff b/modules/nf-core/diamond/blastp/diamond-blastp.diff index 81a8b4a4..cf18a7dd 100644 --- a/modules/nf-core/diamond/blastp/diamond-blastp.diff +++ b/modules/nf-core/diamond/blastp/diamond-blastp.diff @@ -20,24 +20,16 @@ Changes in 'diamond/blastp/main.nf': switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break -@@ -46,10 +48,16 @@ - log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); - break - } -+ -+ def tmpdir_arg = args =~ /--tmpdir\s+(\S+)/ -+ def tmpdir = tmpdir_arg ? tmpdir_arg[0][1] : '' -+ - """ - if [ "${is_compressed}" == "true" ]; then +@@ -51,6 +53,8 @@ gzip -c -d ${fasta} > ${fasta_name} fi -+ -+ ${tmpdir ? "mkdir -p ${tmpdir}" : ''} ++ mkdir -p ./blastp_temp ++ DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` -@@ -59,6 +67,7 @@ + diamond \\ +@@ -59,6 +63,7 @@ --db \$DB \\ --query ${fasta_name} \\ --outfmt ${outfmt} ${columns} \\ diff --git a/modules/nf-core/diamond/blastp/main.nf b/modules/nf-core/diamond/blastp/main.nf index 382d149d..64550215 100644 --- a/modules/nf-core/diamond/blastp/main.nf +++ b/modules/nf-core/diamond/blastp/main.nf @@ -48,16 +48,12 @@ process DIAMOND_BLASTP { log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); break } - - def tmpdir_arg = args =~ /--tmpdir\s+(\S+)/ - def tmpdir = tmpdir_arg ? tmpdir_arg[0][1] : '' - """ if [ "${is_compressed}" == "true" ]; then gzip -c -d ${fasta} > ${fasta_name} fi - ${tmpdir ? "mkdir -p ${tmpdir}" : ''} + mkdir -p ./blastp_temp DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` diff --git a/modules/nf-core/diamond/blastx/diamond-blastx.diff b/modules/nf-core/diamond/blastx/diamond-blastx.diff index 04b7d3c2..650be74a 100644 --- a/modules/nf-core/diamond/blastx/diamond-blastx.diff +++ b/modules/nf-core/diamond/blastx/diamond-blastx.diff @@ -20,24 +20,16 @@ Changes in 'diamond/blastx/main.nf': switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break -@@ -47,10 +49,16 @@ - log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); - break - } -+ -+ def tmpdir_arg = args =~ /--tmpdir\s+(\S+)/ -+ def tmpdir = tmpdir_arg ? tmpdir_arg[0][1] : '' -+ - """ - if [ "${is_compressed}" == "true" ]; then +@@ -52,6 +54,8 @@ gzip -c -d ${fasta} > ${fasta_name} fi -+ -+ ${tmpdir ? "mkdir -p ${tmpdir}" : ''} ++ mkdir -p ./blastx_temp ++ DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` -@@ -60,6 +68,7 @@ + diamond \\ +@@ -60,6 +64,7 @@ --db \$DB \\ --query ${fasta_name} \\ --outfmt ${outfmt} ${columns} \\ diff --git a/modules/nf-core/diamond/blastx/main.nf b/modules/nf-core/diamond/blastx/main.nf index 9eddc5a4..3093c673 100644 --- a/modules/nf-core/diamond/blastx/main.nf +++ b/modules/nf-core/diamond/blastx/main.nf @@ -49,16 +49,12 @@ process DIAMOND_BLASTX { log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); break } - - def tmpdir_arg = args =~ /--tmpdir\s+(\S+)/ - def tmpdir = tmpdir_arg ? tmpdir_arg[0][1] : '' - """ if [ "${is_compressed}" == "true" ]; then gzip -c -d ${fasta} > ${fasta_name} fi - ${tmpdir ? "mkdir -p ${tmpdir}" : ''} + mkdir -p ./blastx_temp DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` diff --git a/nextflow.config b/nextflow.config index c65219f9..bacd63d9 100644 --- a/nextflow.config +++ b/nextflow.config @@ -38,7 +38,7 @@ params { skip_taxon_filtering = false // Execution options - use_work_dir_as_temp = false + use_work_dir_as_temp = false // MultiQC options multiqc_config = null diff --git a/nextflow_schema.json b/nextflow_schema.json index 26724683..a6fbbcda 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -175,9 +175,9 @@ "properties": { "use_work_dir_as_temp": { "type": "boolean", - "description": "Set to true to make tools (e.g. sort, FastK, MerquryFK) use the work directory for their temporary files, rather than the system default.", + "description": "Set to true to make tools (e.g. sort, FastK, MerquryFK, BLASTP, BLASTX) use the work directory for their temporary files, rather than the system default.", "fa_icon": "fas fa-arrow-circle-down", - "hidden": true + "hidden": false } }, "fa_icon": "fas fa-running" From f134a969bf73688ebe255b4cb059a88f66a3611f Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Mon, 22 Sep 2025 11:10:18 +0100 Subject: [PATCH 6/8] Updates based on comments --- modules.json | 82 ++++++++++++++-------------------------------------- 1 file changed, 21 insertions(+), 61 deletions(-) diff --git a/modules.json b/modules.json index c9b77b70..a2111293 100644 --- a/modules.json +++ b/modules.json @@ -8,129 +8,95 @@ "blast/blastn": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/blast/blastn/blast-blastn.diff" }, "busco/busco": { "branch": "master", "git_sha": "36c6c8445284e021d95ce30cdf743baef66b21aa", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/busco/busco/busco-busco.diff" }, "cat/cat": { "branch": "master", "git_sha": "08108058ea36a63f141c25c4e75f9f872a5b2296", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "diamond/blastp": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/diamond/blastp/diamond-blastp.diff" }, "diamond/blastx": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/diamond/blastx/diamond-blastx.diff" }, "fastawindows": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/fastawindows/fastawindows.diff" }, "gunzip": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/align": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/minimap2/align/minimap2-align.diff" }, "multiqc": { "branch": "master", "git_sha": "f0719ae309075ae4a291533883847c3f7c441dad", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "pigz/compress": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/index": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/view": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/view/samtools-view.diff" }, "seqtk/subseq": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/seqtk/subseq/seqtk-subseq.diff" }, "untar": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "windowmasker/mkcounts": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "windowmasker/ustat": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] } } }, @@ -139,26 +105,20 @@ "utils_nextflow_pipeline": { "branch": "master", "git_sha": "c2b22d85f30a706a3073387f30380704fcae013b", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "51ae5406a030d4da1e49e4dab49756844fdd6c7a", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} From cc150bd9bccc370b7275c1caf1784be985ca4944 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Mon, 22 Sep 2025 12:22:33 +0100 Subject: [PATCH 7/8] Darn spelling mistakes! --- modules/nf-core/diamond/blastp/diamond-blastp.diff | 2 +- modules/nf-core/diamond/blastp/main.nf | 2 +- modules/nf-core/diamond/blastx/diamond-blastx.diff | 2 +- modules/nf-core/diamond/blastx/main.nf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/diamond/blastp/diamond-blastp.diff b/modules/nf-core/diamond/blastp/diamond-blastp.diff index cf18a7dd..7d0916da 100644 --- a/modules/nf-core/diamond/blastp/diamond-blastp.diff +++ b/modules/nf-core/diamond/blastp/diamond-blastp.diff @@ -24,7 +24,7 @@ Changes in 'diamond/blastp/main.nf': gzip -c -d ${fasta} > ${fasta_name} fi -+ mkdir -p ./blastp_temp ++ mkdir -p ./blastp_tmp + DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` diff --git a/modules/nf-core/diamond/blastp/main.nf b/modules/nf-core/diamond/blastp/main.nf index 64550215..4d453763 100644 --- a/modules/nf-core/diamond/blastp/main.nf +++ b/modules/nf-core/diamond/blastp/main.nf @@ -53,7 +53,7 @@ process DIAMOND_BLASTP { gzip -c -d ${fasta} > ${fasta_name} fi - mkdir -p ./blastp_temp + mkdir -p ./blastp_tmp DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` diff --git a/modules/nf-core/diamond/blastx/diamond-blastx.diff b/modules/nf-core/diamond/blastx/diamond-blastx.diff index 650be74a..5219a26f 100644 --- a/modules/nf-core/diamond/blastx/diamond-blastx.diff +++ b/modules/nf-core/diamond/blastx/diamond-blastx.diff @@ -24,7 +24,7 @@ Changes in 'diamond/blastx/main.nf': gzip -c -d ${fasta} > ${fasta_name} fi -+ mkdir -p ./blastx_temp ++ mkdir -p ./blastx_tmp + DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` diff --git a/modules/nf-core/diamond/blastx/main.nf b/modules/nf-core/diamond/blastx/main.nf index 3093c673..d45c5d5d 100644 --- a/modules/nf-core/diamond/blastx/main.nf +++ b/modules/nf-core/diamond/blastx/main.nf @@ -54,7 +54,7 @@ process DIAMOND_BLASTX { gzip -c -d ${fasta} > ${fasta_name} fi - mkdir -p ./blastx_temp + mkdir -p ./blastx_tmp DB=`find -L ./ -name "*.dmnd" | sed 's/\\.dmnd\$//'` From a468982f627e97cac1c4708163a2cd6850040e97 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Mon, 22 Sep 2025 12:43:40 +0100 Subject: [PATCH 8/8] Darn spelling mistakes! --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index af65237f..a28287c3 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -109,7 +109,7 @@ process { } withName: "DIAMOND_BLASTX" { - ext.args = { "--evalue 1.0e-25 --max-target-seqs 10 --max-hsps 1" + ( params.use_work_dir_as_temp ? " --tmpdir ./blastp_tmp/" : "" ) } + ext.args = { "--evalue 1.0e-25 --max-target-seqs 10 --max-hsps 1" + ( params.use_work_dir_as_temp ? " --tmpdir ./blastx_tmp/" : "" ) } } withName: "BLOBTK_DEPTH" {