-
Notifications
You must be signed in to change notification settings - Fork 1k
Add stub block and migrate plasmidid to topic channels #11438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
ffd402f
7245aa6
8d8e533
7d590dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ process PLASMIDID { | |
| tuple val(meta), path("${prefix}/database/") , emit: database | ||
| tuple val(meta), path("${prefix}/fasta_files/") , emit: fasta_files | ||
| tuple val(meta), path("${prefix}/kmer/") , emit: kmer | ||
| path "versions.yml" , emit: versions | ||
| tuple val("${task.process}"), val('plasmidid'), eval('echo "$(plasmidID --version 2>&1)" | sed "s/^plasmidID //"'), topic: versions, emit: versions_plasmidid | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
@@ -37,9 +37,14 @@ process PLASMIDID { | |
| -o . | ||
|
|
||
| mv NO_GROUP/$prefix ./$prefix | ||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| plasmidid: \$(echo \$(plasmidID --version 2>&1)) | ||
| END_VERSIONS | ||
| """ | ||
|
|
||
| stub: | ||
| def args = task.ext.args ?: '' | ||
| prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| mkdir -p ${prefix}/images ${prefix}/logs ${prefix}/data ${prefix}/database ${prefix}/fasta_files ${prefix}/kmer | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add some files in the empty folders that correspond to what is present in the real test ? |
||
| touch ${prefix}/${prefix}_final_results.html | ||
| touch ${prefix}/${prefix}_final_results.tab | ||
| """ | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,7 +10,8 @@ tools: | |||||
| homepage: https://github.com/BU-ISCIII/plasmidID/wiki | ||||||
| documentation: https://github.com/BU-ISCIII/plasmidID#readme | ||||||
| tool_dev_url: https://github.com/BU-ISCIII/plasmidID | ||||||
| licence: ["GPL v3"] | ||||||
| licence: | ||||||
| - "GPL v3" | ||||||
| identifier: biotools:plasmidid | ||||||
| input: | ||||||
| - - meta: | ||||||
|
|
@@ -51,7 +52,7 @@ output: | |||||
| description: Results in a tabular file | ||||||
| pattern: "*.{tab}" | ||||||
| ontologies: | ||||||
| - edam: http://edamontology.org/format_3475 # TSV | ||||||
| - edam: http://edamontology.org/format_3475 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep the comment
Suggested change
|
||||||
| images: | ||||||
| - - meta: | ||||||
| type: map | ||||||
|
|
@@ -112,13 +113,27 @@ output: | |||||
| type: directory | ||||||
| description: Directory containing the kmer files produced by plasmidid | ||||||
| pattern: "database" | ||||||
| versions_plasmidid: | ||||||
| - - ${task.process}: | ||||||
| type: string | ||||||
| description: The name of the process | ||||||
| - plasmidid: | ||||||
| type: string | ||||||
| description: The name of the tool | ||||||
| - echo "$(plasmidID --version 2>&1)" | sed "s/^plasmidID //": | ||||||
| type: eval | ||||||
| description: The expression to obtain the version of the tool | ||||||
| topics: | ||||||
| versions: | ||||||
| - versions.yml: | ||||||
| type: file | ||||||
| description: File containing software versions | ||||||
| pattern: "versions.yml" | ||||||
| ontologies: | ||||||
| - edam: http://edamontology.org/format_3750 # YAML | ||||||
| - - ${task.process}: | ||||||
| type: string | ||||||
| description: The name of the process | ||||||
| - plasmidid: | ||||||
| type: string | ||||||
| description: The name of the tool | ||||||
| - echo "$(plasmidID --version 2>&1)" | sed "s/^plasmidID //": | ||||||
| type: eval | ||||||
| description: The expression to obtain the version of the tool | ||||||
| authors: | ||||||
| - "@joseespinosa" | ||||||
| - "@drpatelh" | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| nextflow_process { | ||
|
|
||
| name "Test Process PLASMIDID" | ||
|
|
@@ -27,18 +26,29 @@ nextflow_process { | |
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot( | ||
| file(process.out.data[0][1]).name, | ||
| file(process.out.database[0][1]).name, | ||
| file(process.out.images[0][1]).name, | ||
| file(process.out.kmer[0][1]).name, | ||
| file(process.out.logs[0][1]).name, | ||
| process.out.fasta_files, | ||
| process.out.html, | ||
| process.out.tab, | ||
| process.out.versions | ||
| ).match() | ||
| } | ||
| { assert snapshot(sanitizeOutput(process.out, unstableKeys:["images", "logs", "data", "database", "kmer"])).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| test("test-plasmidid-stub") { | ||
| options "-stub" | ||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ [ id:'test' ], // meta map | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) | ||
| ] | ||
| input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove the empty new line as well as |
||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(sanitizeOutput(process.out, unstableKeys:["images", "logs", "data", "database", "kmer"])).match() } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the stub test all the files should be stable. |
||
| ) | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,170 @@ | ||
| { | ||
| "test-plasmidid": { | ||
| "content": [ | ||
| "data", | ||
| "database", | ||
| "images", | ||
| "kmer", | ||
| "logs", | ||
| [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| [ | ||
| "MT192765.1_term.fasta:md5,8a8537dd3b21e6905f9367b51c3b3074" | ||
| { | ||
| "data": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "data" | ||
| ] | ||
| ], | ||
| "database": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "database" | ||
| ] | ||
| ], | ||
| "fasta_files": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| [ | ||
| "MT192765.1_term.fasta:md5,8a8537dd3b21e6905f9367b51c3b3074" | ||
| ] | ||
| ] | ||
| ], | ||
| "html": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test_final_results.html:md5,415774b2cff3a50e4304c875cf72529d" | ||
| ] | ||
| ], | ||
| "images": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "images" | ||
| ] | ||
| ], | ||
| "kmer": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "kmer" | ||
| ] | ||
| ], | ||
| "logs": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "logs" | ||
| ] | ||
| ], | ||
| "tab": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test_final_results.tab:md5,e7e6be8e76cac944979bb3dfc21da8bd" | ||
| ] | ||
| ], | ||
| "versions_plasmidid": [ | ||
| [ | ||
| "PLASMIDID", | ||
| "plasmidid", | ||
| "1.6.4" | ||
| ] | ||
| ] | ||
| ], | ||
| [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test_final_results.html:md5,415774b2cff3a50e4304c875cf72529d" | ||
| ] | ||
| ], | ||
| [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test_final_results.tab:md5,e7e6be8e76cac944979bb3dfc21da8bd" | ||
| } | ||
| ], | ||
| "timestamp": "2026-04-30T12:54:16.108858", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "26.04.0" | ||
| } | ||
| }, | ||
| "test-plasmidid-stub": { | ||
| "content": [ | ||
| { | ||
| "data": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "data" | ||
| ] | ||
| ], | ||
| "database": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "database" | ||
| ] | ||
| ], | ||
| "fasta_files": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| [ | ||
|
|
||
| ] | ||
| ] | ||
| ], | ||
| "html": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test_final_results.html:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "images": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "images" | ||
| ] | ||
| ], | ||
| "kmer": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "kmer" | ||
| ] | ||
| ], | ||
| "logs": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "logs" | ||
| ] | ||
| ], | ||
| "tab": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test_final_results.tab:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions_plasmidid": [ | ||
| [ | ||
| "PLASMIDID", | ||
| "plasmidid", | ||
| "1.6.4" | ||
| ] | ||
| ] | ||
| ], | ||
| [ | ||
| "versions.yml:md5,29b9d094c38ac1cf78d12bb079ced8b2" | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-04-30T15:08:17.915883", | ||
| "meta": { | ||
| "nf-test": "0.8.4", | ||
| "nextflow": "24.04.4" | ||
| }, | ||
| "timestamp": "2024-08-29T10:03:30.225921" | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "26.04.0" | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified as