From 549908cc9734b94bcd0c1c48f76aebba2cfb8fcf Mon Sep 17 00:00:00 2001 From: khersameesh24 Date: Wed, 30 Oct 2024 13:02:03 +0100 Subject: [PATCH] fixed meta and xenium bundle file path --- .../xeniumranger/import-segmentation/main.nf | 3 +- .../xeniumranger/import-segmentation/meta.yml | 2 +- .../import-segmentation/tests/main.nf.test | 67 ++++++++++--------- .../tests/main.nf.test.snap | 6 +- modules/nf-core/xeniumranger/relabel/main.nf | 3 +- modules/nf-core/xeniumranger/relabel/meta.yml | 2 +- .../xeniumranger/relabel/tests/main.nf.test | 15 +++-- modules/nf-core/xeniumranger/rename/main.nf | 3 +- modules/nf-core/xeniumranger/rename/meta.yml | 2 +- .../xeniumranger/rename/tests/main.nf.test | 18 ++--- .../rename/tests/main.nf.test.snap | 10 +-- .../nf-core/xeniumranger/resegment/main.nf | 3 +- .../nf-core/xeniumranger/resegment/meta.yml | 2 +- .../xeniumranger/resegment/tests/main.nf.test | 14 ++-- .../resegment/tests/main.nf.test.snap | 6 +- 15 files changed, 81 insertions(+), 75 deletions(-) diff --git a/modules/nf-core/xeniumranger/import-segmentation/main.nf b/modules/nf-core/xeniumranger/import-segmentation/main.nf index f1f96999eb3..50b17272a16 100644 --- a/modules/nf-core/xeniumranger/import-segmentation/main.nf +++ b/modules/nf-core/xeniumranger/import-segmentation/main.nf @@ -5,8 +5,7 @@ process XENIUMRANGER_IMPORT_SEGMENTATION { container "nf-core/xeniumranger:3.0.1" input: - val(meta) - path(xenium_bundle) + tuple val(meta), path(xenium_bundle) val(expansion_distance) path(coordinate_transform) path(nuclei) diff --git a/modules/nf-core/xeniumranger/import-segmentation/meta.yml b/modules/nf-core/xeniumranger/import-segmentation/meta.yml index 858144d94c2..c3a34ec5339 100644 --- a/modules/nf-core/xeniumranger/import-segmentation/meta.yml +++ b/modules/nf-core/xeniumranger/import-segmentation/meta.yml @@ -29,7 +29,7 @@ input: description: | Groovy Map containing run information e.g. [id:'xenium_bundle_path'] - - - xenium_bundle: + - xenium_bundle: type: directory description: Path to the xenium output bundle generated by the Xenium Onboard Analysis pipeline diff --git a/modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test b/modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test index 8bfed862c5c..705a66c1cad 100644 --- a/modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test +++ b/modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test @@ -26,14 +26,15 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_import-segmentation"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } - input[2] = 0 - input[3] = [] - input[4] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/nuclei.npy" + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = 0 + input[2] = [] + input[3] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/nuclei.npy" + input[4] = [] input[5] = [] input[6] = [] - input[7] = [] """ } } @@ -92,14 +93,15 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_import-segmentation"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } - input[2] = 0 - input[3] = [] - input[4] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/nuclei.npy" + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = 0 + input[2] = [] + input[3] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/nuclei.npy" + input[4] = [] input[5] = [] input[6] = [] - input[7] = [] """ } } @@ -157,14 +159,15 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_import-segmentation"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } - input[2] = 0 - input[3] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/imagealignment.csv" + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = 0 + input[2] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/imagealignment.csv" + input[3] = [] input[4] = [] - input[5] = [] - input[6] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/segmentation.csv" - input[7] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/segmentation_polygons.json" + input[5] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/segmentation.csv" + input[6] = UNZIP.out.unzipped_archive.map { it[1] } + "/segmentations/segmentation_polygons.json" """ } } @@ -222,14 +225,15 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_import-segmentation"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } - input[2] = 0 - input[3] = [] - input[4] = UNZIP.out.unzipped_archive.map { it[1] } + "/cells.zarr.zip" + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = 0 + input[2] = [] + input[3] = UNZIP.out.unzipped_archive.map { it[1] } + "/cells.zarr.zip" + input[4] = [] input[5] = [] input[6] = [] - input[7] = [] """ } } @@ -288,14 +292,15 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_import-segmentation"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } - input[2] = 0 - input[3] = [] - input[4] = UNZIP.out.unzipped_archive.map { it[1] } + "/cells.zarr.zip" + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = 0 + input[2] = [] + input[3] = UNZIP.out.unzipped_archive.map { it[1] } + "/cells.zarr.zip" + input[4] = [] input[5] = [] input[6] = [] - input[7] = [] """ } } diff --git a/modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test.snap b/modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test.snap index 63ae8c5eacc..ee026b3aa7c 100644 --- a/modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test.snap +++ b/modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test.snap @@ -74,7 +74,7 @@ "0": [ [ { - "id": "test_xeniumranger_import-segmentation" + "id": "test_xeniumranger_relabel" }, "fake_file.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -85,7 +85,7 @@ "outs": [ [ { - "id": "test_xeniumranger_import-segmentation" + "id": "test_xeniumranger_relabel" }, "fake_file.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -99,7 +99,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-22T20:05:05.394111" + "timestamp": "2024-10-30T12:55:58.357065" }, "xeniumranger import-segmentation nuclei tif": { "content": [ diff --git a/modules/nf-core/xeniumranger/relabel/main.nf b/modules/nf-core/xeniumranger/relabel/main.nf index 13b0e678475..b06fe9ea13e 100644 --- a/modules/nf-core/xeniumranger/relabel/main.nf +++ b/modules/nf-core/xeniumranger/relabel/main.nf @@ -5,8 +5,7 @@ process XENIUMRANGER_RELABEL { container "nf-core/xeniumranger:3.0.1" input: - val(meta) - path(xenium_bundle) + tuple val(meta), path(xenium_bundle) path(gene_panel) output: diff --git a/modules/nf-core/xeniumranger/relabel/meta.yml b/modules/nf-core/xeniumranger/relabel/meta.yml index f2dbd19d16e..85c1dbfa3a1 100644 --- a/modules/nf-core/xeniumranger/relabel/meta.yml +++ b/modules/nf-core/xeniumranger/relabel/meta.yml @@ -23,7 +23,7 @@ input: description: | Groovy Map containing run information e.g. [id:'xenium_bundle_path'] - - - xenium_bundle: + - xenium_bundle: type: directory description: Path to the xenium output bundle generated by the Xenium Onboard Analysis pipeline diff --git a/modules/nf-core/xeniumranger/relabel/tests/main.nf.test b/modules/nf-core/xeniumranger/relabel/tests/main.nf.test index 4967c1c7fd8..d09627386c3 100644 --- a/modules/nf-core/xeniumranger/relabel/tests/main.nf.test +++ b/modules/nf-core/xeniumranger/relabel/tests/main.nf.test @@ -26,9 +26,10 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_relabel"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } - input[2] = UNZIP.out.unzipped_archive.map { it[1] } + "/gene_panel.json" + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = UNZIP.out.unzipped_archive.map { it[1] } + "/gene_panel.json" """ } } @@ -66,7 +67,6 @@ nextflow_process { { assert path(process.out.outs.get(0).get(1).find { file(it).name == 'variance.csv' }).exists() }, { assert path(process.out.outs.get(0).get(1).find { file(it).name == 'metrics_summary.csv' }).exists() }, { assert path(process.out.outs.get(0).get(1).find { file(it).name == 'clusters.csv' }).exists() }, - ) } } @@ -76,9 +76,10 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_relabel"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } - input[2] = UNZIP.out.unzipped_archive.map { it[1] } + "/gene_panel.json" + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = UNZIP.out.unzipped_archive.map { it[1] } + "/gene_panel.json" """ } } diff --git a/modules/nf-core/xeniumranger/rename/main.nf b/modules/nf-core/xeniumranger/rename/main.nf index 2226e505190..d273caf3276 100644 --- a/modules/nf-core/xeniumranger/rename/main.nf +++ b/modules/nf-core/xeniumranger/rename/main.nf @@ -5,8 +5,7 @@ process XENIUMRANGER_RENAME { container "nf-core/xeniumranger:3.0.1" input: - val(meta) - path(xenium_bundle) + tuple val(meta), path(xenium_bundle) val(region_name) val(cassette_name) diff --git a/modules/nf-core/xeniumranger/rename/meta.yml b/modules/nf-core/xeniumranger/rename/meta.yml index 26da43bcd99..d7842b007a7 100644 --- a/modules/nf-core/xeniumranger/rename/meta.yml +++ b/modules/nf-core/xeniumranger/rename/meta.yml @@ -22,7 +22,7 @@ input: - - meta: type: map description: Groovy Map containing sample information e.g. [ id:'test' ] - - - xenium_bundle: + - xenium_bundle: type: directory description: Path to the xenium output bundle generated by the Xenium Onboard Analysis pipeline diff --git a/modules/nf-core/xeniumranger/rename/tests/main.nf.test b/modules/nf-core/xeniumranger/rename/tests/main.nf.test index e6e21e96813..deeda23aa47 100644 --- a/modules/nf-core/xeniumranger/rename/tests/main.nf.test +++ b/modules/nf-core/xeniumranger/rename/tests/main.nf.test @@ -26,10 +26,11 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_rename"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } - input[2] = "test_region" - input[3] = "test_cassette" + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = "test_region" + input[2] = "test_cassette" """ } } @@ -58,10 +59,11 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_rename"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } - input[2] = "test_region" - input[3] = "test_cassette" + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = "test_region" + input[2] = "test_cassette" """ } } diff --git a/modules/nf-core/xeniumranger/rename/tests/main.nf.test.snap b/modules/nf-core/xeniumranger/rename/tests/main.nf.test.snap index 0ab60c31077..db064c04bb0 100644 --- a/modules/nf-core/xeniumranger/rename/tests/main.nf.test.snap +++ b/modules/nf-core/xeniumranger/rename/tests/main.nf.test.snap @@ -5,7 +5,7 @@ "0": [ [ { - "id": "test_xeniumranger_rename" + "id": "test_xeniumranger_relabel" }, "fake_file.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -16,7 +16,7 @@ "outs": [ [ { - "id": "test_xeniumranger_rename" + "id": "test_xeniumranger_relabel" }, "fake_file.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -30,7 +30,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-22T20:12:43.026607" + "timestamp": "2024-10-30T12:00:02.547585" }, "xeniumranger rename": { "content": [ @@ -47,7 +47,7 @@ "cells.parquet:md5,e1450c7eca3d7ce0d4911c95042b1303", "cells.zarr.zip:md5,556e47d5b14150239b10b2f801defa2b", "gene_panel.json:md5,8890dd5fd90706e751554ac3fdfdedde", - "metrics_summary.csv:md5,54ad3944eb3ba6a4d7bda01bc2a6bb1c", + "metrics_summary.csv:md5,ce5c0c32c2a6994dd29e1595b439125b", "morphology.ome.tif:md5,6b65fff28a38a001b8f25061737fbf9b", "morphology_focus_0000.ome.tif:md5,90e796ad634d14e62cf2ebcadf2eaf98", "nucleus_boundaries.csv.gz:md5,e417b6e293298870956d42c7106cbd0c", @@ -60,6 +60,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-23T18:41:44.42271" + "timestamp": "2024-10-30T11:59:45.587263" } } \ No newline at end of file diff --git a/modules/nf-core/xeniumranger/resegment/main.nf b/modules/nf-core/xeniumranger/resegment/main.nf index 85566cf0f52..5d28fa698a7 100644 --- a/modules/nf-core/xeniumranger/resegment/main.nf +++ b/modules/nf-core/xeniumranger/resegment/main.nf @@ -5,8 +5,7 @@ process XENIUMRANGER_RESEGMENT { container "nf-core/xeniumranger:3.0.1" input: - val(meta) - path(xenium_bundle) + tuple val(meta), path(xenium_bundle) val(expansion_distance) val(dapi_filter) val(boundary_stain) diff --git a/modules/nf-core/xeniumranger/resegment/meta.yml b/modules/nf-core/xeniumranger/resegment/meta.yml index 9bf71449ba3..af0e88826b0 100644 --- a/modules/nf-core/xeniumranger/resegment/meta.yml +++ b/modules/nf-core/xeniumranger/resegment/meta.yml @@ -22,7 +22,7 @@ input: description: | Groovy Map containing run information e.g. [ id:'xenium_experiment' ] - - - xenium_bundle: + - xenium_bundle: type: directory description: Path to the xenium output bundle generated by the Xenium Onboard Analysis pipeline - - expansion_distance: diff --git a/modules/nf-core/xeniumranger/resegment/tests/main.nf.test b/modules/nf-core/xeniumranger/resegment/tests/main.nf.test index faefce959df..fb2640e99b0 100644 --- a/modules/nf-core/xeniumranger/resegment/tests/main.nf.test +++ b/modules/nf-core/xeniumranger/resegment/tests/main.nf.test @@ -26,12 +26,13 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_resegment"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = [] input[2] = [] input[3] = [] input[4] = [] - input[5] = [] """ } } @@ -56,12 +57,13 @@ nextflow_process { when { process { """ - input[0] = [id: "test_xeniumranger_resegment"] - input[1] = UNZIP.out.unzipped_archive.map { it[1] } + input[0] = Channel.of([ + [id: "test_xeniumranger_relabel"], + ]).combine(UNZIP.out.unzipped_archive.map { it[1] }) + input[1] = [] input[2] = [] input[3] = [] input[4] = [] - input[5] = [] """ } } diff --git a/modules/nf-core/xeniumranger/resegment/tests/main.nf.test.snap b/modules/nf-core/xeniumranger/resegment/tests/main.nf.test.snap index fa8b9183fbc..2777f943f2f 100644 --- a/modules/nf-core/xeniumranger/resegment/tests/main.nf.test.snap +++ b/modules/nf-core/xeniumranger/resegment/tests/main.nf.test.snap @@ -5,7 +5,7 @@ "0": [ [ { - "id": "test_xeniumranger_resegment" + "id": "test_xeniumranger_relabel" }, "fake_file.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -16,7 +16,7 @@ "outs": [ [ { - "id": "test_xeniumranger_resegment" + "id": "test_xeniumranger_relabel" }, "fake_file.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -30,6 +30,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-28T14:02:23.13186" + "timestamp": "2024-10-30T12:23:55.768779" } } \ No newline at end of file