File tree Expand file tree Collapse file tree 5 files changed +226
-0
lines changed
modules/nf-core/raw2ometiff Expand file tree Collapse file tree 5 files changed +226
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3
+ channels :
4
+ - ome
5
+ - conda-forge
6
+ - bioconda
7
+ dependencies :
8
+ - " ome::raw2ometiff=0.7.1"
9
+ - " conda-forge::blosc=1.21.6"
Original file line number Diff line number Diff line change
1
+ process RAW2OMETIFF {
2
+ tag " $meta . id "
3
+ label ' process_high'
4
+
5
+ conda " ${ moduleDir} /environment.yml"
6
+ container " ${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7
+ 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/71/719a355f81f57ee91f5e3a66bb46687b81247eb55d84c2e57dce5d452f54b70a/data' :
8
+ 'community.wave.seqera.io/library/blosc_raw2ometiff:6ae5a6e69f313aa5'} "
9
+
10
+ input:
11
+ tuple val(meta), path(zarr_dir)
12
+
13
+ output:
14
+ tuple val(meta), path(" *.ome.tiff" ), emit: ometiff
15
+ path " versions.yml" , emit: versions
16
+
17
+ when:
18
+ task. ext. when == null || task. ext. when
19
+
20
+ script:
21
+ def args = task. ext. args ?: ' '
22
+ def prefix = task. ext. prefix ?: " ${ meta.id} "
23
+ """
24
+ raw2ometiff \\
25
+ ${ zarr_dir} \\
26
+ ${ prefix} .ome.tiff \\
27
+ --max_workers $task . cpus \\
28
+ $args
29
+
30
+ cat <<-END_VERSIONS > versions.yml
31
+ "${ task.process} ":
32
+ raw2ometiff: \$ (raw2ometiff --version |& sed -n '1s/Version = //p')
33
+ bio-formats: \$ (bioformats2raw --version |& sed -n '2s/Bio-Formats version = //p')
34
+ END_VERSIONS
35
+ """
36
+
37
+ stub:
38
+ def args = task. ext. args ?: ' '
39
+ def prefix = task. ext. prefix ?: " ${ meta.id} "
40
+ """
41
+ touch ${ prefix} .ome.tiff
42
+
43
+ cat <<-END_VERSIONS > versions.yml
44
+ "${ task.process} ":
45
+ raw2ometiff: \$ (raw2ometiff --version |& sed -n '1s/Version = //p')
46
+ bio-formats: \$ (bioformats2raw --version |& sed -n '2s/Bio-Formats version = //p')
47
+ END_VERSIONS
48
+ """
49
+ }
Original file line number Diff line number Diff line change
1
+ ---
2
+ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
3
+ name : " raw2ometiff"
4
+ description : write your description here
5
+ keywords :
6
+ - ome
7
+ - tiff
8
+ - imaging
9
+ tools :
10
+ - " raw2ometiff " :
11
+ description : " Java application to convert a directory of tiles to an OME-TIFF pyramid."
12
+ homepage : " https://github.com/glencoesoftware/raw2ometiff"
13
+ documentation : " https://github.com/glencoesoftware/raw2ometiff"
14
+ tool_dev_url : " https://github.com/glencoesoftware/raw2ometiff"
15
+ licence : ["GPL-2.0"]
16
+
17
+ input :
18
+ - - meta :
19
+ type : map
20
+ description : |
21
+ Groovy Map containing sample information
22
+ e.g. `[ id:'sample1']`
23
+
24
+ - zarr_dir :
25
+ type : directory
26
+ description : Tile directory must contain a full pyramid in a Zarr container.
27
+ pattern : " *.{zarr}"
28
+ ontologies :
29
+ - edam : " http://edamontology.org/format_3915"
30
+
31
+ output :
32
+ - ometiff :
33
+ - meta :
34
+ type : map
35
+ description : |
36
+ Groovy Map containing sample information
37
+ e.g. `[ id:'sample1']`
38
+ - " *.ome.tiff " :
39
+ type : file
40
+ description : OME-TIFF pyramid
41
+ pattern : " *.ome.tiff"
42
+ ontologies :
43
+ - edam : " http://edamontology.org/format_3727"
44
+
45
+ - versions :
46
+ - " versions.yml " :
47
+ type : file
48
+ description : File containing software versions
49
+ pattern : " versions.yml"
50
+
51
+ authors :
52
+ - " @CaroAMN"
53
+ maintainers :
54
+ - " @CaroAMN"
Original file line number Diff line number Diff line change
1
+ nextflow_process {
2
+
3
+ name "Test Process RAW2OMETIFF"
4
+ script "../main.nf"
5
+ process "RAW2OMETIFF"
6
+
7
+ tag "modules"
8
+ tag "modules_nfcore"
9
+ tag "raw2ometiff"
10
+ tag "untar"
11
+
12
+ test("raw2ometiff - zarr") {
13
+ setup {
14
+ run ("UNTAR") {
15
+ script "../../untar/main.nf"
16
+ process {
17
+ """
18
+ input[0] = Channel.fromList([
19
+ tuple([ id:'test'], // meta map
20
+ file(params.modules_testdata_base_path + 'imaging/ome-zarr/zarr.tar', checkIfExists: true))
21
+ ])
22
+ """
23
+ }
24
+ }
25
+ }
26
+
27
+ when {
28
+ process {
29
+ """
30
+ input[0] = UNTAR.out.untar
31
+ """
32
+ }
33
+ }
34
+
35
+ then {
36
+ assertAll(
37
+ { assert process.success },
38
+ { assert snapshot(process.out.versions,
39
+ file(process.out.ometiff[0][1]).name).match() }
40
+ )
41
+ }
42
+ }
43
+
44
+ test("raw2ometiff - zarr - stub") {
45
+
46
+ options "-stub"
47
+
48
+ when {
49
+ process {
50
+ """
51
+ input[0] = Channel.fromList([
52
+ tuple([ id:'test'], // meta map
53
+ file(params.modules_testdata_base_path + 'imaging/ome-zarr/zarr.tar', checkIfExists: true))
54
+ ])
55
+ """
56
+ }
57
+ }
58
+
59
+ then {
60
+ assertAll(
61
+ { assert process.success },
62
+ { assert snapshot(process.out).match() }
63
+ )
64
+ }
65
+ }
66
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ " raw2ometiff - zarr - stub" : {
3
+ " content" : [
4
+ {
5
+ " 0" : [
6
+ [
7
+ {
8
+ " id" : " test"
9
+ },
10
+ " test.ome.tiff:md5,d41d8cd98f00b204e9800998ecf8427e"
11
+ ]
12
+ ],
13
+ " 1" : [
14
+ " versions.yml:md5,5b57fc6984255e5bde25ccdb231f8105"
15
+ ],
16
+ " ometiff" : [
17
+ [
18
+ {
19
+ " id" : " test"
20
+ },
21
+ " test.ome.tiff:md5,d41d8cd98f00b204e9800998ecf8427e"
22
+ ]
23
+ ],
24
+ " versions" : [
25
+ " versions.yml:md5,5b57fc6984255e5bde25ccdb231f8105"
26
+ ]
27
+ }
28
+ ],
29
+ " meta" : {
30
+ " nf-test" : " 0.9.2" ,
31
+ " nextflow" : " 24.10.4"
32
+ },
33
+ " timestamp" : " 2025-06-16T11:18:15.608678597"
34
+ },
35
+ " raw2ometiff - zarr" : {
36
+ " content" : [
37
+ [
38
+ " versions.yml:md5,5b57fc6984255e5bde25ccdb231f8105"
39
+ ],
40
+ " test.ome.tiff"
41
+ ],
42
+ " meta" : {
43
+ " nf-test" : " 0.9.2" ,
44
+ " nextflow" : " 24.10.4"
45
+ },
46
+ " timestamp" : " 2025-06-16T10:23:08.22317741"
47
+ }
48
+ }
You can’t perform that action at this time.
0 commit comments