From 82e39652cd74455bf4c928ad17e3679f127eeb13 Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Tue, 28 Oct 2025 15:03:39 +0100 Subject: [PATCH 01/10] Add new module priorcons/buildpriors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This module builds empirical priors from alignment data for the priorcons tool. Key features: - Takes alignment file (.aln) and reference sequence ID as inputs - Outputs priors in Parquet format - Supports configurable window size and overlap via task.ext.args - Follows nf-core conventions: only input/output files as CLI params 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../priorcons/buildpriors/environment.yml | 10 +++ modules/nf-core/priorcons/buildpriors/main.nf | 66 +++++++++++++++++ .../nf-core/priorcons/buildpriors/meta.yml | 55 ++++++++++++++ .../priorcons/buildpriors/tests/TODO.md | 49 ++++++++++++ .../priorcons/buildpriors/tests/main.nf.test | 74 +++++++++++++++++++ 5 files changed, 254 insertions(+) create mode 100644 modules/nf-core/priorcons/buildpriors/environment.yml create mode 100644 modules/nf-core/priorcons/buildpriors/main.nf create mode 100644 modules/nf-core/priorcons/buildpriors/meta.yml create mode 100644 modules/nf-core/priorcons/buildpriors/tests/TODO.md create mode 100644 modules/nf-core/priorcons/buildpriors/tests/main.nf.test diff --git a/modules/nf-core/priorcons/buildpriors/environment.yml b/modules/nf-core/priorcons/buildpriors/environment.yml new file mode 100644 index 00000000000..621f3b40c67 --- /dev/null +++ b/modules/nf-core/priorcons/buildpriors/environment.yml @@ -0,0 +1,10 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + # TODO nf-core: List required Conda package(s). + # Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). + # For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. + - "bioconda::priorcons=0.1.0" diff --git a/modules/nf-core/priorcons/buildpriors/main.nf b/modules/nf-core/priorcons/buildpriors/main.nf new file mode 100644 index 00000000000..6196320020a --- /dev/null +++ b/modules/nf-core/priorcons/buildpriors/main.nf @@ -0,0 +1,66 @@ +// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :) +// https://github.com/nf-core/modules/tree/master/modules/nf-core/ +// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace: +// https://nf-co.re/join +// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. +// All other parameters MUST be provided using the "task.ext" directive, see here: +// https://www.nextflow.io/docs/latest/process.html#ext +// where "task.ext" is a string. +// Any parameters that need to be evaluated in the context of a particular sample +// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. +// TODO nf-core: Software that can be piped together SHOULD be added to separate module files +// unless there is a run-time, storage advantage in implementing in this way +// e.g. it's ok to have a single module for bwa to output BAM instead of SAM: +// bwa mem | samtools view -B -T ref.fasta +// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty +// list (`[]`) instead of a file can be used to work around this issue. + +process PRIORCONS_BUILDPRIORS { + tag "$meta.id" + label 'process_low' + + // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. + conda "${moduleDir}/environment.yml" + // container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + // 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': + // 'biocontainers/YOUR-TOOL-HERE' }" + + input: + tuple val(meta), path(alignment) // Input alignment FASTA file + val ref_id // Reference sequence ID + + output: + tuple val(meta), path("*.parquet"), emit: priors + 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}" + """ + priorcons \\ + buildpriors \\ + --input ${alignment} \\ + --ref ${ref_id} \\ + --output ${prefix}.parquet \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + priorcons: \$(priorcons --version 2>&1 | head -n1 | sed 's/.*version //; s/ .*//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.parquet + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + priorcons: \$(priorcons --version 2>&1 | head -n1 | sed 's/.*version //; s/ .*//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/priorcons/buildpriors/meta.yml b/modules/nf-core/priorcons/buildpriors/meta.yml new file mode 100644 index 00000000000..2b2bba42047 --- /dev/null +++ b/modules/nf-core/priorcons/buildpriors/meta.yml @@ -0,0 +1,55 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "priorcons_buildpriors" +description: Build empirical priors from alignment data for consensus sequence generation +keywords: + - alignment + - priors + - consensus + - genomics +tools: + - "priorcons": + description: "Tool for integrating consensus sequences using prior information." + homepage: "https://github.com/zhliUU/PriorCons" + documentation: "https://github.com/zhliUU/PriorCons" + tool_dev_url: "https://github.com/zhliUU/PriorCons" + licence: ["MIT"] + +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - alignment: + type: file + description: Multiple sequence alignment file + pattern: "*.aln" + ontologies: + - edam: "http://edamontology.org/format_1984" # Plain text alignment format + - - ref_id: + type: string + description: Reference sequence ID within the alignment file + +output: + priors: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - "*.parquet": + type: file + description: Empirical priors data in Parquet format + pattern: "*.parquet" + versions: + - "versions.yml": + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: "http://edamontology.org/format_3750" # YAML + +authors: + - "@zhliUU" +maintainers: + - "@zhliUU" diff --git a/modules/nf-core/priorcons/buildpriors/tests/TODO.md b/modules/nf-core/priorcons/buildpriors/tests/TODO.md new file mode 100644 index 00000000000..ef6b7d203f1 --- /dev/null +++ b/modules/nf-core/priorcons/buildpriors/tests/TODO.md @@ -0,0 +1,49 @@ +# TODO: Update test file + +## Tasks to complete for `main.nf.test` + +1. **Update test inputs** to match the module's actual inputs: + - `input[0]`: tuple with meta and alignment FASTA file + - `input[1]`: reference sequence ID (string) + - Currently uses BAM file - need to change to FASTA alignment + +2. **Update test data paths**: + - Find appropriate test alignment FASTA in `params.modules_testdata_base_path` + - Or add new test data if alignment FASTA doesn't exist + +3. **Update test names**: + - Change from "sarscov2 - bam" to something like "sarscov2 - fasta alignment" + - Keep the pattern: `test_name`, `test_name - stub` + +4. **Optional: Add ext.args example**: + + ```groovy + when { + process { + """ + input[0] = [ + [ id:'test' ], + file('path/to/alignment.fasta') + ] + input[1] = 'MN908947.3' // reference ID + + // Optional: demonstrate custom parameters + ext.args = '--win 50 --overlap 25' + """ + } + } + ``` + +5. **Update output assertions**: + - Verify output is `.parquet` file (not `.bam`) + - Update snapshot expectations + +6. **Run tests** after updates: + ```bash + nf-core modules test priorcons/buildpriors + ``` + +## Reference + +- nf-test docs: https://nf-co.re/docs/contributing/modules +- Chained modules: https://nf-co.re/docs/contributing/modules#steps-for-creating-nf-test-for-chained-modules diff --git a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test new file mode 100644 index 00000000000..13312302a0c --- /dev/null +++ b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test @@ -0,0 +1,74 @@ +// TODO nf-core: Once you have added the required tests, please run the following command to build this file: +// nf-core modules test priorcons/buildpriors +nextflow_process { + + name "Test Process PRIORCONS_BUILDPRIORS" + script "../main.nf" + process "PRIORCONS_BUILDPRIORS" + + tag "modules" + tag "modules_nfcore" + tag "priorcons" + tag "priorcons/buildpriors" + + // TODO nf-core: Change the test name preferably indicating the test-data and file-format used + test("sarscov2 - bam") { + + // TODO nf-core: If you are created a test for a chained module + // (the module requires running more than one process to generate the required output) + // add the 'setup' method here. + // You can find more information about how to use a 'setup' method in the docs (https://nf-co.re/docs/contributing/modules#steps-for-creating-nf-test-for-chained-modules). + + when { + process { + """ + // TODO nf-core: define inputs of the process here. Example: + + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + //TODO nf-core: Add all required assertions to verify the test output. + // See https://nf-co.re/docs/contributing/tutorials/nf-test_assertions for more information and examples. + ) + } + + } + + // TODO nf-core: Change the test name preferably indicating the test-data and file-format used but keep the " - stub" suffix. + test("sarscov2 - bam - stub") { + + options "-stub" + + when { + process { + """ + // TODO nf-core: define inputs of the process here. Example: + + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + //TODO nf-core: Add all required assertions to verify the test output. + ) + } + + } + +} From 6c07e8bc813374629540ac996b3c8008ad0e1156 Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Tue, 28 Oct 2025 15:47:38 +0100 Subject: [PATCH 02/10] Configure tests for priorcons/buildpriors module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add nf-test configuration with RSV test data from GitHub - Generate test snapshots with MD5 validation for output verification - Fix command syntax from buildpriors to build-priors - Remove unnecessary nextflow.config from tests folder - Tests validate both regular execution and stub mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/nf-core/priorcons/buildpriors/main.nf | 2 +- .../priorcons/buildpriors/tests/main.nf.test | 46 +++++++++---------- .../buildpriors/tests/main.nf.test.snap | 42 +++++++++++++++++ 3 files changed, 65 insertions(+), 25 deletions(-) create mode 100644 modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap diff --git a/modules/nf-core/priorcons/buildpriors/main.nf b/modules/nf-core/priorcons/buildpriors/main.nf index 6196320020a..1d7a1cdb55b 100644 --- a/modules/nf-core/priorcons/buildpriors/main.nf +++ b/modules/nf-core/priorcons/buildpriors/main.nf @@ -41,7 +41,7 @@ process PRIORCONS_BUILDPRIORS { def prefix = task.ext.prefix ?: "${meta.id}" """ priorcons \\ - buildpriors \\ + build-priors \\ --input ${alignment} \\ --ref ${ref_id} \\ --output ${prefix}.parquet \\ diff --git a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test index 13312302a0c..01e62681658 100644 --- a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test +++ b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test @@ -1,5 +1,3 @@ -// TODO nf-core: Once you have added the required tests, please run the following command to build this file: -// nf-core modules test priorcons/buildpriors nextflow_process { name "Test Process PRIORCONS_BUILDPRIORS" @@ -11,23 +9,19 @@ nextflow_process { tag "priorcons" tag "priorcons/buildpriors" - // TODO nf-core: Change the test name preferably indicating the test-data and file-format used - test("sarscov2 - bam") { - - // TODO nf-core: If you are created a test for a chained module - // (the module requires running more than one process to generate the required output) - // add the 'setup' method here. - // You can find more information about how to use a 'setup' method in the docs (https://nf-co.re/docs/contributing/modules#steps-for-creating-nf-test-for-chained-modules). + test("rsv - fasta alignment") { when { + params { + outdir = "$outputDir" + } process { """ - // TODO nf-core: define inputs of the process here. Example: - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + [ id:'rsv_test' ], + file('https://raw.githubusercontent.com/GERMAN00VP/PriorCons/b518f3725b2cc8820222ea52024a0a63f9e6dfe1/rsv_files/build_priors_testfiles/build_priors_test.aln', checkIfExists: true) ] + input[1] = 'RSV_BD' """ } } @@ -35,28 +29,30 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } - //TODO nf-core: Add all required assertions to verify the test output. - // See https://nf-co.re/docs/contributing/tutorials/nf-test_assertions for more information and examples. + { assert snapshot( + process.out.versions, + process.out.priors + ).match() } ) } } - // TODO nf-core: Change the test name preferably indicating the test-data and file-format used but keep the " - stub" suffix. - test("sarscov2 - bam - stub") { + test("rsv - fasta alignment - stub") { options "-stub" when { + params { + outdir = "$outputDir" + } process { """ - // TODO nf-core: define inputs of the process here. Example: - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + [ id:'rsv_test' ], + file('https://raw.githubusercontent.com/GERMAN00VP/PriorCons/b518f3725b2cc8820222ea52024a0a63f9e6dfe1/rsv_files/build_priors_testfiles/build_priors_test.aln', checkIfExists: true) ] + input[1] = 'RSV_BD' """ } } @@ -64,8 +60,10 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } - //TODO nf-core: Add all required assertions to verify the test output. + { assert snapshot( + process.out.versions, + process.out.priors + ).match() } ) } diff --git a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap new file mode 100644 index 00000000000..41bd2071637 --- /dev/null +++ b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap @@ -0,0 +1,42 @@ +{ + "rsv - fasta alignment - stub": { + "content": [ + [ + "versions.yml:md5,03b3066a4d1c42e5580f5549dfd06411" + ], + [ + [ + { + "id": "rsv_test" + }, + "rsv_test.parquet:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-10-28T15:36:40.546166" + }, + "rsv - fasta alignment": { + "content": [ + [ + "versions.yml:md5,03b3066a4d1c42e5580f5549dfd06411" + ], + [ + [ + { + "id": "rsv_test" + }, + "rsv_test.parquet:md5,c10fe51463dd23c5aa34fb39ccac9586" + ] + ] + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-10-28T15:35:13.873611" + } +} \ No newline at end of file From c2ef6d2a654a54e0e2d4d2ada15989f8a368498b Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Tue, 28 Oct 2025 16:34:06 +0100 Subject: [PATCH 03/10] Update test names to build_priors_testfiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename tests from "rsv - fasta alignment" to "build_priors_testfiles" - Update snapshots with new test names - Remove obsolete snapshot entries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/nf-core/priorcons/buildpriors/tests/main.nf.test | 4 ++-- .../nf-core/priorcons/buildpriors/tests/main.nf.test.snap | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test index 01e62681658..ce42b362fa3 100644 --- a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test +++ b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test @@ -9,7 +9,7 @@ nextflow_process { tag "priorcons" tag "priorcons/buildpriors" - test("rsv - fasta alignment") { + test("build_priors_testfiles") { when { params { @@ -38,7 +38,7 @@ nextflow_process { } - test("rsv - fasta alignment - stub") { + test("build_priors_testfiles - stub") { options "-stub" diff --git a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap index 41bd2071637..7f653ebb710 100644 --- a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap +++ b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "rsv - fasta alignment - stub": { + "build_priors_testfiles - stub": { "content": [ [ "versions.yml:md5,03b3066a4d1c42e5580f5549dfd06411" @@ -17,9 +17,9 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-10-28T15:36:40.546166" + "timestamp": "2025-10-28T16:32:02.921905" }, - "rsv - fasta alignment": { + "build_priors_testfiles": { "content": [ [ "versions.yml:md5,03b3066a4d1c42e5580f5549dfd06411" @@ -37,6 +37,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-10-28T15:35:13.873611" + "timestamp": "2025-10-28T16:30:54.436853" } } \ No newline at end of file From 5e3769822e6b33f40c22199af542104b326cfcee Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Wed, 29 Oct 2025 10:46:06 +0100 Subject: [PATCH 04/10] clean up TODO --- modules/nf-core/priorcons/buildpriors/main.nf | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/modules/nf-core/priorcons/buildpriors/main.nf b/modules/nf-core/priorcons/buildpriors/main.nf index 1d7a1cdb55b..15539376270 100644 --- a/modules/nf-core/priorcons/buildpriors/main.nf +++ b/modules/nf-core/priorcons/buildpriors/main.nf @@ -1,25 +1,9 @@ -// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :) -// https://github.com/nf-core/modules/tree/master/modules/nf-core/ -// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace: -// https://nf-co.re/join -// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. -// All other parameters MUST be provided using the "task.ext" directive, see here: -// https://www.nextflow.io/docs/latest/process.html#ext -// where "task.ext" is a string. -// Any parameters that need to be evaluated in the context of a particular sample -// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. -// TODO nf-core: Software that can be piped together SHOULD be added to separate module files -// unless there is a run-time, storage advantage in implementing in this way -// e.g. it's ok to have a single module for bwa to output BAM instead of SAM: -// bwa mem | samtools view -B -T ref.fasta -// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty -// list (`[]`) instead of a file can be used to work around this issue. - process PRIORCONS_BUILDPRIORS { tag "$meta.id" label 'process_low' // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. + // TODO pending the container and singularity image being available with priorcons installed. conda "${moduleDir}/environment.yml" // container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? // 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': From d0bb3aeb72f95992b4f2bbed4fe8903be36173f5 Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Wed, 29 Oct 2025 10:46:58 +0100 Subject: [PATCH 05/10] remove TODO --- .../priorcons/buildpriors/tests/TODO.md | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100644 modules/nf-core/priorcons/buildpriors/tests/TODO.md diff --git a/modules/nf-core/priorcons/buildpriors/tests/TODO.md b/modules/nf-core/priorcons/buildpriors/tests/TODO.md deleted file mode 100644 index ef6b7d203f1..00000000000 --- a/modules/nf-core/priorcons/buildpriors/tests/TODO.md +++ /dev/null @@ -1,49 +0,0 @@ -# TODO: Update test file - -## Tasks to complete for `main.nf.test` - -1. **Update test inputs** to match the module's actual inputs: - - `input[0]`: tuple with meta and alignment FASTA file - - `input[1]`: reference sequence ID (string) - - Currently uses BAM file - need to change to FASTA alignment - -2. **Update test data paths**: - - Find appropriate test alignment FASTA in `params.modules_testdata_base_path` - - Or add new test data if alignment FASTA doesn't exist - -3. **Update test names**: - - Change from "sarscov2 - bam" to something like "sarscov2 - fasta alignment" - - Keep the pattern: `test_name`, `test_name - stub` - -4. **Optional: Add ext.args example**: - - ```groovy - when { - process { - """ - input[0] = [ - [ id:'test' ], - file('path/to/alignment.fasta') - ] - input[1] = 'MN908947.3' // reference ID - - // Optional: demonstrate custom parameters - ext.args = '--win 50 --overlap 25' - """ - } - } - ``` - -5. **Update output assertions**: - - Verify output is `.parquet` file (not `.bam`) - - Update snapshot expectations - -6. **Run tests** after updates: - ```bash - nf-core modules test priorcons/buildpriors - ``` - -## Reference - -- nf-test docs: https://nf-co.re/docs/contributing/modules -- Chained modules: https://nf-co.re/docs/contributing/modules#steps-for-creating-nf-test-for-chained-modules From eab8532a6d0286519d09c415cc78f596cf2a04d2 Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Wed, 29 Oct 2025 11:00:53 +0100 Subject: [PATCH 06/10] fix version --- modules/nf-core/priorcons/buildpriors/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/priorcons/buildpriors/main.nf b/modules/nf-core/priorcons/buildpriors/main.nf index 15539376270..f6c2bbc1158 100644 --- a/modules/nf-core/priorcons/buildpriors/main.nf +++ b/modules/nf-core/priorcons/buildpriors/main.nf @@ -33,7 +33,7 @@ process PRIORCONS_BUILDPRIORS { cat <<-END_VERSIONS > versions.yml "${task.process}": - priorcons: \$(priorcons --version 2>&1 | head -n1 | sed 's/.*version //; s/ .*//') + priorcons: \$(priorcons --version 2>&1 | sed 's/priorcons //') END_VERSIONS """ @@ -44,7 +44,7 @@ process PRIORCONS_BUILDPRIORS { cat <<-END_VERSIONS > versions.yml "${task.process}": - priorcons: \$(priorcons --version 2>&1 | head -n1 | sed 's/.*version //; s/ .*//') + priorcons: \$(priorcons --version 2>&1 | sed 's/priorcons //') END_VERSIONS """ } From 589d76ee8b4eff45c52aa010f1a8864050a6aa59 Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Wed, 29 Oct 2025 12:40:30 +0100 Subject: [PATCH 07/10] updated snap --- .../nf-core/priorcons/buildpriors/tests/main.nf.test.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap index 7f653ebb710..568f4d065d7 100644 --- a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap +++ b/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "build_priors_testfiles - stub": { "content": [ [ - "versions.yml:md5,03b3066a4d1c42e5580f5549dfd06411" + "versions.yml:md5,7555426e5737f1dc9bc4f261c31536e2" ], [ [ @@ -17,12 +17,12 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-10-28T16:32:02.921905" + "timestamp": "2025-10-29T11:47:43.254781" }, "build_priors_testfiles": { "content": [ [ - "versions.yml:md5,03b3066a4d1c42e5580f5549dfd06411" + "versions.yml:md5,7555426e5737f1dc9bc4f261c31536e2" ], [ [ @@ -37,6 +37,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-10-28T16:30:54.436853" + "timestamp": "2025-10-29T11:46:11.035001" } } \ No newline at end of file From a99daa3de90446646b78e0c66acf9a696bc45f80 Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Wed, 29 Oct 2025 14:51:07 +0100 Subject: [PATCH 08/10] fix lint --- modules/nf-core/priorcons/buildpriors/environment.yml | 3 --- modules/nf-core/priorcons/buildpriors/main.nf | 1 - modules/nf-core/priorcons/buildpriors/meta.yml | 11 +++++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/priorcons/buildpriors/environment.yml b/modules/nf-core/priorcons/buildpriors/environment.yml index 621f3b40c67..b803e54b32c 100644 --- a/modules/nf-core/priorcons/buildpriors/environment.yml +++ b/modules/nf-core/priorcons/buildpriors/environment.yml @@ -4,7 +4,4 @@ channels: - conda-forge - bioconda dependencies: - # TODO nf-core: List required Conda package(s). - # Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). - # For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. - "bioconda::priorcons=0.1.0" diff --git a/modules/nf-core/priorcons/buildpriors/main.nf b/modules/nf-core/priorcons/buildpriors/main.nf index f6c2bbc1158..d4f9cabf675 100644 --- a/modules/nf-core/priorcons/buildpriors/main.nf +++ b/modules/nf-core/priorcons/buildpriors/main.nf @@ -2,7 +2,6 @@ process PRIORCONS_BUILDPRIORS { tag "$meta.id" label 'process_low' - // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. // TODO pending the container and singularity image being available with priorcons installed. conda "${moduleDir}/environment.yml" // container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? diff --git a/modules/nf-core/priorcons/buildpriors/meta.yml b/modules/nf-core/priorcons/buildpriors/meta.yml index 2b2bba42047..4405f8c4445 100644 --- a/modules/nf-core/priorcons/buildpriors/meta.yml +++ b/modules/nf-core/priorcons/buildpriors/meta.yml @@ -1,6 +1,7 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "priorcons_buildpriors" -description: Build empirical priors from alignment data for consensus sequence generation +description: Build empirical priors from alignment data for consensus sequence + generation keywords: - alignment - priors @@ -13,6 +14,7 @@ tools: documentation: "https://github.com/zhliUU/PriorCons" tool_dev_url: "https://github.com/zhliUU/PriorCons" licence: ["MIT"] + identifier: "" input: - - meta: @@ -26,9 +28,9 @@ input: pattern: "*.aln" ontologies: - edam: "http://edamontology.org/format_1984" # Plain text alignment format - - - ref_id: - type: string - description: Reference sequence ID within the alignment file + - ref_id: + type: string + description: Reference sequence ID within the alignment file output: priors: @@ -41,6 +43,7 @@ output: type: file description: Empirical priors data in Parquet format pattern: "*.parquet" + ontologies: [] versions: - "versions.yml": type: file From f7157d708f211187a170af46bc4672e69306aa8b Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Wed, 29 Oct 2025 14:56:33 +0100 Subject: [PATCH 09/10] Rename buildpriors to build_priors for consistency --- .../priorcons/{buildpriors => build_priors}/environment.yml | 0 modules/nf-core/priorcons/{buildpriors => build_priors}/main.nf | 0 modules/nf-core/priorcons/{buildpriors => build_priors}/meta.yml | 0 .../priorcons/{buildpriors => build_priors}/tests/main.nf.test | 0 .../{buildpriors => build_priors}/tests/main.nf.test.snap | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename modules/nf-core/priorcons/{buildpriors => build_priors}/environment.yml (100%) rename modules/nf-core/priorcons/{buildpriors => build_priors}/main.nf (100%) rename modules/nf-core/priorcons/{buildpriors => build_priors}/meta.yml (100%) rename modules/nf-core/priorcons/{buildpriors => build_priors}/tests/main.nf.test (100%) rename modules/nf-core/priorcons/{buildpriors => build_priors}/tests/main.nf.test.snap (100%) diff --git a/modules/nf-core/priorcons/buildpriors/environment.yml b/modules/nf-core/priorcons/build_priors/environment.yml similarity index 100% rename from modules/nf-core/priorcons/buildpriors/environment.yml rename to modules/nf-core/priorcons/build_priors/environment.yml diff --git a/modules/nf-core/priorcons/buildpriors/main.nf b/modules/nf-core/priorcons/build_priors/main.nf similarity index 100% rename from modules/nf-core/priorcons/buildpriors/main.nf rename to modules/nf-core/priorcons/build_priors/main.nf diff --git a/modules/nf-core/priorcons/buildpriors/meta.yml b/modules/nf-core/priorcons/build_priors/meta.yml similarity index 100% rename from modules/nf-core/priorcons/buildpriors/meta.yml rename to modules/nf-core/priorcons/build_priors/meta.yml diff --git a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test b/modules/nf-core/priorcons/build_priors/tests/main.nf.test similarity index 100% rename from modules/nf-core/priorcons/buildpriors/tests/main.nf.test rename to modules/nf-core/priorcons/build_priors/tests/main.nf.test diff --git a/modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap b/modules/nf-core/priorcons/build_priors/tests/main.nf.test.snap similarity index 100% rename from modules/nf-core/priorcons/buildpriors/tests/main.nf.test.snap rename to modules/nf-core/priorcons/build_priors/tests/main.nf.test.snap From 19619c5bd70cfc0f3cfbfc1d110fe2d525880ee2 Mon Sep 17 00:00:00 2001 From: Zhiwei Li Date: Wed, 29 Oct 2025 15:39:46 +0100 Subject: [PATCH 10/10] refresh snap --- .../nf-core/priorcons/build_priors/tests/main.nf.test.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/priorcons/build_priors/tests/main.nf.test.snap b/modules/nf-core/priorcons/build_priors/tests/main.nf.test.snap index 568f4d065d7..d0b51d85a61 100644 --- a/modules/nf-core/priorcons/build_priors/tests/main.nf.test.snap +++ b/modules/nf-core/priorcons/build_priors/tests/main.nf.test.snap @@ -17,7 +17,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-10-29T11:47:43.254781" + "timestamp": "2025-10-29T15:05:15.403088" }, "build_priors_testfiles": { "content": [ @@ -37,6 +37,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-10-29T11:46:11.035001" + "timestamp": "2025-10-29T15:04:13.584116" } } \ No newline at end of file