Skip to content

Commit a46512f

Browse files
authored
Update basicpy (#9630)
* Update basicpy The latest version of the tool works properly under Singularity and also offers control over the output filenames so we can use the standard ext.prefix or meta.id as the base name. * Update basicpy meta.yml * Round ffp file size in snapshot This is needed to account for normal output variation.
1 parent d5416e7 commit a46512f

File tree

4 files changed

+26
-25
lines changed

4 files changed

+26
-25
lines changed

modules/nf-core/basicpy/main.nf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ process BASICPY {
22
tag "$meta.id"
33
label 'process_single'
44

5-
container "docker.io/labsyspharm/basicpy-docker-mcmicro:1.2.0-patch3"
5+
container "docker.io/labsyspharm/basicpy-docker-mcmicro:1.2.0-patch5"
66

77
input:
88
tuple val(meta), path(image)
99

1010
output:
11-
tuple val(meta), path("*-dfp.tiff"), path("*-ffp.tiff"), emit: profiles
12-
path "versions.yml" , emit: versions
11+
tuple val(meta), path("*-dfp.ome.tif"), path("*-ffp.ome.tif"), emit: profiles
12+
path "versions.yml" , emit: versions
1313

1414
when:
1515
task.ext.when == null || task.ext.when
@@ -20,9 +20,10 @@ process BASICPY {
2020
error "Basicpy module does not support Conda. Please use Docker / Singularity instead."
2121
}
2222
def args = task.ext.args ?: ''
23+
def prefix = task.ext.prefix ?: "${meta.id}"
2324
def VERSION = "1.2.0" // WARN: Version information not provided by tool on CLI. Please update this string when bumping
2425
"""
25-
/opt/main.py -i $image -o . $args
26+
/opt/main.py -i $image -o . --output-flatfield $prefix --output-darkfield $prefix $args
2627
2728
cat <<-END_VERSIONS > versions.yml
2829
"${task.process}":
@@ -38,8 +39,8 @@ process BASICPY {
3839
def prefix = task.ext.prefix ?: "${meta.id}"
3940
def VERSION = "1.2.0" // WARN: Version information not provided by tool on CLI. Please update this string when bumping
4041
"""
41-
touch ${prefix}.-dfp.tiff
42-
touch ${prefix}.-ffp.tiff
42+
touch ${prefix}-dfp.ome.tif
43+
touch ${prefix}-ffp.ome.tif
4344
4445
cat <<-END_VERSIONS > versions.yml
4546
"${task.process}":

modules/nf-core/basicpy/meta.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ input:
2626
e.g. [ id:'test' ]
2727
- image:
2828
type: file
29-
description: Tiff file to be used for dark and flat field illumination correction
30-
pattern: "*.{tiff,tif}"
29+
description: BioFormats-compatible image file to be used for dark and flat field illumination correction
30+
pattern: "*.{ome.tiff,ome.tif,rcpnl,btf,nd2,tiff,tif,czi}"
3131
ontologies: []
3232
output:
3333
profiles:
@@ -36,15 +36,15 @@ output:
3636
description: |
3737
Groovy Map containing sample information
3838
e.g. [ id:'test' ]
39-
- "*-dfp.tiff":
39+
- "*-dfp.ome.tif":
4040
type: file
41-
description: Tiff fields for dark field illumination correction
42-
pattern: "*.{tiff}"
41+
description: OME-TIFF fields for dark field illumination correction
42+
pattern: "*.{ome.tif}"
4343
ontologies: []
44-
- "*-ffp.tiff":
44+
- "*-ffp.ome.tif":
4545
type: file
46-
description: Tiff fields for flat field illumination correction
47-
pattern: "*.{tiff}"
46+
description: OME-TIFF fields for flat field illumination correction
47+
pattern: "*.{ome.tif}"
4848
ontologies: []
4949
versions:
5050
- versions.yml:

modules/nf-core/basicpy/tests/main.nf.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ nextflow_process {
2929
file(process.out.profiles.get(0).get(1)).exists(),
3030
file(process.out.profiles.get(0).get(2)).exists(),
3131
file(process.out.profiles.get(0).get(1)).size(),
32-
file(process.out.profiles.get(0).get(2)).size()
32+
Math.round(file(process.out.profiles.get(0).get(2)).size() / 1000) * 1000
3333
).match()
3434
},
3535
)

modules/nf-core/basicpy/tests/main.nf.test.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
],
77
true,
88
true,
9-
633904,
10-
633904
9+
2684,
10+
352000
1111
],
1212
"meta": {
1313
"nf-test": "0.9.2",
14-
"nextflow": "25.04.7"
14+
"nextflow": "25.10.0"
1515
},
16-
"timestamp": "2025-09-25T17:40:59.731127948"
16+
"timestamp": "2026-01-08T11:57:42.610834295"
1717
},
1818
"basicpy - OME-TIFF - stub": {
1919
"content": [
@@ -23,8 +23,8 @@
2323
{
2424
"id": "test"
2525
},
26-
"test.-dfp.tiff:md5,d41d8cd98f00b204e9800998ecf8427e",
27-
"test.-ffp.tiff:md5,d41d8cd98f00b204e9800998ecf8427e"
26+
"test-dfp.ome.tif:md5,d41d8cd98f00b204e9800998ecf8427e",
27+
"test-ffp.ome.tif:md5,d41d8cd98f00b204e9800998ecf8427e"
2828
]
2929
],
3030
"1": [
@@ -35,8 +35,8 @@
3535
{
3636
"id": "test"
3737
},
38-
"test.-dfp.tiff:md5,d41d8cd98f00b204e9800998ecf8427e",
39-
"test.-ffp.tiff:md5,d41d8cd98f00b204e9800998ecf8427e"
38+
"test-dfp.ome.tif:md5,d41d8cd98f00b204e9800998ecf8427e",
39+
"test-ffp.ome.tif:md5,d41d8cd98f00b204e9800998ecf8427e"
4040
]
4141
],
4242
"versions": [
@@ -46,8 +46,8 @@
4646
],
4747
"meta": {
4848
"nf-test": "0.9.2",
49-
"nextflow": "25.04.7"
49+
"nextflow": "25.10.0"
5050
},
51-
"timestamp": "2025-09-25T17:41:02.991040243"
51+
"timestamp": "2026-01-08T10:42:02.992888504"
5252
}
5353
}

0 commit comments

Comments
 (0)