Skip to content

Commit 72a6623

Browse files
committed
fix: apply topic channels and update meta.yml structure for xeniumranger
1 parent 4567028 commit 72a6623

File tree

14 files changed

+2604
-2568
lines changed

14 files changed

+2604
-2568
lines changed

modules/nf-core/xeniumranger/import-segmentation/main.nf

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,11 @@ process XENIUMRANGER_IMPORT_SEGMENTATION {
55
container "nf-core/xeniumranger:4.0"
66

77
input:
8-
tuple val(meta),
9-
path(xenium_bundle, stageAs: "bundle/"),
10-
path(transcript_assignment),
11-
path(viz_polygons),
12-
path(nuclei),
13-
path(cells),
14-
path(coordinate_transform)
15-
8+
tuple val(meta), path(xenium_bundle, stageAs: "bundle/"), path(transcript_assignment), path(viz_polygons), path(nuclei), path(cells), path(coordinate_transform)
9+
1610
output:
1711
tuple val(meta), path("${prefix}"), emit: outs
18-
path "versions.yml", emit: versions
12+
tuple val("${task.process}"), val("xeniumranger"), eval("xeniumranger -V | sed -e 's/xeniumranger-/- /g'"), emit: versions, topic: versions
1913

2014
when:
2115
task.ext.when == null || task.ext.when
@@ -46,11 +40,6 @@ process XENIUMRANGER_IMPORT_SEGMENTATION {
4640
--localcores=${task.cpus} \\
4741
--localmem=${task.memory.toGiga()} \\
4842
${args}
49-
50-
cat <<-END_VERSIONS > versions.yml
51-
"${task.process}":
52-
xeniumranger: \$(xeniumranger -V | sed -e "s/xeniumranger-/- /g")
53-
END_VERSIONS
5443
"""
5544

5645
stub:
@@ -84,10 +73,5 @@ process XENIUMRANGER_IMPORT_SEGMENTATION {
8473
mkdir -p "${prefix}"
8574
touch "${prefix}/dry_run.txt"
8675
fi
87-
88-
cat <<-END_VERSIONS > versions.yml
89-
"${task.process}":
90-
xeniumranger: \$(xeniumranger -V | sed -e "s/xeniumranger-/- /g")
91-
END_VERSIONS
9276
"""
9377
}
Lines changed: 54 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: xeniumranger_import_segmentation
2-
description: The xeniumranger import-segmentation module allows you to specify 2D
3-
nuclei and/or cell segmentation results for assigning transcripts to cells and recalculate
4-
all Xenium Onboard Analysis (XOA) outputs that depend on segmentation. Segmentation
5-
results can be generated by community-developed tools or prior Xenium segmentation
6-
result.
2+
description: The xeniumranger import-segmentation module allows you to specify
3+
2D nuclei and/or cell segmentation results for assigning transcripts to cells
4+
and recalculate all Xenium Onboard Analysis (XOA) outputs that depend on
5+
segmentation. Segmentation results can be generated by community-developed
6+
tools or prior Xenium segmentation result.
77
keywords:
88
- spatial
99
- segmentation
@@ -31,44 +31,70 @@ input:
3131
e.g. [id:'xenium_sample']
3232
- xenium_bundle:
3333
type: directory
34-
description: Path to the Xenium output bundle generated by the Xenium Onboard Analysis pipeline
35-
- nuclei:
34+
description: Path to the Xenium output bundle generated by the Xenium
35+
Onboard Analysis pipeline
36+
- transcript_assignment:
3637
type: file
3738
optional: true
38-
description: Optional nucleus segmentation input passed to `--nuclei`
39-
- cells:
39+
description: Optional transcript assignment CSV passed to
40+
`--transcript-assignment`
41+
ontologies: []
42+
- viz_polygons:
4043
type: file
4144
optional: true
42-
description: Optional cell segmentation input passed to `--cells`
43-
- transcript_assignment:
45+
description: Optional visualization polygons GeoJSON passed to
46+
`--viz-polygons`
47+
ontologies: []
48+
- nuclei:
4449
type: file
4550
optional: true
46-
description: Optional transcript assignment CSV passed to `--transcript-assignment`
47-
- viz_polygons:
51+
description: Optional nucleus segmentation input passed to `--nuclei`
52+
ontologies: []
53+
- cells:
4854
type: file
4955
optional: true
50-
description: Optional visualization polygons GeoJSON passed to `--viz-polygons`
56+
description: Optional cell segmentation input passed to `--cells`
57+
ontologies: []
5158
- coordinate_transform:
5259
type: file
5360
optional: true
54-
description: Optional image alignment transform passed to `--coordinate-transform`
61+
description: Optional image alignment transform passed to
62+
`--coordinate-transform`
63+
ontologies: []
5564
output:
5665
outs:
57-
- meta:
58-
type: map
59-
description: Groovy Map containing sample information e.g. [ id:'test' ]
60-
- "${meta.id}":
61-
type: directory
62-
description: Directory containing the output xenium bundle of Xenium Ranger
63-
pattern: "${meta.id}"
66+
- - meta:
67+
type: map
68+
description: Groovy Map containing sample information e.g. [ id:'test' ]
69+
- "${prefix}":
70+
type: directory
71+
description: Directory containing the output xenium bundle of Xenium
72+
Ranger
73+
pattern: "${prefix}"
6474
versions:
65-
- versions.yml:
66-
type: file
67-
description: File containing software versions
68-
pattern: "versions.yml"
69-
ontologies:
70-
- edam: http://edamontology.org/format_3750 # YAML
75+
- - "${task.process}":
76+
type: string
77+
description: The process the versions were collected from
78+
- xeniumranger:
79+
type: string
80+
description: The tool name
81+
- "xeniumranger -V | sed -e 's/xeniumranger-/- /g'":
82+
type: string
83+
description: The command used to generate the version of the tool
84+
topics:
85+
versions:
86+
- - "${task.process}":
87+
type: string
88+
description: The process the versions were collected from
89+
- xeniumranger:
90+
type: string
91+
description: The tool name
92+
- "xeniumranger -V | sed -e 's/xeniumranger-/- /g'":
93+
type: string
94+
description: The command used to generate the version of the tool
7195
authors:
7296
- "@khersameesh24"
97+
- "@an-altosian"
7398
maintainers:
7499
- "@khersameesh24"
100+
- "@an-altosian"

modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nextflow_process {
1313

1414
setup {
1515
run("UNTAR") {
16-
script "../../../untar/main.nf"
16+
script "modules/nf-core/untar/main.nf"
1717
process {
1818
"""
1919
input[0] = [[], file('https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe/xenium_bundle.tar.gz', checkIfExists: true)]

modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test.snap

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
]
1414
],
1515
"1": [
16-
"versions.yml:md5,773a1ba600c527d6b9b3d62faf58d4bc"
16+
[
17+
"XENIUMRANGER_IMPORT_SEGMENTATION",
18+
"xeniumranger",
19+
"xeniumranger xenium-4.0.1.1"
20+
]
1721
],
1822
"outs": [
1923
[
@@ -26,14 +30,18 @@
2630
]
2731
],
2832
"versions": [
29-
"versions.yml:md5,773a1ba600c527d6b9b3d62faf58d4bc"
33+
[
34+
"XENIUMRANGER_IMPORT_SEGMENTATION",
35+
"xeniumranger",
36+
"xeniumranger xenium-4.0.1.1"
37+
]
3038
]
3139
}
3240
],
3341
"meta": {
3442
"nf-test": "0.9.3",
3543
"nextflow": "25.04.2"
3644
},
37-
"timestamp": "2025-12-05T05:33:33.73241842"
45+
"timestamp": "2025-12-08T18:09:01.800602245"
3846
}
3947
}

modules/nf-core/xeniumranger/relabel/tests/main.nf.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nextflow_process {
1313

1414
setup {
1515
run("UNTAR") {
16-
script "../../../untar/main.nf"
16+
script "modules/nf-core/untar/main.nf"
1717
process {
1818
"""
1919
input[0] = [[], file('https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe/xenium_bundle.tar.gz', checkIfExists: true)]

modules/nf-core/xeniumranger/rename/tests/main.nf.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nextflow_process {
1313

1414
setup {
1515
run("UNTAR") {
16-
script "../../../untar/main.nf"
16+
script "modules/nf-core/untar/main.nf"
1717
process {
1818
"""
1919
input[0] = [[], file('https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe/xenium_bundle.tar.gz', checkIfExists: true)]

modules/nf-core/xeniumranger/resegment/tests/main.nf.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nextflow_process {
1313

1414
setup {
1515
run("UNTAR") {
16-
script "../../../untar/main.nf"
16+
script "modules/nf-core/untar/main.nf"
1717
process {
1818
"""
1919
input[0] = [[], file('https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe/xenium_bundle.tar.gz', checkIfExists: true)]

subworkflows/nf-core/xeniumranger/import_segmentation_image/main.nf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ workflow XENIUMRANGER_IMPORT_SEGMENTATION_IMAGE {
99
ch_coordinate_transform // [meta, coordinate_transform] (use [] if absent)
1010

1111
main:
12-
ch_versions = channel.empty()
1312

1413
def input = ch_bundle
1514
.map { meta, bundle -> [meta.id, [meta, bundle]] }
@@ -50,9 +49,8 @@ workflow XENIUMRANGER_IMPORT_SEGMENTATION_IMAGE {
5049
}
5150

5251
XENIUMRANGER_IMPORT_SEGMENTATION(input)
53-
ch_versions = ch_versions.mix(XENIUMRANGER_IMPORT_SEGMENTATION.out.versions)
5452

5553
emit:
5654
outs = XENIUMRANGER_IMPORT_SEGMENTATION.out.outs
57-
versions = ch_versions
55+
versions = XENIUMRANGER_IMPORT_SEGMENTATION.out.versions
5856
}

subworkflows/nf-core/xeniumranger/import_segmentation_image/meta.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ keywords:
77
- import segmentation
88
- nuclei
99
- cells
10-
modules:
10+
components:
1111
- xeniumranger/import-segmentation
12+
- xeniumranger/import/segmentation
1213
input:
1314
- ch_input:
1415
description: >
@@ -34,21 +35,22 @@ input:
3435
optional: true
3536
description: Optional image alignment transform CSV. Use [] if absent.
3637
output:
37-
outs:
38-
description: Channel of Xenium bundle outputs produced by import-segmentation
39-
structure:
40-
- meta:
41-
type: map
42-
description: Sample metadata
43-
- "${meta.id}":
44-
type: directory
45-
description: Output Xenium bundle directory
46-
versions:
47-
description: Aggregated versions emitted by the module
48-
structure:
49-
- path:
50-
type: file
51-
description: `versions.yml`
38+
- outs:
39+
description: Channel of Xenium bundle outputs produced by import-segmentation
40+
structure:
41+
- meta:
42+
type: map
43+
description: Sample metadata
44+
- "${meta.id}":
45+
type: directory
46+
description: Output Xenium bundle directory
47+
- versions:
48+
description: Aggregated versions emitted by the module
49+
structure:
50+
- path:
51+
type: file
52+
description: "versions.yml"
53+
authors:
54+
- "@an-altosian"
5255
maintainers:
53-
- "@your_github_handle"
54-
56+
- "@an-altosian"

subworkflows/nf-core/xeniumranger/import_segmentation_image/tests/main.nf.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ nextflow_workflow {
77

88
tag "subworkflows"
99
tag "subworkflows_nfcore"
10+
tag "subworkflows/xeniumranger/import_segmentation_image"
1011
tag "xeniumranger"
1112
tag "xeniumranger/import_segmentation_image"
1213
tag "untar"
13-
tag "xeniumranger/import_segmentation"
14+
tag "xeniumranger/import-segmentation"
1415

1516
setup {
1617
run("UNTAR") {

0 commit comments

Comments
 (0)