Skip to content
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

Change sed regex for version reporting in pigz modules #6878

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions modules/nf-core/pigz/compress/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ process PIGZ_COMPRESS {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pigz:\$(echo \$(pigz --version 2>&1) | sed 's/^.*pigz\\w*//' )
pigz: \$(echo \$(pigz --version 2>&1) | sed 's/^.*pigz[[:space:]]*//' )
END_VERSIONS
"""

Expand All @@ -39,7 +39,7 @@ process PIGZ_COMPRESS {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pigz:\$(echo \$(pigz --version 2>&1) | sed 's/^.*pigz\\w*//' )
pigz: \$(echo \$(pigz --version 2>&1) | sed 's/^.*pigz[[:space:]]*//' )
END_VERSIONS
"""
}
6 changes: 3 additions & 3 deletions modules/nf-core/pigz/uncompress/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ process PIGZ_UNCOMPRESS {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pigz: \$(echo \$(pigz --version 2>&1) | sed 's/^.*pigz\\w*//' ))
pigz: \$(echo \$(pigz --version 2>&1) | sed 's/^.*pigz[[:space:]]*//' )
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
uncompressed_filename = zip.toString() - '.gz'
"""
touch ${zip.dropRight(3)}
touch $uncompressed_filename

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pigz: \$(echo \$(pigz --version 2>&1) | sed 's/^.*pigz\w*//' ))
pigz: \$(echo \$(pigz --version 2>&1) | sed 's/^.*pigz[[:space:]]*//' )
END_VERSIONS
"""
}
25 changes: 25 additions & 0 deletions modules/nf-core/pigz/uncompress/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,30 @@ nextflow_process {
}

}

test("Should run without failures - stub") {

options "-stub"

when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ [ id:'test'],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

}
43 changes: 38 additions & 5 deletions modules/nf-core/pigz/uncompress/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
{
"Should run without failures - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,e0c776f8d0bfa6d8e49e02aeb0728355"
],
"file": [
[
{
"id": "test"
},
"test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,e0c776f8d0bfa6d8e49e02aeb0728355"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-30T14:42:44.906844906"
},
"Should run without failures": {
"content": [
{
Expand All @@ -11,7 +44,7 @@
]
],
"1": [
"versions.yml:md5,a2d5ce72baa8b303f25afb9cf094f683"
"versions.yml:md5,e0c776f8d0bfa6d8e49e02aeb0728355"
],
"file": [
[
Expand All @@ -22,14 +55,14 @@
]
],
"versions": [
"versions.yml:md5,a2d5ce72baa8b303f25afb9cf094f683"
"versions.yml:md5,e0c776f8d0bfa6d8e49e02aeb0728355"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.03.0"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-05-15T16:43:21.55056643"
"timestamp": "2024-10-30T10:58:22.006893497"
}
}
9 changes: 9 additions & 0 deletions modules/nf-core/tcoffee/irmsd/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,20 @@ input:
description: |
Groovy Map containing sample information
e.g. [ id:'test', ... ]
- msa:
type: file
description: File containing the multiple sequence alignment
- - meta2:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- template:
type: file
description: File containing the template structure
- structures:
type: file
description: File containing the structures
output:
- irmsd:
- meta:
Expand Down
Loading