diff --git a/CHANGELOG.md b/CHANGELOG.md index 51a41809..3587c7f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ - 🐛 fix sample/replicate merge [#401](https://github.com/nf-core/methylseq/pull/401) - 🐛 fix fasta reference usage [#403](https://github.com/nf-core/methylseq/pull/403) +### Pipeline Updates + +- 🔧 Updated nf-core modules for preseq [#390](https://github.com/nf-core/methylseq/pull/390) + ## [v2.6.0](https://github.com/nf-core/methylseq/releases/tag/2.6.0) - 2024-01-05 ### Bug fixes & refactoring diff --git a/conf/test.config b/conf/test.config index 84e011a9..cf5b5e6c 100644 --- a/conf/test.config +++ b/conf/test.config @@ -26,3 +26,9 @@ params { } includeConfig './test_data.config' + +process { + withName: PRESEQ_LCEXTRAP { + errorStrategy = 'ignore' + } +} diff --git a/modules.json b/modules.json index 3f0b1159..3d5e0b18 100644 --- a/modules.json +++ b/modules.json @@ -82,7 +82,7 @@ }, "preseq/lcextrap": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "4d178c536f91d022a3bff078bb84037e866c7da4", "installed_by": ["modules"] }, "qualimap/bamqc": { diff --git a/modules/nf-core/preseq/lcextrap/environment.yml b/modules/nf-core/preseq/lcextrap/environment.yml new file mode 100644 index 00000000..57b8b9c6 --- /dev/null +++ b/modules/nf-core/preseq/lcextrap/environment.yml @@ -0,0 +1,7 @@ +name: preseq_lcextrap +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::preseq=3.1.2 diff --git a/modules/nf-core/preseq/lcextrap/main.nf b/modules/nf-core/preseq/lcextrap/main.nf index 12546f0a..0f8a1e9e 100644 --- a/modules/nf-core/preseq/lcextrap/main.nf +++ b/modules/nf-core/preseq/lcextrap/main.nf @@ -1,9 +1,9 @@ process PRESEQ_LCEXTRAP { tag "$meta.id" label 'process_single' - label 'error_ignore' + label 'error_retry' - conda "bioconda::preseq=3.1.2" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h445547b_2': 'biocontainers/preseq:3.1.2--h445547b_2' }" @@ -21,6 +21,7 @@ process PRESEQ_LCEXTRAP { script: def args = task.ext.args ?: '' + args = task.attempt > 1 ? args.join(' -defects') : args // Disable testing for defects def prefix = task.ext.prefix ?: "${meta.id}" def paired_end = meta.single_end ? '' : '-pe' """ diff --git a/modules/nf-core/preseq/lcextrap/meta.yml b/modules/nf-core/preseq/lcextrap/meta.yml old mode 100755 new mode 100644 index 1391961c..c00fa8ee --- a/modules/nf-core/preseq/lcextrap/meta.yml +++ b/modules/nf-core/preseq/lcextrap/meta.yml @@ -10,9 +10,7 @@ tools: homepage: http://smithlabresearch.org/software/preseq/ documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf tool_dev_url: https://github.com/smithlabcode/preseq - licence: ["GPL"] - input: - meta: type: map @@ -23,7 +21,6 @@ input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" - output: - meta: type: map @@ -42,7 +39,9 @@ output: type: file description: Log file containing stderr produced by Preseq pattern: "*.{log}" - authors: - "@drpatelh" - - "@Emiller88" + - "@edmundmiller" +maintainers: + - "@drpatelh" + - "@edmundmiller" diff --git a/modules/nf-core/preseq/lcextrap/tests/main.nf.test b/modules/nf-core/preseq/lcextrap/tests/main.nf.test new file mode 100644 index 00000000..aa12bc1a --- /dev/null +++ b/modules/nf-core/preseq/lcextrap/tests/main.nf.test @@ -0,0 +1,54 @@ +nextflow_process { + + name "Test Process PRESEQ_LCEXTRAP" + script "../main.nf" + process "PRESEQ_LCEXTRAP" + tag "modules" + tag "modules_nfcore" + tag "preseq" + tag "preseq/lcextrap" + + test("sarscov2 - single_end") { + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'delete_me/preseq/SRR1003759_5M_subset.mr', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.log[0][1]).name).match("single_end - log") }, + { assert snapshot(process.out.lc_extrap).match("single_end - lc_extrap") }, + { assert snapshot(process.out.versions).match("single_end - versions") } + ) + } + } + + test("sarscov2 - paired_end") { + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'delete_me/preseq/SRR1003759_5M_subset.mr', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.log[0][1]).name).match("paired_end - log") }, + { assert snapshot(process.out.lc_extrap).match("paired_end - lc_extrap") }, + { assert snapshot(process.out.versions).match("paired_end - versions") } + ) + } + } +} \ No newline at end of file diff --git a/modules/nf-core/preseq/lcextrap/tests/main.nf.test.snap b/modules/nf-core/preseq/lcextrap/tests/main.nf.test.snap new file mode 100644 index 00000000..c59dea7f --- /dev/null +++ b/modules/nf-core/preseq/lcextrap/tests/main.nf.test.snap @@ -0,0 +1,58 @@ +{ + "single_end - lc_extrap": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.lc_extrap.txt:md5,1fa5cdd601079329618f61660bee00de" + ] + ] + ], + "timestamp": "2023-11-23T17:20:40.735535" + }, + "paired_end - log": { + "content": [ + "test.command.log" + ], + "timestamp": "2023-11-23T17:20:51.981746" + }, + "single_end - versions": { + "content": [ + [ + "versions.yml:md5,9a62ff1c212c53573808ccd2137b8922" + ] + ], + "timestamp": "2023-11-23T17:20:40.74601" + }, + "paired_end - versions": { + "content": [ + [ + "versions.yml:md5,9a62ff1c212c53573808ccd2137b8922" + ] + ], + "timestamp": "2023-11-23T17:20:52.02843" + }, + "single_end - log": { + "content": [ + "test.command.log" + ], + "timestamp": "2023-11-23T17:20:40.72985" + }, + "paired_end - lc_extrap": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.lc_extrap.txt:md5,10e5ea860e87fb6f5dc10f4f20c62040" + ] + ] + ], + "timestamp": "2023-11-23T17:20:51.998533" + } +} \ No newline at end of file diff --git a/modules/nf-core/preseq/lcextrap/tests/tags.yml b/modules/nf-core/preseq/lcextrap/tests/tags.yml new file mode 100644 index 00000000..b9e25ea7 --- /dev/null +++ b/modules/nf-core/preseq/lcextrap/tests/tags.yml @@ -0,0 +1,2 @@ +preseq/lcextrap: + - modules/nf-core/preseq/lcextrap/** diff --git a/tests/pipeline/bismark_hisat/main.nf.test.snap b/tests/pipeline/bismark_hisat/main.nf.test.snap index 4e5f2e42..15bc0d66 100644 --- a/tests/pipeline/bismark_hisat/main.nf.test.snap +++ b/tests/pipeline/bismark_hisat/main.nf.test.snap @@ -5,9 +5,9 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-26T22:44:25.773445334" + "timestamp": "2024-06-28T15:35:18.303882773" }, "single_end_rrbs_software_versions": { "content": [