From fff9e7d7a933e29310e156dc5dc39f666a5ed4ae Mon Sep 17 00:00:00 2001 From: Sameesh Kher Date: Sat, 6 Sep 2025 20:17:04 +0000 Subject: [PATCH 1/8] minor changes and fixes --- assets/multiqc_config.yml | 8 ++++++++ modules/local/spatialdata/merge/main.nf | 8 ++++---- modules/local/spatialdata/meta/main.nf | 4 ++-- .../spatialconverter/parquet_to_csv/main.nf | 0 .../spatialconverter/parquet_to_csv/meta.yml | 0 .../parquet_to_csv/templates/parquet_to_csv.py | 0 nextflow.config | 4 ++-- .../local/proseg_preset_proseg2baysor/main.nf | 7 +------ .../local/spatialdata_write_meta_merge/main.nf | 17 ++++++++--------- 9 files changed, 25 insertions(+), 23 deletions(-) rename modules/local/{ => utility}/spatialconverter/parquet_to_csv/main.nf (100%) rename modules/local/{ => utility}/spatialconverter/parquet_to_csv/meta.yml (100%) rename modules/local/{ => utility}/spatialconverter/parquet_to_csv/templates/parquet_to_csv.py (100%) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index aa92fdf6..c248820d 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -13,3 +13,11 @@ report_section_order: export_plots: true disable_version_detection: true + +log_filesize_limit: 5000000000 # 5GB + +run_modules: + - xenium + +module_order: + - xenium diff --git a/modules/local/spatialdata/merge/main.nf b/modules/local/spatialdata/merge/main.nf index dbcc00af..ec4d36f5 100644 --- a/modules/local/spatialdata/merge/main.nf +++ b/modules/local/spatialdata/merge/main.nf @@ -9,8 +9,8 @@ process SPATIALDATA_MERGE { path(add_bundle, stageAs: "*") output: - tuple val(meta), path("spatialdata_spatialxe"), emit: spatialxe_bundle - path("versions.yml") , emit: versions + tuple val(meta), path("spatialdata_merged"), emit: merged_bundle + path("versions.yml") , emit: versions when: task.ext.when == null || task.ext.when @@ -27,8 +27,8 @@ process SPATIALDATA_MERGE { stub: """ - mkdir -p "spatialdata_spatialxe/" - touch spatialdata_spatialxe/fake_file.txt + mkdir -p "spatialdata_merged/" + touch spatialdata_merged/fake_file.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/local/spatialdata/meta/main.nf b/modules/local/spatialdata/meta/main.nf index 260372aa..428ebbb7 100644 --- a/modules/local/spatialdata/meta/main.nf +++ b/modules/local/spatialdata/meta/main.nf @@ -9,8 +9,8 @@ process SPATIALDATA_META { path(xenium_bundle, stageAs: "*") output: - tuple val(meta), path("spatialdata_spatialxe_final"), emit: spatialxe_bundle - path("versions.yml") , emit: versions + tuple val(meta), path("spatialdata_meta"), emit: metadata + path("versions.yml") , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/spatialconverter/parquet_to_csv/main.nf b/modules/local/utility/spatialconverter/parquet_to_csv/main.nf similarity index 100% rename from modules/local/spatialconverter/parquet_to_csv/main.nf rename to modules/local/utility/spatialconverter/parquet_to_csv/main.nf diff --git a/modules/local/spatialconverter/parquet_to_csv/meta.yml b/modules/local/utility/spatialconverter/parquet_to_csv/meta.yml similarity index 100% rename from modules/local/spatialconverter/parquet_to_csv/meta.yml rename to modules/local/utility/spatialconverter/parquet_to_csv/meta.yml diff --git a/modules/local/spatialconverter/parquet_to_csv/templates/parquet_to_csv.py b/modules/local/utility/spatialconverter/parquet_to_csv/templates/parquet_to_csv.py similarity index 100% rename from modules/local/spatialconverter/parquet_to_csv/templates/parquet_to_csv.py rename to modules/local/utility/spatialconverter/parquet_to_csv/templates/parquet_to_csv.py diff --git a/nextflow.config b/nextflow.config index 141ae759..6fa746c5 100644 --- a/nextflow.config +++ b/nextflow.config @@ -212,8 +212,8 @@ profiles { test_full { includeConfig 'conf/test_full.config' } } -// Load nf-core custom profiles from different Institutions -includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" +// Load nf-core custom profiles from different institutions │ +includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" // Load nf-core/spatialxe custom profiles from different institutions. includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/pipeline/spatialxe.config" : "/dev/null" diff --git a/subworkflows/local/proseg_preset_proseg2baysor/main.nf b/subworkflows/local/proseg_preset_proseg2baysor/main.nf index 57b761a8..b0216b33 100644 --- a/subworkflows/local/proseg_preset_proseg2baysor/main.nf +++ b/subworkflows/local/proseg_preset_proseg2baysor/main.nf @@ -4,7 +4,6 @@ include { PROSEG } from '../../../modules/local/proseg/preset/main' include { PROSEG2BAYSOR } from '../../../modules/local/proseg/proseg2baysor/main' -include { PARQUET_TO_CSV } from '../../../modules/local/spatialconverter/parquet_to_csv/main' include { XENIUMRANGER_IMPORT_SEGMENTATION } from '../../../modules/nf-core/xeniumranger/import-segmentation/main' workflow PROSEG_PRESET_PROSEG2BAYSOR { @@ -19,12 +18,8 @@ workflow PROSEG_PRESET_PROSEG2BAYSOR { ch_versions = Channel.empty() ch_coordinate_space = Channel.value("microns") - // run parquet-to-csv - PARQUET_TO_CSV ( ch_transcripts_parquet, ".gz" ) - ch_versions = ch_versions.mix( PARQUET_TO_CSV.out.versions ) - // run proseg with the xenium format - PROSEG ( PARQUET_TO_CSV.out.transcripts_csv ) + PROSEG ( ch_transcripts_parquet ) ch_versions = ch_versions.mix( PROSEG.out.versions ) // run proseg-to-baysor on the data generated with the proseg run diff --git a/subworkflows/local/spatialdata_write_meta_merge/main.nf b/subworkflows/local/spatialdata_write_meta_merge/main.nf index 6379e85c..de9bd8b5 100644 --- a/subworkflows/local/spatialdata_write_meta_merge/main.nf +++ b/subworkflows/local/spatialdata_write_meta_merge/main.nf @@ -2,10 +2,10 @@ // generate spatialdata object from the spatialxe layers // +include { SPATIALDATA_META } from '../../../modules/local/spatialdata/meta/main' include { SPATIALDATA_WRITE as SPATIALDATA_WRITE_RAW_BUNDLE } from '../../../modules/local/spatialdata/write/main' -include { SPATIALDATA_WRITE as SPATIALDATA_WRITE_REDEFINED_BUNDLE } from '../../../modules/local/spatialdata/write/main' include { SPATIALDATA_MERGE as SPATIALDATA_MERGE_RAW_REDEFINED } from '../../../modules/local/spatialdata/merge/main' -include { SPATIALDATA_META } from '../../../modules/local/spatialdata/meta/main' +include { SPATIALDATA_WRITE as SPATIALDATA_WRITE_REDEFINED_BUNDLE } from '../../../modules/local/spatialdata/write/main' workflow SPATIALDATA_WRITE_META_MERGE { @@ -18,7 +18,6 @@ workflow SPATIALDATA_WRITE_META_MERGE { ch_versions = Channel.empty() ch_segmented_object = Channel.empty() - ch_cells_as_circles = Channel.empty() // check segmentation - only nuclei, cells or both cells & nuclei if ( params.mode == 'image') { @@ -90,17 +89,17 @@ workflow SPATIALDATA_WRITE_META_MERGE { _meta, bundle -> return [ bundle ] } SPATIALDATA_META ( - SPATIALDATA_MERGE_RAW_REDEFINED.out.spatialxe_bundle, + SPATIALDATA_MERGE_RAW_REDEFINED.out.merged_bundle, ch_just_bundle_path ) ch_versions = ch_versions.mix ( SPATIALDATA_META.out.versions ) emit: - ch_sd_raw = SPATIALDATA_WRITE_RAW_BUNDLE.out.spatialdata // channel: [ val(meta), "spatialdata_raw" ] - ch_sd_redefined = SPATIALDATA_WRITE_REDEFINED_BUNDLE.out.spatialdata // channel: [ val(meta), "spatialdata_redefined" ] - ch_sd_merged = SPATIALDATA_MERGE_RAW_REDEFINED.out.spatialxe_bundle // channel: [ val(meta), "spatialdata_spatialxe" ] - ch_sd_meta = SPATIALDATA_META.out.spatialxe_bundle // channel: [ val(meta), "spatialdata_spatialxe_final" ] + sd_raw_bundle = SPATIALDATA_WRITE_RAW_BUNDLE.out.spatialdata // channel: [ val(meta), "spatialdata_raw" ] + sd_redefined_bundle = SPATIALDATA_WRITE_REDEFINED_BUNDLE.out.spatialdata // channel: [ val(meta), "spatialdata_redefined" ] + sd_merged_bundle = SPATIALDATA_MERGE_RAW_REDEFINED.out.merged_bundle // channel: [ val(meta), "spatialdata_merged" ] + sd_metadata = SPATIALDATA_META.out.metadata // channel: [ val(meta), "spatialdata_meta" ] - versions = ch_versions // channel: [ versions.yml ] + versions = ch_versions // channel: [ versions.yml ] } From 9763ea3a3e1d0598f38d3741761f84dc05df4fe9 Mon Sep 17 00:00:00 2001 From: Sameesh Kher Date: Sat, 6 Sep 2025 21:59:46 +0000 Subject: [PATCH 2/8] minor linting fixes and small changes --- .github/CONTRIBUTING.md | 2 +- assets/multiqc_config.yml | 8 +- modules.json | 8 +- .../spatialconverter/parquet_to_csv/main.nf | 2 +- modules/nf-core/cellpose/cellpose.diff | 4 +- modules/nf-core/cellpose/main.nf | 2 +- modules/nf-core/cellpose/meta.yml | 32 ++--- .../nf-core/cellpose/tests/main.nf.test.snap | 39 +++---- modules/nf-core/multiqc/environment.yml | 2 +- modules/nf-core/multiqc/main.nf | 4 +- modules/nf-core/multiqc/meta.yml | 110 ++++++++++-------- .../nf-core/multiqc/tests/main.nf.test.snap | 26 ++--- modules/nf-core/untar/meta.yml | 19 +-- modules/nf-core/unzip/meta.yml | 18 +-- modules/nf-core/unzip/tests/tags.yml | 2 - nf-test.config | 24 ++++ ro-crate-metadata.json | 32 +++-- .../local/baysor_generate_preview/main.nf | 2 +- .../local/baysor_generate_preview/meta.yml | 0 .../local/baysor_generate_segfree/meta.yml | 0 .../meta.yml | 0 .../baysor_run_transcripts_parquet/meta.yml | 0 .../meta.yml | 0 .../meta.yml | 0 .../local/ficture_preprocess_model/main.nf | 3 +- .../local/ficture_preprocess_model/meta.yml | 0 .../proseg_preset_proseg2baysor/meta.yml | 0 .../segger_create_train_predict/meta.yml | 0 .../spatialdata_write_meta_merge/meta.yml | 0 .../meta.yml | 0 .../xeniumranger_relabel_resegment/meta.yml | 0 .../meta.yml | 0 tests/default.nf.test | 0 tests/nextflow.config | 13 +++ 34 files changed, 214 insertions(+), 138 deletions(-) delete mode 100644 modules/nf-core/unzip/tests/tags.yml create mode 100644 nf-test.config create mode 100644 subworkflows/local/baysor_generate_preview/meta.yml create mode 100644 subworkflows/local/baysor_generate_segfree/meta.yml create mode 100644 subworkflows/local/baysor_run_prior_segmentation_mask/meta.yml create mode 100644 subworkflows/local/baysor_run_transcripts_parquet/meta.yml create mode 100644 subworkflows/local/cellpose_baysor_import_segmentation/meta.yml create mode 100644 subworkflows/local/cellpose_resolift_morphology_ome_tif/meta.yml create mode 100644 subworkflows/local/ficture_preprocess_model/meta.yml create mode 100644 subworkflows/local/proseg_preset_proseg2baysor/meta.yml create mode 100644 subworkflows/local/segger_create_train_predict/meta.yml create mode 100644 subworkflows/local/spatialdata_write_meta_merge/meta.yml create mode 100644 subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/meta.yml create mode 100644 subworkflows/local/xeniumranger_relabel_resegment/meta.yml create mode 100644 subworkflows/local/xeniumranger_resegment_morphology_ome_tif/meta.yml create mode 100644 tests/default.nf.test create mode 100644 tests/nextflow.config diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index acdd7f34..6264525d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -78,7 +78,7 @@ If you wish to contribute a new step, please use the following coding standards: 5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core pipelines schema build` tool). 6. Add sanity checks and validation for all relevant parameters. 7. Perform local tests to validate that the new code works as expected. -8. If applicable, add a new test command in `.github/workflow/ci.yml`. +8. If applicable, add a new test in the `tests` directory. 9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module. 10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`. diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index c248820d..8c07c959 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -16,8 +16,8 @@ disable_version_detection: true log_filesize_limit: 5000000000 # 5GB -run_modules: - - xenium +# run_modules: +# - xenium -module_order: - - xenium +# module_order: +# - xenium diff --git a/modules.json b/modules.json index d89c6fa9..4276b112 100644 --- a/modules.json +++ b/modules.json @@ -7,24 +7,24 @@ "nf-core": { "cellpose": { "branch": "master", - "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"], "patch": "modules/nf-core/cellpose/cellpose.diff" }, "multiqc": { "branch": "master", - "git_sha": "7b50cb7be890e4b28cffb82e438cc6a8d7805d3f", + "git_sha": "a4488d3d09244f29fb4606ba4eef85d59dcc6ad8", "installed_by": ["modules"] }, "untar": { "branch": "master", - "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"], "patch": "modules/nf-core/untar/untar.diff" }, "unzip": { "branch": "master", - "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"] }, "xeniumranger/import-segmentation": { diff --git a/modules/local/utility/spatialconverter/parquet_to_csv/main.nf b/modules/local/utility/spatialconverter/parquet_to_csv/main.nf index b585aee8..a18019cd 100644 --- a/modules/local/utility/spatialconverter/parquet_to_csv/main.nf +++ b/modules/local/utility/spatialconverter/parquet_to_csv/main.nf @@ -2,7 +2,7 @@ process PARQUET_TO_CSV { tag "$meta.id" label 'process_low' - container "ghcr.io/scverse/spatialdata:spatialdata0.3.0_spatialdata-io0.1.7_spatialdata-plot0.2.9" + container "heylf/spatialdata:0.2.6" input: tuple val(meta), path(transcripts) diff --git a/modules/nf-core/cellpose/cellpose.diff b/modules/nf-core/cellpose/cellpose.diff index eecf7e9b..0267f42c 100644 --- a/modules/nf-core/cellpose/cellpose.diff +++ b/modules/nf-core/cellpose/cellpose.diff @@ -1,5 +1,4 @@ Changes in component 'nf-core/cellpose' -'modules/nf-core/cellpose/meta.yml' is unchanged Changes in 'cellpose/main.nf': --- modules/nf-core/cellpose/main.nf +++ modules/nf-core/cellpose/main.nf @@ -27,7 +26,8 @@ Changes in 'cellpose/main.nf': cat <<-END_VERSIONS > versions.yml "${task.process}": +'modules/nf-core/cellpose/meta.yml' is unchanged 'modules/nf-core/cellpose/tests/main.nf.test' is unchanged -'modules/nf-core/cellpose/tests/main.nf.test.snap' is unchanged 'modules/nf-core/cellpose/tests/nextflow_wflows.config' is unchanged +'modules/nf-core/cellpose/tests/main.nf.test.snap' is unchanged ************************************************************ diff --git a/modules/nf-core/cellpose/main.nf b/modules/nf-core/cellpose/main.nf index 9baa2ae2..e19bd00f 100644 --- a/modules/nf-core/cellpose/main.nf +++ b/modules/nf-core/cellpose/main.nf @@ -2,7 +2,7 @@ process CELLPOSE { tag "$meta.id" label 'process_medium' - container "docker.io/biocontainers/cellpose:3.0.1_cv1" + container "docker.io/biocontainers/cellpose:3.1.0_cv1" input: tuple val(meta), path(image) diff --git a/modules/nf-core/cellpose/meta.yml b/modules/nf-core/cellpose/meta.yml index 5397944b..d0b03732 100644 --- a/modules/nf-core/cellpose/meta.yml +++ b/modules/nf-core/cellpose/meta.yml @@ -24,13 +24,15 @@ input: type: file description: tif file for ready for segmentation pattern: "*.{tif,tiff}" - - - model: - type: file - description: Optional input file. Cellpose 2 model trained by user using human-in-the-loop - approach. + ontologies: [] + - model: + type: file + description: Optional input file. Cellpose 2 model trained by user using human-in-the-loop + approach. + ontologies: [] output: - - mask: - - meta: + mask: + - - meta: type: map description: | Groovy Map containing sample information @@ -39,8 +41,9 @@ output: type: file description: labelled mask output from cellpose in tif format pattern: "*.{tif, tiff}" - - flows: - - meta: + ontologies: [] + flows: + - - meta: type: map description: | Groovy Map containing sample information @@ -49,11 +52,14 @@ output: type: file description: cell flow output from cellpose pattern: "*.{tif}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@josenimo" - "@FloWuenne" diff --git a/modules/nf-core/cellpose/tests/main.nf.test.snap b/modules/nf-core/cellpose/tests/main.nf.test.snap index 03b4dbfc..e76ca251 100644 --- a/modules/nf-core/cellpose/tests/main.nf.test.snap +++ b/modules/nf-core/cellpose/tests/main.nf.test.snap @@ -2,31 +2,26 @@ "flows": { "content": [ [ - [ - { - "id": "test" - }, - "cycif_tonsil_registered.ome_flows.tif:md5,de79a792d4bebd2f9753ceb47a0de5f7" - ] + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-03-18T14:22:16.855256249" + "timestamp": "2025-07-04T13:21:35.054592365" }, "versions": { "content": [ [ - "versions.yml:md5,ce42208b574084f390cf58b4c19b5717" + "versions.yml:md5,398393e73a80fc622873765256d5ec79" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-03-18T14:22:16.875087557" + "timestamp": "2025-07-04T13:21:35.145644688" }, "cellpose - stub": { "content": [ @@ -43,7 +38,7 @@ ], "2": [ - "versions.yml:md5,ce42208b574084f390cf58b4c19b5717" + "versions.yml:md5,398393e73a80fc622873765256d5ec79" ], "flows": [ @@ -57,15 +52,15 @@ ] ], "versions": [ - "versions.yml:md5,ce42208b574084f390cf58b4c19b5717" + "versions.yml:md5,398393e73a80fc622873765256d5ec79" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-03-18T14:22:39.339792992" + "timestamp": "2025-07-04T13:21:52.227498747" }, "mask": { "content": [ @@ -74,14 +69,14 @@ { "id": "test" }, - "cycif_tonsil_registered.ome_cp_masks.tif:md5,001ad312413f18bc2615741bd3ad12cf" + "cycif_tonsil_registered.ome_cp_masks.tif:md5,b151d6718fcb770b2fa3989da632d96e" ] ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-03-18T14:22:16.8369758" + "timestamp": "2025-07-04T13:21:34.95450341" } } \ No newline at end of file diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index d430da5f..f8937048 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::multiqc=1.28 + - bioconda::multiqc=1.30 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index f3b57047..67460de9 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -3,8 +3,8 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.28--pyhdfd78af_0' : - 'biocontainers/multiqc:1.28--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.30--pyhdfd78af_1' : + 'biocontainers/multiqc:1.30--pyhdfd78af_1' }" input: path multiqc_files, stageAs: "?/*" diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index b16c1879..ce30eb73 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -15,57 +15,71 @@ tools: licence: ["GPL-3.0-or-later"] identifier: biotools:multiqc input: - - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections - in multiqc_config. - pattern: "*.{yml,yaml}" - - - multiqc_logo: + - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + ontologies: [] + - multiqc_config: + type: file + description: Optional config yml for MultiQC + pattern: "*.{yml,yaml}" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + - extra_multiqc_config: + type: file + description: Second optional config yml for MultiQC. Will override common sections + in multiqc_config. + pattern: "*.{yml,yaml}" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + - multiqc_logo: + type: file + description: Optional logo file for MultiQC + pattern: "*.{png}" + ontologies: [] + - replace_names: + type: file + description: | + Optional two-column sample renaming file. First column a set of + patterns, second column a set of corresponding replacements. Passed via + MultiQC's `--replace-names` option. + pattern: "*.{tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + - sample_names: + type: file + description: | + Optional TSV file with headers, passed to the MultiQC --sample_names + argument. + pattern: "*.{tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV +output: + report: + - "*multiqc_report.html": type: file - description: Optional logo file for MultiQC - pattern: "*.{png}" - - - replace_names: + description: MultiQC report file + pattern: "multiqc_report.html" + ontologies: [] + data: + - "*_data": + type: directory + description: MultiQC data dir + pattern: "multiqc_data" + plots: + - "*_plots": type: file - description: | - Optional two-column sample renaming file. First column a set of - patterns, second column a set of corresponding replacements. Passed via - MultiQC's `--replace-names` option. - pattern: "*.{tsv}" - - - sample_names: + description: Plots created by MultiQC + pattern: "*_data" + ontologies: [] + versions: + - versions.yml: type: file - description: | - Optional TSV file with headers, passed to the MultiQC --sample_names - argument. - pattern: "*.{tsv}" -output: - - report: - - "*multiqc_report.html": - type: file - description: MultiQC report file - pattern: "multiqc_report.html" - - data: - - "*_data": - type: directory - description: MultiQC data dir - pattern: "multiqc_data" - - plots: - - "*_plots": - type: file - description: Plots created by MultiQC - pattern: "*_data" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@abhi18av" - "@bunop" diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index 26d74307..0d3f288b 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -2,14 +2,14 @@ "multiqc_versions_single": { "content": [ [ - "versions.yml:md5,b05075d2d2b4f485c0d627a5c8e475b2" + "versions.yml:md5,e65ce731db2128b8e4dd43d6e880fc1c" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.10.4" + "nf-test": "0.9.2", + "nextflow": "25.04.3" }, - "timestamp": "2025-03-26T16:05:18.927925" + "timestamp": "2025-07-10T08:06:23.563041241" }, "multiqc_stub": { "content": [ @@ -17,25 +17,25 @@ "multiqc_report.html", "multiqc_data", "multiqc_plots", - "versions.yml:md5,b05075d2d2b4f485c0d627a5c8e475b2" + "versions.yml:md5,e65ce731db2128b8e4dd43d6e880fc1c" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.10.4" + "nf-test": "0.9.2", + "nextflow": "25.04.3" }, - "timestamp": "2025-03-26T16:05:55.639955" + "timestamp": "2025-07-10T08:06:48.96226832" }, "multiqc_versions_config": { "content": [ [ - "versions.yml:md5,b05075d2d2b4f485c0d627a5c8e475b2" + "versions.yml:md5,e65ce731db2128b8e4dd43d6e880fc1c" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.10.4" + "nf-test": "0.9.2", + "nextflow": "25.04.3" }, - "timestamp": "2025-03-26T16:05:44.067369" + "timestamp": "2025-07-10T08:06:40.627008706" } -} \ No newline at end of file +} diff --git a/modules/nf-core/untar/meta.yml b/modules/nf-core/untar/meta.yml index 3a37bb35..1b6bf491 100644 --- a/modules/nf-core/untar/meta.yml +++ b/modules/nf-core/untar/meta.yml @@ -21,9 +21,12 @@ input: type: file description: File to be untar pattern: "*.{tar}.{gz}" + ontologies: + - edam: http://edamontology.org/format_3981 # TAR format + - edam: http://edamontology.org/format_3989 # GZIP format output: - - untar: - - meta: + untar: + - - meta: type: map description: | Groovy Map containing sample information @@ -35,11 +38,13 @@ output: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] pattern: "*/" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/unzip/meta.yml b/modules/nf-core/unzip/meta.yml index 426fccb7..ba1eb912 100644 --- a/modules/nf-core/unzip/meta.yml +++ b/modules/nf-core/unzip/meta.yml @@ -24,9 +24,11 @@ input: type: file description: ZIP file pattern: "*.zip" + ontologies: + - edam: http://edamontology.org/format_3987 # ZIP format output: - - unzipped_archive: - - meta: + unzipped_archive: + - - meta: type: map description: | Groovy Map containing sample information @@ -35,11 +37,13 @@ output: type: directory description: Directory contents of the unzipped archive pattern: "${archive.baseName}/" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/unzip/tests/tags.yml b/modules/nf-core/unzip/tests/tags.yml deleted file mode 100644 index 7f5647e1..00000000 --- a/modules/nf-core/unzip/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -unzip: - - "modules/nf-core/unzip/**" diff --git a/nf-test.config b/nf-test.config new file mode 100644 index 00000000..3a1fff59 --- /dev/null +++ b/nf-test.config @@ -0,0 +1,24 @@ +config { + // location for all nf-test tests + testsDir "." + + // nf-test directory including temporary files for each test + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + + // location of an optional nextflow.config file specific for executing tests + configFile "tests/nextflow.config" + + // ignore tests coming from the nf-core/modules repo + ignore 'modules/nf-core/**/tests/*', 'subworkflows/nf-core/**/tests/*' + + // run all test with defined profile(s) from the main nextflow.config + profile "test" + + // list of filenames or patterns that should be trigger a full test run + triggers 'nextflow.config', 'nf-test.config', 'conf/test.config', 'tests/nextflow.config', 'tests/.nftignore' + + // load the necessary plugins + plugins { + load "nft-utils@0.0.3" + } +} diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index e98f8c56..3c50a7c8 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -23,7 +23,7 @@ "@type": "Dataset", "creativeWorkStatus": "InProgress", "datePublished": "2025-04-30T12:28:31+00:00", - "description": "

\n \n \n \"nf-core/spatialxe\"\n \n

\n\n[![GitHub Actions CI Status](https://github.com/nf-core/spatialxe/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/spatialxe/actions/workflows/ci.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/spatialxe/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/spatialxe/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/spatialxe/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A524.04.2-23aa62.svg)](https://www.nextflow.io/)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/spatialxe)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23spatialxe-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/spatialxe)[![Follow on Twitter](http://img.shields.io/badge/twitter-%40nf__core-1DA1F2?labelColor=000000&logo=twitter)](https://twitter.com/nf_core)[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core)\n\n## Introduction\n\n**nf-core/spatialxe** is a bioinformatics pipeline that ...\n\n\n\n\n1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/))\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\n\n\nNow, you can run the pipeline using:\n\n\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\nFor more details and further functionality, please refer to the [usage documentation](https://nf-co.re/spatialxe/usage) and the [parameter documentation](https://nf-co.re/spatialxe/parameters).\n\n## Pipeline output\n\nTo see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/spatialxe/results) tab on the nf-core website pipeline page.\nFor more details about the output files and reports, please refer to the\n[output documentation](https://nf-co.re/spatialxe/output).\n\n## Credits\n\nnf-core/spatialxe was originally written by Florian Heyl.\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\nFor further information or help, don't hesitate to get in touch on the [Slack `#spatialxe` channel](https://nfcore.slack.com/channels/spatialxe) (you can join with [this invite](https://nf-co.re/join/slack)).\n\n## Citations\n\n\n\n\n\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nYou can cite the `nf-core` publication as follows:\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", + "description": "

\n \n \n \"nf-core/spatialxe\"\n \n

\n\n[![GitHub Actions CI Status](https://github.com/nf-core/spatialxe/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/spatialxe/actions/workflows/ci.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/spatialxe/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/spatialxe/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/spatialxe/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A524.04.2-23aa62.svg)](https://www.nextflow.io/)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/spatialxe)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23spatialxe-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/spatialxe)[![Follow on Twitter](http://img.shields.io/badge/twitter-%40nf__core-1DA1F2?labelColor=000000&logo=twitter)](https://twitter.com/nf_core)[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core)\n\n## Introduction\n\n**nf-core/spatialxe** is a bioinformatics best-practice processing and quality control pipeline for Xenium data. **The pipeline is currently under developement and not completed yet!**. The current plan for the pipeline implementation is shown in the metromap below. Please note that the pipeline steps and methods might change as we move forward in the development cycle.\n\n![nf-core/spatialxe-metromap](docs/images/spatialxe-metromap.png)\n\n\n\n## Usage\n\nOn release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources. The results obtained from the full-sized test can be viewed on the [nf-core website](https://nf-co.re/spatialxe/results).\n\n## Pipeline summary\n\n## Quick Start\n\n`samplesheet.csv`:\n\n```csv\nsample,bundle,image\ntest_sample,/path/to/xenium-bundle,/path/to/morphology.ome.tif\n```\n\nNow, you can run the pipeline using:\n\n\n\n## Run image-based segmentation mode
\n\n`CELLPOSE -> BAYSOR -> XR-IMPORT_SEGMENTATION -> SPATIALDATA -> QC`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode image\n```\n\n## Run coordinate-based segmentation mode
\n\n`PROSEG -> PROSEG2BAYSOR -> XR-IMPORT_SEGMENTATION -> SPATIALDATA -> QC`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode coordinate\n```\n\n## Run segfree mode
\n\n`BAYSOR_SEGFREE`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode segfree\n```\n\n## Run preview mode
\n\n`BAYSOR_PREVIEW`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode preview\n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\nFor more details and further functionality, please refer to the [usage documentation](https://nf-co.re/spatialxe/usage) and the [parameter documentation](https://nf-co.re/spatialxe/parameters).\n\n## Pipeline output\n\nTo see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/spatialxe/results) tab on the nf-core website pipeline page.\nFor more details about the output files and reports, please refer to the\n[output documentation](https://nf-co.re/spatialxe/output).\n\n## Credits\n\nnf-core/spatialxe was originally written by [Sameesh Kher](https://github.com/khersameesh24) and [Florian Heyl](https://github.com/heylf).\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- Tobias Krause\n- Kre\u0161imir Be\u0161tak (kbestak)\n- Matthias H\u00f6rtenhuber (mashehu)\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\nFor further information or help, don't hesitate to get in touch on the [Slack `#spatialxe` channel](https://nfcore.slack.com/channels/spatialxe) (you can join with [this invite](https://nf-co.re/join/slack)).\n\n## Citations\n\n\n\n\n\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nYou can cite the `nf-core` publication as follows:\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", "hasPart": [ { "@id": "main.nf" @@ -121,21 +121,37 @@ }, { "@id": "main.nf", - "@type": ["File", "SoftwareSourceCode", "ComputationalWorkflow"], + "@type": [ + "File", + "SoftwareSourceCode", + "ComputationalWorkflow" + ], "dateCreated": "", "dateModified": "2025-04-30T12:28:31Z", "dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/", - "keywords": ["nf-core", "nextflow"], - "license": ["MIT"], - "name": ["nf-core/spatialxe"], + "keywords": [ + "nf-core", + "nextflow" + ], + "license": [ + "MIT" + ], + "name": [ + "nf-core/spatialxe" + ], "programmingLanguage": { "@id": "https://w3id.org/workflowhub/workflow-ro-crate#nextflow" }, "sdPublisher": { "@id": "https://nf-co.re/" }, - "url": ["https://github.com/nf-core/spatialxe", "https://nf-co.re/spatialxe/dev/"], - "version": ["1.0dev"] + "url": [ + "https://github.com/nf-core/spatialxe", + "https://nf-co.re/spatialxe/dev/" + ], + "version": [ + "1.0dev" + ] }, { "@id": "https://w3id.org/workflowhub/workflow-ro-crate#nextflow", @@ -292,4 +308,4 @@ "url": "https://nf-co.re/" } ] -} +} \ No newline at end of file diff --git a/subworkflows/local/baysor_generate_preview/main.nf b/subworkflows/local/baysor_generate_preview/main.nf index 749bce5b..09950ac7 100644 --- a/subworkflows/local/baysor_generate_preview/main.nf +++ b/subworkflows/local/baysor_generate_preview/main.nf @@ -4,7 +4,7 @@ include { BAYSOR_PREVIEW } from '../../../modules/local/baysor/preview/main' include { BAYSOR_CREATE_DATASET } from '../../../modules/local/baysor/create_dataset/main' -include { PARQUET_TO_CSV } from '../../../modules/local/spatialconverter/parquet_to_csv/main' +include { PARQUET_TO_CSV } from '../../../modules/local/utility/spatialconverter/parquet_to_csv/main' workflow BAYSOR_GENERATE_PREVIEW { diff --git a/subworkflows/local/baysor_generate_preview/meta.yml b/subworkflows/local/baysor_generate_preview/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/baysor_generate_segfree/meta.yml b/subworkflows/local/baysor_generate_segfree/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/baysor_run_prior_segmentation_mask/meta.yml b/subworkflows/local/baysor_run_prior_segmentation_mask/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/baysor_run_transcripts_parquet/meta.yml b/subworkflows/local/baysor_run_transcripts_parquet/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/cellpose_baysor_import_segmentation/meta.yml b/subworkflows/local/cellpose_baysor_import_segmentation/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/cellpose_resolift_morphology_ome_tif/meta.yml b/subworkflows/local/cellpose_resolift_morphology_ome_tif/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/ficture_preprocess_model/main.nf b/subworkflows/local/ficture_preprocess_model/main.nf index bf8e259a..a33e74ad 100644 --- a/subworkflows/local/ficture_preprocess_model/main.nf +++ b/subworkflows/local/ficture_preprocess_model/main.nf @@ -4,7 +4,8 @@ include { FICTURE_PREPROCESS } from '../../../modules/local/ficture/preprocess/main' include { FICTURE } from '../../../modules/local/ficture/model/main' -include { PARQUET_TO_CSV } from '../../../modules/local/spatialconverter/parquet_to_csv/main' +include { PARQUET_TO_CSV } from '../../../modules/local/utility/spatialconverter/parquet_to_csv/main' + workflow FICTURE_PREPROCESS_MODEL { diff --git a/subworkflows/local/ficture_preprocess_model/meta.yml b/subworkflows/local/ficture_preprocess_model/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/proseg_preset_proseg2baysor/meta.yml b/subworkflows/local/proseg_preset_proseg2baysor/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/segger_create_train_predict/meta.yml b/subworkflows/local/segger_create_train_predict/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/spatialdata_write_meta_merge/meta.yml b/subworkflows/local/spatialdata_write_meta_merge/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/meta.yml b/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/xeniumranger_relabel_resegment/meta.yml b/subworkflows/local/xeniumranger_relabel_resegment/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/meta.yml b/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/tests/default.nf.test b/tests/default.nf.test new file mode 100644 index 00000000..e69de29b diff --git a/tests/nextflow.config b/tests/nextflow.config new file mode 100644 index 00000000..eff6fcbb --- /dev/null +++ b/tests/nextflow.config @@ -0,0 +1,13 @@ +/* +======================================================================================== + Nextflow config file for running nf-test tests +======================================================================================== +*/ + +// Or any resources requirements +params { + modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/spatialxe' +} + +aws.client.anonymous = true // fixes S3 access issues on self-hosted runners From 67dd1088dd7f59a718d6f89902048f8645fcf17e Mon Sep 17 00:00:00 2001 From: Sameesh Kher Date: Sat, 6 Sep 2025 22:27:10 +0000 Subject: [PATCH 3/8] more linting fixes --- modules.json | 2 +- .../tests/nextflow.config | 4 +- tests/default.nf.test | 71 +++++++++++++++++++ 3 files changed, 74 insertions(+), 3 deletions(-) diff --git a/modules.json b/modules.json index 4276b112..2f33c535 100644 --- a/modules.json +++ b/modules.json @@ -61,7 +61,7 @@ }, "utils_nfschema_plugin": { "branch": "master", - "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", + "git_sha": "dcd088f483cede0c3df4034d405126f05a764cc7", "installed_by": ["subworkflows"] } } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config index 0907ac58..443e828c 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config @@ -1,8 +1,8 @@ plugins { - id "nf-schema@2.1.0" + id "nf-schema@2.4.2" } validation { parametersSchema = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" monochromeLogs = true -} \ No newline at end of file +} diff --git a/tests/default.nf.test b/tests/default.nf.test index e69de29b..112ad756 100644 --- a/tests/default.nf.test +++ b/tests/default.nf.test @@ -0,0 +1,71 @@ +nextflow_pipeline { + + name "Test pipeline for spatialxe" + script "../main.nf" + tag "pipeline" + tag "image-based segmentation" + tag "transcripts-based segmentation" + tag "xeniumranger" + config "../conf/test.config" + + test("Params: --mode 'coordinate'") { + + when { + params { + outdir = "$outputDir" + test_data_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe' + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') + assertAll( + { assert workflow.success }, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions + removeNextflowVersion("$outputDir/pipeline_info/nf_core_spatialxe_software_mqc_versions.yml"), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } + test("-stub") { + + options "-stub" + + when { + params { + outdir = "$outputDir" + test_data_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe' + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') + assertAll( + { assert workflow.success }, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions + removeNextflowVersion("$outputDir/pipeline_info/nf_core_spatialxe_software_mqc_versions.yml"), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } +} From fc17397597c519ab4f09419182cfa88fa6ce78d0 Mon Sep 17 00:00:00 2001 From: Sameesh Kher Date: Sun, 7 Sep 2025 16:22:32 +0000 Subject: [PATCH 4/8] changes to segger module, move params to nextflow config, minor subworklfow changes --- conf/modules.config | 7 ---- modules/local/segger/create_dataset/main.nf | 4 +- modules/local/segger/predict/main.nf | 12 +++--- modules/local/segger/train/main.nf | 10 ++--- nextflow.config | 9 +++++ nextflow_schema.json | 35 +++++++++++++++++ .../local/segger_create_train_predict/main.nf | 38 ++++++++++++++----- 7 files changed, 86 insertions(+), 29 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index d9228b4f..232e504b 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -81,8 +81,6 @@ process { path: { "${params.outdir}/segger/create_dataset" }, mode: params.publish_dir_mode, ] - tile_width = "120" - tile_height = "120" } withName: SEGGER_TRAIN { @@ -90,9 +88,6 @@ process { path: { "${params.outdir}/segger/train" }, mode: params.publish_dir_mode, ] - batch_size = 4 // larger batch size can speed up training, but requires more memory - devices = 4 // Use multiple GPUs by increasing the devices parameter to further accelerate training - max_epochs = 200 // increasing #epochs can improve model performance with more learning cycles, but extends training time ext.args = { "--init_emb 8 --hidden_channels 32 --num_tx_tokens 500 --out_channels 8 --heads 2 --num_mid_layers 2 --strategy auto --precision 16-mixed" } } @@ -101,8 +96,6 @@ process { path: { "${params.outdir}/segger/predict" }, mode: params.publish_dir_mode, ] - batch_size = 1 // larger batch size can speed up training, but requires more memory - cc_analysis = "false" // to control connected component analysis } withName: PARQUET_TO_CSV { diff --git a/modules/local/segger/create_dataset/main.nf b/modules/local/segger/create_dataset/main.nf index 7d2ffc12..c2d5c3a6 100644 --- a/modules/local/segger/create_dataset/main.nf +++ b/modules/local/segger/create_dataset/main.nf @@ -33,9 +33,9 @@ process SEGGER_CREATE_DATASET { --base_dir ${base_dir} \\ --data_dir ${prefix} \\ --sample_type ${params.format} \\ + --tile_width ${params.tile_width} \\ + --tile_height ${params.tile_height} \\ --n_workers ${task.cpus} \\ - --tile_width ${task.tile_width} \\ - --tile_height ${task.tile_height} \\ ${args} cat <<-END_VERSIONS > versions.yml diff --git a/modules/local/segger/predict/main.nf b/modules/local/segger/predict/main.nf index 97698016..ca5c0e2f 100644 --- a/modules/local/segger/predict/main.nf +++ b/modules/local/segger/predict/main.nf @@ -11,9 +11,9 @@ process SEGGER_PREDICT { output: - tuple val(meta), path("${meta.id}_benchmarks_dir") , emit: benchmarks - tuple val(meta), path("${meta.id}_benchmarks_dir/*/segger_transcripts.parquet") , emit: transcripts - path("versions.yml") , emit: versions + tuple val(meta), path("${meta.id}_benchmarks_dir") , emit: benchmarks + tuple val(meta), path("${meta.id}_benchmarks_dir/*/segger_transcripts.parquet"), emit: transcripts + path("versions.yml") , emit: versions when: task.ext.when == null || task.ext.when @@ -33,10 +33,10 @@ process SEGGER_PREDICT { --segger_data_dir ${segger_dataset} \\ --transcripts_file ${transcripts} \\ --benchmarks_dir ${prefix}_benchmarks_dir \\ - --num_workers ${task.cpus} \\ - --batch_size ${task.batch_size} \\ - --use_cc ${task.cc_analysis} \\ + --batch_size ${params.batch_size_predict} \\ + --use_cc ${params.cc_analysis} \\ --knn_method ${params.segger_knn_method} \\ + --num_workers ${task.cpus} \\ ${args} cat <<-END_VERSIONS > versions.yml diff --git a/modules/local/segger/train/main.nf b/modules/local/segger/train/main.nf index ec67275b..18d4dc0d 100644 --- a/modules/local/segger/train/main.nf +++ b/modules/local/segger/train/main.nf @@ -8,8 +8,8 @@ process SEGGER_TRAIN { tuple val(meta), path(dataset_dir) output: - tuple val(meta), path("${meta.id}_trained_models") , emit: trained_models - path("versions.yml") , emit: versions + tuple val(meta), path("${meta.id}_trained_models"), emit: trained_models + path("versions.yml") , emit: versions when: task.ext.when == null || task.ext.when @@ -28,10 +28,10 @@ process SEGGER_TRAIN { --dataset_dir ${dataset_dir} \\ --models_dir ${prefix}_trained_models \\ --sample_tag ${prefix} \\ + --batch_size ${params.batch_size_train} \\ + --max_epochs ${params.max_epochs} \\ + --devices ${params.devices} \\ --num_workers ${task.cpus} \\ - --batch_size ${task.batch_size} \\ - --max_epochs ${task.max_epochs} \\ - --devices ${task.devices} \\ --accelerator ${params.segger_accelerator} \\ ${args} diff --git a/nextflow.config b/nextflow.config index 6fa746c5..0ec22bb4 100644 --- a/nextflow.config +++ b/nextflow.config @@ -58,6 +58,15 @@ params { max_y = 24000.0 min_y = 0.0 + // Segger specific + tile_width = 120 + tile_height = 120 + batch_size_train = 4 // larger batch size can speed up training, but requires more memory + devices = 4 // Use multiple GPUs by increasing the devices parameter to further accelerate training + max_epochs = 200 // increasing #epochs can improve model performance with more learning cycles, but extends training time + batch_size_predict = 1 // larger batch size can speed up training, but requires more memory + cc_analysis = false // to control connected component analysis + // utility modules csplit_x_bins = 2 // number of tiles along the x axis (total number of bins is product of x_bins * y_bins) csplit_y_bins = 2 // number of tiles along the y axis diff --git a/nextflow_schema.json b/nextflow_schema.json index 7b6e2b0a..7c081abf 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -208,6 +208,41 @@ "csplit_y_bins": { "type": "integer", "description": "number of slices along the y axis (default - 10)" + }, + "tile_width": { + "type": "integer", + "description": "Width of the tiles in pixels", + "default": 120 + }, + "tile_height": { + "type": "integer", + "description": "Height of the tiles in pixels", + "default": 120 + }, + "batch_size_train": { + "type": "integer", + "description": "Number of samples to process per training batch", + "default": 4 + }, + "devices": { + "type": "integer", + "description": "Number of devices (GPUs) to use during training", + "default": 4 + }, + "max_epochs": { + "type": "integer", + "description": "Number of training epochs", + "default": 200 + }, + "batch_size_predict": { + "type": "integer", + "description": "Number of samples to process per batch during prediction", + "default": 1 + }, + "cc_analysis": { + "type": "integer", + "description": "Whether to use connected components for grouping transcripts without direct nucleus association", + "default": false } } }, diff --git a/subworkflows/local/segger_create_train_predict/main.nf b/subworkflows/local/segger_create_train_predict/main.nf index bd80f66c..b3be0a2a 100644 --- a/subworkflows/local/segger_create_train_predict/main.nf +++ b/subworkflows/local/segger_create_train_predict/main.nf @@ -19,6 +19,8 @@ workflow SEGGER_CREATE_TRAIN_PREDICT { main: ch_versions = Channel.empty() + + ch_updated_bundle = Channel.empty() ch_redefined_bundle = Channel.empty() ch_segger_transcripts = Channel.empty() ch_coordinate_space = Channel.value("pixels") @@ -49,27 +51,44 @@ workflow SEGGER_CREATE_TRAIN_PREDICT { SEGGER2XR ( SEGGER_PREDICT.out.transcripts ) ch_versions = ch_versions.mix( SEGGER2XR.out.versions ) - ch_segger_transcripts = SEGGER2XR.out.transcripts_parquet.map { + ch_segger_transcripts_parquet = SEGGER2XR.out.transcripts_parquet.map { _meta, transcripts -> return [ transcripts ] } - // replace transcripts.parquet in xenium bundle - ch_updated_bundle = ch_bundle.map { fileobj -> - if (fileobj.name == 'transcripts.parquet') { - ch_segger_transcripts.val - } else { - fileobj - } + // swap transscripts.parquet with segger transcripts + ch_updated_bundle = ch_bundle.map { _meta, fileobj -> + fileobj == "transcripts.parquet" ? ch_segger_transcripts_parquet : fileobj } // run xeniumranger import-segmentation - XENIUMRANGER_IMPORT_SEGMENTATION ( + cells = ch_updated_bundle.map { _meta, bundle -> + return [ bundle + "/cells.zarr.zip" ] + } + + if ( params.nucleus_segmentation_only ) { + + XENIUMRANGER_IMPORT_SEGMENTATION ( ch_updated_bundle, [], + cells, + cells, [], [], + ch_coordinate_space + ) + ch_redefined_bundle = XENIUMRANGER_IMPORT_SEGMENTATION.out.bundle + + ch_versions = ch_versions.mix ( XENIUMRANGER_IMPORT_SEGMENTATION.out.versions ) + + } else { + + XENIUMRANGER_IMPORT_SEGMENTATION ( + ch_updated_bundle, + [], + [], + cells, [], [], ch_coordinate_space @@ -78,6 +97,7 @@ workflow SEGGER_CREATE_TRAIN_PREDICT { ch_versions = ch_versions.mix ( XENIUMRANGER_IMPORT_SEGMENTATION.out.versions ) + } emit: From a4227b0c474e16696ffcc53bf28cf557ddeeeb62 Mon Sep 17 00:00:00 2001 From: Sameesh Kher Date: Sun, 7 Sep 2025 16:34:30 +0000 Subject: [PATCH 5/8] more linting fixes --- .nf-core.yml | 6 ++++-- README.md | 7 +------ nextflow_schema.json | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index 6bd0fb6c..9df02ce9 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -8,11 +8,13 @@ lint: - assets/nf-core-spatialxe_logo_light.png - docs/images/nf-core-spatialxe_logo_dark.png - docs/images/nf-core-spatialxe_logo_light.png + - conf/igenomes.config + - conf/igenomes_ignored.config nf_core_version: 3.2.1 repository_type: pipeline template: - author: Florian Heyl - description: A pipeline for spatialomics Xenium data. + author: Sameesh Kher, Florian Heyl + description: A pipeline for spatialomics Xenium In Situ data. force: false is_nfcore: true name: spatialxe diff --git a/README.md b/README.md index 7cb1dad2..5d70ec6c 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,6 @@ ![nf-core/spatialxe-metromap](docs/images/spatialxe-metromap.png) - - ## Usage On release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources. The results obtained from the full-sized test can be viewed on the [nf-core website](https://nf-co.re/spatialxe/results). @@ -43,8 +40,6 @@ test_sample,/path/to/xenium-bundle,/path/to/morphology.ome.tif Now, you can run the pipeline using: - - ## Run image-based segmentation mode
`CELLPOSE -> BAYSOR -> XR-IMPORT_SEGMENTATION -> SPATIALDATA -> QC` @@ -54,7 +49,7 @@ nextflow run nf-core/spatialxe \ -profile \ --input samplesheet.csv \ --outdir \ - --mode image + --mode ``` ## Run coordinate-based segmentation mode
diff --git a/nextflow_schema.json b/nextflow_schema.json index 7c081abf..ee9641ef 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -240,7 +240,7 @@ "default": 1 }, "cc_analysis": { - "type": "integer", + "type": "boolean", "description": "Whether to use connected components for grouping transcripts without direct nucleus association", "default": false } From bd89e4bc9ac0d011f04e350e05ce12cfbcabae17 Mon Sep 17 00:00:00 2001 From: Sameesh Kher Date: Sun, 7 Sep 2025 19:48:03 +0000 Subject: [PATCH 6/8] added meta.yml files for subworkflows, other minor changes --- .../local/baysor_generate_preview/meta.yml | 37 ++++++++ .../local/baysor_generate_segfree/main.nf | 2 +- .../local/baysor_generate_segfree/meta.yml | 32 +++++++ .../main.nf | 2 +- .../meta.yml | 62 +++++++++++++ .../baysor_run_transcripts_parquet/main.nf | 2 +- .../baysor_run_transcripts_parquet/meta.yml | 58 ++++++++++++ .../main.nf | 18 ++-- .../meta.yml | 88 +++++++++++++++++++ .../meta.yml | 63 +++++++++++++ .../proseg_preset_proseg2baysor/meta.yml | 52 +++++++++++ 11 files changed, 404 insertions(+), 12 deletions(-) diff --git a/subworkflows/local/baysor_generate_preview/meta.yml b/subworkflows/local/baysor_generate_preview/meta.yml index e69de29b..32fbcf92 100644 --- a/subworkflows/local/baysor_generate_preview/meta.yml +++ b/subworkflows/local/baysor_generate_preview/meta.yml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "baysor_generate_preview" +description: quick preview to get meaning from the data and to get some guesses about the parameters of the full baysor run +keywords: + - baysor + - preview + - transcripts + - report + - preview_html + - html_report + - visualization +components: + - baysor/preview + - baysor/create/dataset + - parquet/to/csv +input: + - ch_transcripts_parquet: + description: | + input parquet file from the xenium bundle + Structure: [ val(meta), path("path-to-transcripts.parquet") ] + - ch_config: + description: | + config file for the xenium baysor run (stored in assets/config/xenium.toml) + Structure: [ path("path-to-xenium.toml") ] +output: + - preview_html: + description: | + Preview html file generated with the baysor preview command + Structure: [ val(meta), path("path-to-preview.html") ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/baysor_generate_segfree/main.nf b/subworkflows/local/baysor_generate_segfree/main.nf index 1e4b5f59..54072fdb 100644 --- a/subworkflows/local/baysor_generate_segfree/main.nf +++ b/subworkflows/local/baysor_generate_segfree/main.nf @@ -3,7 +3,7 @@ // include { BAYSOR_SEGFREE } from '../../../modules/local/baysor/segfree/main' - +// include a module to process the output loom file with scapny or anndata workflow BAYSOR_GENERATE_SEGFREE { diff --git a/subworkflows/local/baysor_generate_segfree/meta.yml b/subworkflows/local/baysor_generate_segfree/meta.yml index e69de29b..f8c951c9 100644 --- a/subworkflows/local/baysor_generate_segfree/meta.yml +++ b/subworkflows/local/baysor_generate_segfree/meta.yml @@ -0,0 +1,32 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "baysor_generate_segfree" +description: with segfree analyses that don't require segmentation, can be run on local neighborhoods instead (Neighborhood Composition Vectors (NCVs)) +keywords: + - baysor + - segfree + - neighborhoods + - loom +components: + - baysor/segfree +input: + - ch_transcripts_parquet: + description: | + input parquet file from the xenium bundle + Structure: [ val(meta), path("path-to-transcripts.parquet") ] + - ch_config: + description: | + config file for the xenium baysor run (stored in assets/config/xenium.toml) + Structure: [ path("path-to-xenium.toml") ] +output: + - ncvs: + description: | + loom file generated with the baysor segfree command + Structure: [ val(meta), path("path-to-ncvs.loom") ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/baysor_run_prior_segmentation_mask/main.nf b/subworkflows/local/baysor_run_prior_segmentation_mask/main.nf index 7ec34d97..6c958417 100644 --- a/subworkflows/local/baysor_run_prior_segmentation_mask/main.nf +++ b/subworkflows/local/baysor_run_prior_segmentation_mask/main.nf @@ -87,7 +87,7 @@ workflow BAYSOR_RUN_PRIOR_SEGMENTATION_MASK { coordinate_space = ch_coordinate_space // channel: [ "microns" ] - redefined_bundle = ch_redefined_bundle // channel: [ val(meta), "redefined-xenium-bundle" ] + redefined_bundle = ch_redefined_bundle // channel: [ val(meta), ["redefined-xenium-bundle"] ] versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/local/baysor_run_prior_segmentation_mask/meta.yml b/subworkflows/local/baysor_run_prior_segmentation_mask/meta.yml index e69de29b..0ce3b51c 100644 --- a/subworkflows/local/baysor_run_prior_segmentation_mask/meta.yml +++ b/subworkflows/local/baysor_run_prior_segmentation_mask/meta.yml @@ -0,0 +1,62 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "baysor_run_prior_segmentation_mask" +description: to run the `baysor run` command if a prior segmentation mask is available +keywords: + - baysor + - baysor run + - segmentation + - segmentation mask + - xeniumranger import-segmentation + - image-based segmentation + - transcript filtering + - polygons +components: + - baysor/preprocess/transcripts + - baysor/run + - xeniumranger/import/segmentation +input: + - ch_bundle_path: + description: | + path to the xenium bundle + Structure: [ val(meta), path("path-to-xenium-bundle") ] + - ch_transcripts_parquet: + description: | + input parquet file from the xenium bundle + Structure: [ val(meta), path("path-to-transcripts.parquet") ] + - ch_segmentation_mask: + description: | + prior segmentation mask filepath + Structure: [ path("path-to-prior-segmentation-mask.tif") ] + - ch_config: + description: | + config file for the xenium baysor run (stored in assets/config/xenium.toml) + Structure: [ path("path-to-xenium.toml") ] +output: + - segmentation: + description: | + the segmentation.csv file generated from the baysor run command + Structure: [ val(meta), path("segmentation.csv") ] + - polygons2d: + description: | + the segmentation_polygons_2d.json file generated from the baysor run command + Structure: [ val(meta), path("segmentation_polygons_2d.json") ] + - htmls: + description: | + the html files generated from the baysor run command + Structure: [ val(meta), path("*.html") ] + - coordinate_space: + description: | + the coordinate space in which xeniumranger import-segmentation was run + Structure: [ val("microns") ] + - redefined_bundle: + description: | + the redefined xenium bundle generated with the segmentation results from baysor + Structure: [ val(meta), ["redefined-xenium-bundle"] ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/baysor_run_transcripts_parquet/main.nf b/subworkflows/local/baysor_run_transcripts_parquet/main.nf index 09037892..2c4f6294 100644 --- a/subworkflows/local/baysor_run_transcripts_parquet/main.nf +++ b/subworkflows/local/baysor_run_transcripts_parquet/main.nf @@ -3,8 +3,8 @@ // // include { SPLIT_TRANSCRIPTS } from '../../../modules/local/utility/split_transcripts/main' -include { BAYSOR_PREPROCESS_TRANSCRIPTS } from '../../../modules/local/baysor/preprocess/main' include { BAYSOR_RUN } from '../../../modules/local/baysor/run/main' +include { BAYSOR_PREPROCESS_TRANSCRIPTS } from '../../../modules/local/baysor/preprocess/main' include { XENIUMRANGER_IMPORT_SEGMENTATION } from '../../../modules/nf-core/xeniumranger/import-segmentation/main' diff --git a/subworkflows/local/baysor_run_transcripts_parquet/meta.yml b/subworkflows/local/baysor_run_transcripts_parquet/meta.yml index e69de29b..839cb2ce 100644 --- a/subworkflows/local/baysor_run_transcripts_parquet/meta.yml +++ b/subworkflows/local/baysor_run_transcripts_parquet/meta.yml @@ -0,0 +1,58 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "baysor_run_transcripts_parquet" +description: to run the `baysor run` command with the transcripts.parquet file as a coordinate-based segmentation run +keywords: + - baysor + - baysor run + - segmentation + - xeniumranger import-segmentation + - coordinate-based segmentation + - transcript filtering + - polygons +components: + - baysor/preprocess/transcripts + - baysor/run + - xeniumranger/import/segmentation + - split/transcripts +input: + - ch_bundle_path: + description: | + path to the xenium bundle + Structure: [ val(meta), path("path-to-xenium-bundle") ] + - ch_transcripts_parquet: + description: | + input parquet file from the xenium bundle + Structure: [ val(meta), path("path-to-transcripts.parquet") ] + - ch_config: + description: | + config file for the xenium baysor run (stored in assets/config/xenium.toml) + Structure: [ path("path-to-xenium.toml") ] +output: + - segmentation: + description: | + the segmentation.csv file generated from the baysor run command + Structure: [ val(meta), path("segmentation.csv") ] + - polygons2d: + description: | + the segmentation_polygons_2d.json file generated from the baysor run command + Structure: [ val(meta), path("segmentation_polygons_2d.json") ] + - htmls: + description: | + the html files generated from the baysor run command + Structure: [ val(meta), path("*.html") ] + - coordinate_space: + description: | + the coordinate space in which xeniumranger import-segmentation was run + Structure: [ val("microns") ] + - redefined_bundle: + description: | + the redefined xenium bundle generated with the segmentation results from baysor + Structure: [ val(meta), ["redefined-xenium-bundle"] ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/cellpose_baysor_import_segmentation/main.nf b/subworkflows/local/cellpose_baysor_import_segmentation/main.nf index daf6f0c9..9745910c 100644 --- a/subworkflows/local/cellpose_baysor_import_segmentation/main.nf +++ b/subworkflows/local/cellpose_baysor_import_segmentation/main.nf @@ -149,15 +149,15 @@ workflow CELLPOSE_BAYSOR_IMPORT_SEGMENTATION { emit: - cells_mask = ch_cellpose_cells_mask // channel: [ val(meta), [ "*masks.tif" ] ] - cells_flows = ch_cellpose_cells_flows // channel: [ val(meta), [ "*flows.tif" ] ] - cells_cells = ch_cellpose_cells_cells // channel: [ val(meta), [ "*seg.npy" ] ] - nuclei_mask = ch_cellpose_nuclei_mask // channel: [ val(meta), [ "*masks.tif" ] ] - nuclei_flows = ch_cellpose_nuclei_flows // channel: [ val(meta), [ "*flows.tif" ] ] - nuclei_cells = ch_cellpose_nuclei_cells // channel: [ val(meta), [ "*seg.npy" ] ] - - segmentation_mask = ch_segmentation // channel: [ val(meta), [ *segmentation.csv ] ] - polygons = ch_polygons // channel: [ val(meta), [ *polygons.json ] ] + cells_mask = ch_cellpose_cells_mask // channel: [ val(meta), [ "*masks.tif" ] ] + cells_flows = ch_cellpose_cells_flows // channel: [ val(meta), [ "*flows.tif" ] ] + cells_cells = ch_cellpose_cells_cells // channel: [ val(meta), [ "*seg.npy" ] ] + nuclei_mask = ch_cellpose_nuclei_mask // channel: [ val(meta), [ "*masks.tif" ] ] + nuclei_flows = ch_cellpose_nuclei_flows // channel: [ val(meta), [ "*flows.tif" ] ] + nuclei_cells = ch_cellpose_nuclei_cells // channel: [ val(meta), [ "*seg.npy" ] ] + + segmentation = ch_segmentation // channel: [ val(meta), [ *segmentation.csv ] ] + polygons2d = ch_polygons // channel: [ val(meta), [ *segmentation_polygons_2d.json ] ] coordinate_space = ch_coordinate_space // channel: [ val("microns") ] diff --git a/subworkflows/local/cellpose_baysor_import_segmentation/meta.yml b/subworkflows/local/cellpose_baysor_import_segmentation/meta.yml index e69de29b..c58f2213 100644 --- a/subworkflows/local/cellpose_baysor_import_segmentation/meta.yml +++ b/subworkflows/local/cellpose_baysor_import_segmentation/meta.yml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "cellpose_baysor_import_segmentation" +description: | + combine image-based segmentation approach with cellpose and integrate results from coordinate-based segmentation + through baysor to run import-segmentation in micron coordinate space +keywords: + - baysor + - cellpose + - baysor run + - segmentation + - xeniumranger import-segmentation + - image-based segmentation + - coordinate-based segmentation + - transcript filtering + - polygons +components: + - cellpose + - resolift + - baysor/preprocess/transcripts + - baysor/run + - xeniumranger/import/segmentation + - split/transcripts +input: + - ch_morphology_image: + description: | + path to the morphology.ome.tif file + Structure: [ val(meta), path("path-to-morphology.ome.tif") ] + - ch_bundle_path: + description: | + path to the xenium bundle + Structure: [ val(meta), path("path-to-xenium-bundle") ] + - ch_transcripts_parquet: + description: | + input parquet file from the xenium bundle + Structure: [ val(meta), path("path-to-transcripts.parquet") ] + - ch_config: + description: | + config file for the xenium baysor run (stored in assets/config/xenium.toml) + Structure: [ path("path-to-xenium.toml") ] +output: + - cells_mask: + description: | + cell segmentation mask generated by running Cellpose with the cpsam algorithm + Structure: [ val(meta), path("*masks.tif") ] + - cells_flows: + description: | + cell flows generated by running Cellpose with the cpsam algorithm + Structure: [ val(meta), path("*flows.tif") ] + - cells_cells: + description: | + cell segmentation mask as a numpy array generated by running Cellpose with the cpsam algorithm + Structure: [ val(meta), path("*seg.npy") ] + - nuclei_mask: + description: | + nuclei segmentation mask generated by running Cellpose with the nuclei algorithm + Structure: [ val(meta), path("*masks.tif") ] + - nuclei_flows: + description: | + nuclei flows generated by running Cellpose with the nuclei algorithm + Structure: [ val(meta), path("*masks.tif") ] + - nuclei_cells: + description: | + nuclei segmentation mask as a numpy array generated by running Cellpose with the nuclei algorithm + Structure: [ val(meta), path("*seg.npy") ] + - segmentation: + description: | + the segmentation.csv file generated from the baysor run command + Structure: [ val(meta), path("*segmentation.csv") ] + - polygons2d: + description: | + the segmentation_polygons_2d.json file generated from the baysor run command + Structure: [ val(meta), path("*segmentation_polygons_2d.json") ] + - coordinate_space: + description: | + the coordinate space in which xeniumranger import-segmentation was run + Structure: [ val("microns") ] + - redefined_bundle: + description: | + the redefined xenium bundle generated with the segmentation results from baysor + Structure: [ val(meta), ["redefined-xenium-bundle"] ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/cellpose_resolift_morphology_ome_tif/meta.yml b/subworkflows/local/cellpose_resolift_morphology_ome_tif/meta.yml index e69de29b..9dfdc52d 100644 --- a/subworkflows/local/cellpose_resolift_morphology_ome_tif/meta.yml +++ b/subworkflows/local/cellpose_resolift_morphology_ome_tif/meta.yml @@ -0,0 +1,63 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "cellpose_resolift_morphology_ome_tif" +description: | + image-based segmentation approach with cellpose to run import-segmentation in pixel coordinate space +keywords: + - cellpose + - segmentation + - xeniumranger import-segmentation + - image-based segmentation +components: + - cellpose + - resolift + - xeniumranger/import/segmentation +input: + - ch_morphology_image: + description: | + path to the morphology.ome.tif file + Structure: [ val(meta), path("path-to-morphology.ome.tif") ] + - ch_bundle_path: + description: | + path to the xenium bundle + Structure: [ val(meta), path("path-to-xenium-bundle") ] +output: + - cells_mask: + description: | + cell segmentation mask generated by running Cellpose with the cpsam algorithm + Structure: [ val(meta), path("*masks.tif") ] + - cells_flows: + description: | + cell flows generated by running Cellpose with the cpsam algorithm + Structure: [ val(meta), path("*flows.tif") ] + - cells_cells: + description: | + cell segmentation mask as a numpy array generated by running Cellpose with the cpsam algorithm + Structure: [ val(meta), path("*seg.npy") ] + - nuclei_mask: + description: | + nuclei segmentation mask generated by running Cellpose with the nuclei algorithm + Structure: [ val(meta), path("*masks.tif") ] + - nuclei_flows: + description: | + nuclei flows generated by running Cellpose with the nuclei algorithm + Structure: [ val(meta), path("*masks.tif") ] + - nuclei_cells: + description: | + nuclei segmentation mask as a numpy array generated by running Cellpose with the nuclei algorithm + Structure: [ val(meta), path("*seg.npy") ] + - coordinate_space: + description: | + the coordinate space in which xeniumranger import-segmentation was run + Structure: [ val("pixels") ] + - redefined_bundle: + description: | + the redefined xenium bundle generated with the segmentation results from baysor + Structure: [ val(meta), ["redefined-xenium-bundle"] ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/proseg_preset_proseg2baysor/meta.yml b/subworkflows/local/proseg_preset_proseg2baysor/meta.yml index e69de29b..ec8ffbbb 100644 --- a/subworkflows/local/proseg_preset_proseg2baysor/meta.yml +++ b/subworkflows/local/proseg_preset_proseg2baysor/meta.yml @@ -0,0 +1,52 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "proseg_preset_proseg2baysor" +description: to run proseg with the transcripts.parquet file as a coordinate-based segmentation run +keywords: + - proseg + - segmentation + - xeniumranger import-segmentation + - coordinate-based segmentation + - polygons + - metadata +components: + - proseg + - proseg2baysor + - xeniumranger/import/segmentation +input: + - ch_bundle_path: + description: | + path to the xenium bundle + Structure: [ val(meta), path("path-to-xenium-bundle") ] + - ch_transcripts_parquet: + description: | + input parquet file from the xenium bundle + Structure: [ val(meta), path("path-to-transcripts.parquet") ] +output: + - cell_polygons_2d: + description: | + the cell-polygons.geojson.gz file generated from proseg + Structure: [ val(meta), path("cell-polygons.geojson.gz") ] + - xr_polygons: + description: | + xeniumranger-compatible polygon file generated from the proseg command + Structure: [ val(meta), path("xr-cell-polygons.geojson") ] + - xr_metadata: + description: | + xeniumranger-compatible metadata file generated from the proseg command + Structure: [ val(meta), path("xr-transcript-metadata.csv") ] + - coordinate_space: + description: | + the coordinate space in which xeniumranger import-segmentation was run + Structure: [ val("microns") ] + - redefined_bundle: + description: | + the redefined xenium bundle generated with the segmentation results from baysor + Structure: [ val(meta), ["redefined-xenium-bundle"] ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" From 9007bb29f4cdc0b61e096f60e847712ea7c4be93 Mon Sep 17 00:00:00 2001 From: Sameesh Kher Date: Tue, 9 Sep 2025 20:34:04 +0000 Subject: [PATCH 7/8] more linting fixes and added meta.yml files for subworkflows --- assets/multiqc_config.yml | 25 +++++-- modules.json | 2 +- modules/local/spatialdata/merge/main.nf | 2 +- .../spatialdata/merge/templates/merge.py | 2 +- modules/local/spatialdata/meta/main.nf | 4 +- .../local/spatialdata/meta/templates/meta.py | 2 +- modules/nf-core/multiqc/environment.yml | 2 +- modules/nf-core/multiqc/main.nf | 4 +- .../nf-core/multiqc/tests/main.nf.test.snap | 20 +++--- nf-test.config | 24 ------- .../local/ficture_preprocess_model/meta.yml | 38 ++++++++++ .../local/segger_create_train_predict/main.nf | 6 +- .../segger_create_train_predict/meta.yml | 59 +++++++++++++++ .../spatialdata_write_meta_merge/main.nf | 13 ---- .../spatialdata_write_meta_merge/meta.yml | 54 ++++++++++++++ .../main.nf | 4 +- .../meta.yml | 36 ++++++++++ .../xeniumranger_relabel_resegment/meta.yml | 37 ++++++++++ .../main.nf | 4 +- .../meta.yml | 37 ++++++++++ tests/default.nf.test | 71 ------------------- tests/nextflow.config | 13 ---- workflows/spatialxe.nf | 10 ++- 23 files changed, 315 insertions(+), 154 deletions(-) delete mode 100644 nf-test.config delete mode 100644 tests/default.nf.test delete mode 100644 tests/nextflow.config diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 8c07c959..503f3c54 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -14,10 +14,25 @@ export_plots: true disable_version_detection: true -log_filesize_limit: 5000000000 # 5GB +run_module: + - xenium + +module_order: + - xenium -# run_modules: -# - xenium +log_filesize_limit: 5000000000 # 5GB -# module_order: -# - xenium +sp: + cell_feature_matrix: + fn: cell_feature_matrix.h5 + cells: + fn: cells.parquet + experiment: + fn: experiment.xenium + num_lines: 50 + metrics: + contents: num_cells_detected + fn: metrics_summary.csv + num_lines: 5 + transcripts: + fn: transcripts.parquet diff --git a/modules.json b/modules.json index 2f33c535..879d22a8 100644 --- a/modules.json +++ b/modules.json @@ -13,7 +13,7 @@ }, "multiqc": { "branch": "master", - "git_sha": "a4488d3d09244f29fb4606ba4eef85d59dcc6ad8", + "git_sha": "e10b76ca0c66213581bec2833e30d31f239dec0b", "installed_by": ["modules"] }, "untar": { diff --git a/modules/local/spatialdata/merge/main.nf b/modules/local/spatialdata/merge/main.nf index ec4d36f5..8f524734 100644 --- a/modules/local/spatialdata/merge/main.nf +++ b/modules/local/spatialdata/merge/main.nf @@ -10,7 +10,7 @@ process SPATIALDATA_MERGE { output: tuple val(meta), path("spatialdata_merged"), emit: merged_bundle - path("versions.yml") , emit: versions + path("versions.yml") , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/spatialdata/merge/templates/merge.py b/modules/local/spatialdata/merge/templates/merge.py index de2f6c4c..6bf908ce 100755 --- a/modules/local/spatialdata/merge/templates/merge.py +++ b/modules/local/spatialdata/merge/templates/merge.py @@ -12,7 +12,7 @@ def main(): reference_bundle = "${ref_bundle}" add_bundle = "${add_bundle}" - output_folder = "./spatialdata_spatialxe" + output_folder = "./spatialdata_merged" # Ensure the output folder exists if os.path.exists(output_folder): diff --git a/modules/local/spatialdata/meta/main.nf b/modules/local/spatialdata/meta/main.nf index 428ebbb7..ac3c9278 100644 --- a/modules/local/spatialdata/meta/main.nf +++ b/modules/local/spatialdata/meta/main.nf @@ -28,8 +28,8 @@ process SPATIALDATA_META { stub: """ - mkdir -p "spatialdata_spatialxe_final/" - touch "spatialdata_spatialxe_final/fake_file.txt" + mkdir -p "spatialdata_meta/" + touch "spatialdata_meta/fake_file.txt" cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/local/spatialdata/meta/templates/meta.py b/modules/local/spatialdata/meta/templates/meta.py index 91da08af..5c181505 100755 --- a/modules/local/spatialdata/meta/templates/meta.py +++ b/modules/local/spatialdata/meta/templates/meta.py @@ -12,7 +12,7 @@ def main(): spatialdata_bundle = "${spatialdata_bundle}" xenium_bundle = "${xenium_bundle}" metadata = "${meta}" - output = "spatialdata_spatialxe_final" + output = "spatialdata_meta" sdata = sd.read_zarr(f"{spatialdata_bundle}") diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index f8937048..dd513cbd 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::multiqc=1.30 + - bioconda::multiqc=1.31 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 67460de9..5288f5cc 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -3,8 +3,8 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.30--pyhdfd78af_1' : - 'biocontainers/multiqc:1.30--pyhdfd78af_1' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/ef/eff0eafe78d5f3b65a6639265a16b89fdca88d06d18894f90fcdb50142004329/data' : + 'community.wave.seqera.io/library/multiqc:1.31--1efbafd542a23882' }" input: path multiqc_files, stageAs: "?/*" diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index 0d3f288b..17881d15 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -2,14 +2,14 @@ "multiqc_versions_single": { "content": [ [ - "versions.yml:md5,e65ce731db2128b8e4dd43d6e880fc1c" + "versions.yml:md5,8968b114a3e20756d8af2b80713bcc4f" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.3" + "nextflow": "25.04.6" }, - "timestamp": "2025-07-10T08:06:23.563041241" + "timestamp": "2025-09-08T20:57:36.139055243" }, "multiqc_stub": { "content": [ @@ -17,25 +17,25 @@ "multiqc_report.html", "multiqc_data", "multiqc_plots", - "versions.yml:md5,e65ce731db2128b8e4dd43d6e880fc1c" + "versions.yml:md5,8968b114a3e20756d8af2b80713bcc4f" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.3" + "nextflow": "25.04.6" }, - "timestamp": "2025-07-10T08:06:48.96226832" + "timestamp": "2025-09-08T20:59:15.142230631" }, "multiqc_versions_config": { "content": [ [ - "versions.yml:md5,e65ce731db2128b8e4dd43d6e880fc1c" + "versions.yml:md5,8968b114a3e20756d8af2b80713bcc4f" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.3" + "nextflow": "25.04.6" }, - "timestamp": "2025-07-10T08:06:40.627008706" + "timestamp": "2025-09-08T20:58:29.629087066" } -} +} \ No newline at end of file diff --git a/nf-test.config b/nf-test.config deleted file mode 100644 index 3a1fff59..00000000 --- a/nf-test.config +++ /dev/null @@ -1,24 +0,0 @@ -config { - // location for all nf-test tests - testsDir "." - - // nf-test directory including temporary files for each test - workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" - - // location of an optional nextflow.config file specific for executing tests - configFile "tests/nextflow.config" - - // ignore tests coming from the nf-core/modules repo - ignore 'modules/nf-core/**/tests/*', 'subworkflows/nf-core/**/tests/*' - - // run all test with defined profile(s) from the main nextflow.config - profile "test" - - // list of filenames or patterns that should be trigger a full test run - triggers 'nextflow.config', 'nf-test.config', 'conf/test.config', 'tests/nextflow.config', 'tests/.nftignore' - - // load the necessary plugins - plugins { - load "nft-utils@0.0.3" - } -} diff --git a/subworkflows/local/ficture_preprocess_model/meta.yml b/subworkflows/local/ficture_preprocess_model/meta.yml index e69de29b..0a970613 100644 --- a/subworkflows/local/ficture_preprocess_model/meta.yml +++ b/subworkflows/local/ficture_preprocess_model/meta.yml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "ficture_preprocess_model" +description: Scalable segmentation-free analysis of sub-micron resolution spatial transcriptomics +keywords: + - ficture + - ficture preprocess + - segmentation-free analysis + - pixel level factor analysis +components: + - ficture/preprocess + - ficture + - parquet/to/csv +input: + - ch_transcripts_parquet: + description: | + file containing the molecular or pixel level information, the required columns are X, Y, gene, and Count + Structure: [ val(meta), path("transcripts.parquet") ] + - ch_features: + description: | + unique names of genes that should be used in analysis + Structure: [ [gene1,gene2,gene3,gene4] ] +output: + - transcripts: + description: xyz + - coordinate_minmax: + description: xyz + - features: + description: xyz + - results: + description: xyz + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/segger_create_train_predict/main.nf b/subworkflows/local/segger_create_train_predict/main.nf index b3be0a2a..f0a95414 100644 --- a/subworkflows/local/segger_create_train_predict/main.nf +++ b/subworkflows/local/segger_create_train_predict/main.nf @@ -12,9 +12,9 @@ workflow SEGGER_CREATE_TRAIN_PREDICT { take: - ch_basedir // channel: [ val(meta), [ "basedir" ] ] - ch_transcripts_parquet // channel: [ val(meta), [bundle + "/transcripts.parquet"]] ch_bundle // channel: [ val(meta), ["path-to-xenium-bundle"] ] + ch_transcripts_parquet // channel: [ val(meta), [bundle + "/transcripts.parquet"]] + main: @@ -26,7 +26,7 @@ workflow SEGGER_CREATE_TRAIN_PREDICT { ch_coordinate_space = Channel.value("pixels") // create dataset - SEGGER_CREATE_DATASET ( ch_basedir ) + SEGGER_CREATE_DATASET ( ch_bundle ) ch_versions = ch_versions.mix ( SEGGER_CREATE_DATASET.out.versions ) // train a model with the dataset created diff --git a/subworkflows/local/segger_create_train_predict/meta.yml b/subworkflows/local/segger_create_train_predict/meta.yml index e69de29b..7db69d19 100644 --- a/subworkflows/local/segger_create_train_predict/meta.yml +++ b/subworkflows/local/segger_create_train_predict/meta.yml @@ -0,0 +1,59 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "segger_create_train_predict" +description: | + segger is a cutting-edge tool for cell segmentation in single-molecule spatial omics datasets, + subworkflow is the implementation of segger modules run in the recommended sequence +keywords: + - segger + - segmentation + - xeniumranger import-segmentation + - coordinate-based segmentation +components: + - segger + - segger/create/dataset + - segger/train + - segger/predict + - segger2xr + - xeniumranger/import/segmentation +input: + - ch_bundle_path: + description: | + Directory containing the raw dataset - xenium bundle (e.g., transcripts, boundaries). + Structure: [ val(meta), path("path-to-xenium-bundle") ] + - ch_transcripts_parquet: + description: | + input parquet file from the xenium bundle + Structure: [ val(meta), path("path-to-transcripts.parquet") ] +output: + - datasetdir: + description: | + Directory generated by the segger create dataset module + Structure: [ val(meta), path(datasetdir) ] + - trained_models: + description: | + The model trained on the data by the segger training module + Structure: [ val(meta), path(trained_models) ] + - benchmarks: + description: | + benchmarks generated from the segger training and prediction steps + Structure: [ val(meta), path(benchmarks) ] + - segger_transcripts: + description: | + transcripts parquet file generated after segger prediction conatining the segger ids + Structure: [ path(transcripts.parquet) ] + - coordinate_space: + description: | + the coordinate space in which xeniumranger import-segmentation was run + Structure: [ val("pixels") ] + - redefined_bundle: + description: | + the redefined xenium bundle generated with the segmentation results from baysor + Structure: [ val(meta), ["redefined-xenium-bundle"] ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/spatialdata_write_meta_merge/main.nf b/subworkflows/local/spatialdata_write_meta_merge/main.nf index de9bd8b5..47bc385b 100644 --- a/subworkflows/local/spatialdata_write_meta_merge/main.nf +++ b/subworkflows/local/spatialdata_write_meta_merge/main.nf @@ -23,36 +23,23 @@ workflow SPATIALDATA_WRITE_META_MERGE { if ( params.mode == 'image') { if ( params.nucleus_segmentation_only && params.cell_segmentation_only ) { - ch_segmented_object = Channel.value('cells_and_nuclei') - } - else if ( params.nucleus_segmentation_only ) { - ch_segmented_object = Channel.value('nuclei') - } - else if ( params.cell_segmentation_only ) { - ch_segmented_object = Channel.value('cells') - } else { - ch_segmented_object = Channel.value([]) - } } // set all boundaries as false - default if ( params.mode == 'coordinate') { - ch_segmented_object = Channel.value([]) - } - // write spatialdata object from the raw xenium bundle SPATIALDATA_WRITE_RAW_BUNDLE ( ch_bundle_path, diff --git a/subworkflows/local/spatialdata_write_meta_merge/meta.yml b/subworkflows/local/spatialdata_write_meta_merge/meta.yml index e69de29b..f8bfa2c4 100644 --- a/subworkflows/local/spatialdata_write_meta_merge/meta.yml +++ b/subworkflows/local/spatialdata_write_meta_merge/meta.yml @@ -0,0 +1,54 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "spatialdata_write_meta_merge" +description: | + SpatialData is a data framework that comprises a FAIR storage format and a collection of python libraries for + performant access, alignment, and processing of uni- and multi-modal spatial omics datasets +keywords: + - spatialdata + - xenium + - xeniumranger import-segmentation + - spatialdata object + - metadata + - merge spatialdata objects +components: + - spatialdata/write + - spatialdata/meta + - spatialdata/merge +input: + - ch_bundle_path: + description: | + Directory containing the raw dataset + Structure: [ val(meta), path("path-to-xenium-bundle") ] + - ch_redefined_bundle: + description: | + Directory containing the redefined xenium bundle after running xeniumranger import-segmentation + Structure: [ val(meta), path("redefined-xenium-bundle") ] + - ch_coordinate_space: + description: | + the coordinate space in which xeniumranger import-segmentation was run + Structure: [ val("pixels" or "microns") ] +output: + - sd_raw_bundle: + description: | + spatialdata object generated from the raw xenium bundle + Structure: [ val(meta), path(spatialdata_raw) ] + - sd_redefined_bundle: + description: | + spatialdata object generated from the redefined xenium bundle + Structure: [ val(meta), path(spatialdata_redefined) ] + - sd_merged_bundle: + description: | + spatialdata object generated from merging the spatialdata objects from raw and redefined xenium bundles + Structure: [ val(meta), path(spatialdata_merged) ] + - sd_metadata: + description: | + spatialdata object containing the metadata info. + Structure: [ path(transcripts.parquet) ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/main.nf b/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/main.nf index 766e119e..937662f7 100644 --- a/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/main.nf +++ b/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/main.nf @@ -97,10 +97,10 @@ workflow XENIUMRANGER_IMPORT_SEGMENTATION_REDEFINE_BUNDLE { emit: - coordinate_space = ch_coordinate_space // channel: [ ["pixels"] ] - redefined_bundle = ch_redefined_bundle // channel: [ val(meta), ["redefined-xenium-bundle"] ] + coordinate_space = ch_coordinate_space // channel: [ ["pixels"] ] + versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/meta.yml b/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/meta.yml index e69de29b..a4be036f 100644 --- a/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/meta.yml +++ b/subworkflows/local/xeniumranger_import_segmentation_redefine_bundle/meta.yml @@ -0,0 +1,36 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "xeniumranger_import_segmentation_redefine_bundle" +description: | + The import-segmentation pipeline allows you to specify 2D nuclei and/or cell segmentation results to use for + assigning transcripts to cells and recalculate all Xenium Onboard Analysis (XOA) outputs that depend on segmentation. +keywords: + - xenium + - xeniumranger import-segmentation + - qupath + - expansion distance + - segmentation + - polygons +components: + - xeniumranger/import/segmentation +input: + - ch_bundle_path: + description: | + Directory containing the raw dataset + Structure: [ val(meta), path("path-to-xenium-bundle") ] +output: + - redefined_bundle: + description: | + the redefined xenium bundle generated with the segmentation results from baysor + Structure: [ val(meta), ["redefined-xenium-bundle"] ] + - coordinate_space: + description: | + the coordinate space in which xeniumranger import-segmentation was run + Structure: [ val("microns") ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/xeniumranger_relabel_resegment/meta.yml b/subworkflows/local/xeniumranger_relabel_resegment/meta.yml index e69de29b..d8628f4d 100644 --- a/subworkflows/local/xeniumranger_relabel_resegment/meta.yml +++ b/subworkflows/local/xeniumranger_relabel_resegment/meta.yml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "xeniumranger_relabel_resegment" +description: | + The relabel pipeline allows you to change the gene labels applied to decoded transcripts. + The resegment pipeline allows you to generate a new segmentation of the morphology image space by rerunning the + Xenium Onboard Analysis (XOA) segmentation algorithms with modified parameters. +keywords: + - xenium + - xeniumranger resegment + - expansion distance + - gene panel + - relabel +components: + - xeniumranger/relabel + - xeniumranger/resegment +input: + - ch_bundle_path: + description: | + Directory containing the raw dataset + Structure: [ val(meta), path("path-to-xenium-bundle") ] + - ch_gene_panel: + description: | + The gene panel JSON file to use for relabeling decoded transcripts + Structure: [ path("path-to-gene_panel.json") ] +output: + - redefined_bundle: + description: | + the redefined xenium bundle generated with the segmentation results from baysor + Structure: [ val(meta), ["redefined-xenium-bundle"] ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/main.nf b/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/main.nf index c41e8bdb..55dbe256 100644 --- a/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/main.nf +++ b/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/main.nf @@ -50,10 +50,10 @@ workflow XENIUMRANGER_RESEGMENT_MORPHOLOGY_OME_TIF { emit: - coordinate_space = ch_coordinate_space // channel: [ ["pixels"] ] - redefined_bundle = ch_redefined_bundle // channel: [ val(meta), ["redefined-xenium-bundle"] ] + coordinate_space = ch_coordinate_space // channel: [ ["pixels"] ] + versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/meta.yml b/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/meta.yml index e69de29b..db6a07a8 100644 --- a/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/meta.yml +++ b/subworkflows/local/xeniumranger_resegment_morphology_ome_tif/meta.yml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "xeniumranger_resegment_morphology_ome_tif" +description: | + The resegment pipeline allows you to generate a new segmentation of the morphology image space by rerunning the + Xenium Onboard Analysis (XOA) segmentation algorithms with modified parameters. +keywords: + - xenium + - xeniumranger resegment + - xeniumranger import-segmentation + - expansion distance + - cell segmentation + - nucleus segmentation +components: + - xeniumranger/import/segmentation + - xeniumranger/resegment +input: + - ch_bundle_path: + description: | + Directory containing the raw dataset + Structure: [ val(meta), path("path-to-xenium-bundle") ] +output: + - redefined_bundle: + description: | + the redefined xenium bundle generated with the segmentation results from baysor + Structure: [ val(meta), ["redefined-xenium-bundle"] ] + - coordinate_space: + description: | + the coordinate space in which xeniumranger import-segmentation was run + Structure: [ val("pixels") ] + - versions: + description: | + Files containing software versions + Structure: [ path(versions.yml) ] +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/tests/default.nf.test b/tests/default.nf.test deleted file mode 100644 index 112ad756..00000000 --- a/tests/default.nf.test +++ /dev/null @@ -1,71 +0,0 @@ -nextflow_pipeline { - - name "Test pipeline for spatialxe" - script "../main.nf" - tag "pipeline" - tag "image-based segmentation" - tag "transcripts-based segmentation" - tag "xeniumranger" - config "../conf/test.config" - - test("Params: --mode 'coordinate'") { - - when { - params { - outdir = "$outputDir" - test_data_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe' - } - } - - then { - // stable_name: All files + folders in ${params.outdir}/ with a stable name - def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) - // stable_path: All files in ${params.outdir}/ with stable content - def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') - assertAll( - { assert workflow.success }, - { assert snapshot( - // Number of successful tasks - workflow.trace.succeeded().size(), - // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/nf_core_spatialxe_software_mqc_versions.yml"), - // All stable path name, with a relative path - stable_name, - // All files with stable contents - stable_path - ).match() } - ) - } - } - test("-stub") { - - options "-stub" - - when { - params { - outdir = "$outputDir" - test_data_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe' - } - } - - then { - // stable_name: All files + folders in ${params.outdir}/ with a stable name - def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) - // stable_path: All files in ${params.outdir}/ with stable content - def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') - assertAll( - { assert workflow.success }, - { assert snapshot( - // Number of successful tasks - workflow.trace.succeeded().size(), - // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/nf_core_spatialxe_software_mqc_versions.yml"), - // All stable path name, with a relative path - stable_name, - // All files with stable contents - stable_path - ).match() } - ) - } - } -} diff --git a/tests/nextflow.config b/tests/nextflow.config deleted file mode 100644 index eff6fcbb..00000000 --- a/tests/nextflow.config +++ /dev/null @@ -1,13 +0,0 @@ -/* -======================================================================================== - Nextflow config file for running nf-test tests -======================================================================================== -*/ - -// Or any resources requirements -params { - modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' - pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/spatialxe' -} - -aws.client.anonymous = true // fixes S3 access issues on self-hosted runners diff --git a/workflows/spatialxe.nf b/workflows/spatialxe.nf index f914f98e..d062aa1b 100644 --- a/workflows/spatialxe.nf +++ b/workflows/spatialxe.nf @@ -341,8 +341,7 @@ workflow SPATIALXE { SEGGER_CREATE_TRAIN_PREDICT ( ch_bundle_path, - ch_transcripts_parquet, - ch_bundle_path + ch_transcripts_parquet ) ch_redefined_bundle = SEGGER_CREATE_TRAIN_PREDICT.out.redefined_bundle ch_coordinate_space = SEGGER_CREATE_TRAIN_PREDICT.out.coordinate_space @@ -488,6 +487,13 @@ workflow SPATIALXE { ) ) + // get all files from the redefined bundle + ch_redefined_bundle_files = ch_redefined_bundle.flatMap { _meta, path -> + file("${path}/*") + } + + ch_multiqc_files = ch_multiqc_files.mix ( ch_redefined_bundle_files.collect() ) + MULTIQC ( ch_multiqc_files.collect(), ch_multiqc_config.toList(), From b71eee5e58596a97c31aea8a55395069d8d1d911 Mon Sep 17 00:00:00 2001 From: Sameesh Kher Date: Wed, 10 Sep 2025 11:43:21 +0000 Subject: [PATCH 8/8] fix for ro-crate --- ro-crate-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index fe18ddbf..915409d1 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -23,7 +23,7 @@ "@type": "Dataset", "creativeWorkStatus": "InProgress", "datePublished": "2025-09-09T21:16:18+00:00", - "description": "

\n \n \n \"nf-core/spatialxe\"\n \n

\n\n[![GitHub Actions CI Status](https://github.com/nf-core/spatialxe/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-core/spatialxe/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/spatialxe/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/spatialxe/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/spatialxe/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.10.5-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.3.2-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.3.2)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/spatialxe)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23spatialxe-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/spatialxe)[![Follow on Bluesky](https://img.shields.io/badge/bluesky-%40nf__core-1185fe?labelColor=000000&logo=bluesky)](https://bsky.app/profile/nf-co.re)[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core)\n\n## Introduction\n\n**nf-core/spatialxe** is a bioinformatics best-practice processing and quality control pipeline for Xenium data. **The pipeline is currently under developement and not completed yet!**. The current plan for the pipeline implementation is shown in the metromap below. Please note that the pipeline steps and methods might change as we move forward in the development cycle.\n\n![nf-core/spatialxe-metromap](docs/images/spatialxe-metromap.png)\n\n\n\n## Usage\n\nOn release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources. The results obtained from the full-sized test can be viewed on the [nf-core website](https://nf-co.re/spatialxe/results).\n\n## Pipeline summary\n\n## Quick Start\n\n`samplesheet.csv`:\n\n```csv\nsample,bundle,image\ntest_sample,/path/to/xenium-bundle,/path/to/morphology.ome.tif\n```\n\nNow, you can run the pipeline using:\n\n\n\n## Run image-based segmentation mode
\n\n`CELLPOSE -> BAYSOR -> XR-IMPORT_SEGMENTATION -> SPATIALDATA -> QC`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode image\n```\n\n## Run coordinate-based segmentation mode
\n\n`PROSEG -> PROSEG2BAYSOR -> XR-IMPORT_SEGMENTATION -> SPATIALDATA -> QC`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode coordinate\n```\n\n## Run segfree mode
\n\n`BAYSOR_SEGFREE`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode segfree\n```\n\n## Run preview mode
\n\n`BAYSOR_PREVIEW`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode preview\n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\nFor more details and further functionality, please refer to the [usage documentation](https://nf-co.re/spatialxe/usage) and the [parameter documentation](https://nf-co.re/spatialxe/parameters).\n\n## Pipeline output\n\nTo see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/spatialxe/results) tab on the nf-core website pipeline page.\nFor more details about the output files and reports, please refer to the\n[output documentation](https://nf-co.re/spatialxe/output).\n\n## Credits\n\nnf-core/spatialxe was originally written by [Sameesh Kher](https://github.com/khersameesh24) and [Florian Heyl](https://github.com/heylf).\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- Tobias Krause\n- Kre\u0161imir Be\u0161tak (kbestak)\n- Matthias H\u00f6rtenhuber (mashehu)\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\nFor further information or help, don't hesitate to get in touch on the [Slack `#spatialxe` channel](https://nfcore.slack.com/channels/spatialxe) (you can join with [this invite](https://nf-co.re/join/slack)).\n\n## Citations\n\n\n\n\n\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nYou can cite the `nf-core` publication as follows:\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", + "description": "

\n \n \n \"nf-core/spatialxe\"\n \n

\n\n[![GitHub Actions CI Status](https://github.com/nf-core/spatialxe/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-core/spatialxe/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/spatialxe/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/spatialxe/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/spatialxe/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.10.5-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.3.2-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.3.2)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/spatialxe)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23spatialxe-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/spatialxe)[![Follow on Bluesky](https://img.shields.io/badge/bluesky-%40nf__core-1185fe?labelColor=000000&logo=bluesky)](https://bsky.app/profile/nf-co.re)[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core)\n\n## Introduction\n\n**nf-core/spatialxe** is a bioinformatics best-practice processing and quality control pipeline for Xenium data. **The pipeline is currently under developement and not completed yet!**. The current plan for the pipeline implementation is shown in the metromap below. Please note that the pipeline steps and methods might change as we move forward in the development cycle.\n\n![nf-core/spatialxe-metromap](docs/images/spatialxe-metromap.png)\n\n## Usage\n\nOn release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources. The results obtained from the full-sized test can be viewed on the [nf-core website](https://nf-co.re/spatialxe/results).\n\n## Pipeline summary\n\n## Quick Start\n\n`samplesheet.csv`:\n\n```csv\nsample,bundle,image\ntest_sample,/path/to/xenium-bundle,/path/to/morphology.ome.tif\n```\n\nNow, you can run the pipeline using:\n\n## Run image-based segmentation mode
\n\n`CELLPOSE -> BAYSOR -> XR-IMPORT_SEGMENTATION -> SPATIALDATA -> QC`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode \n```\n\n## Run coordinate-based segmentation mode
\n\n`PROSEG -> PROSEG2BAYSOR -> XR-IMPORT_SEGMENTATION -> SPATIALDATA -> QC`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode coordinate\n```\n\n## Run segfree mode
\n\n`BAYSOR_SEGFREE`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode segfree\n```\n\n## Run preview mode
\n\n`BAYSOR_PREVIEW`\n\n```bash\nnextflow run nf-core/spatialxe \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \\\n --mode preview\n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\nFor more details and further functionality, please refer to the [usage documentation](https://nf-co.re/spatialxe/usage) and the [parameter documentation](https://nf-co.re/spatialxe/parameters).\n\n## Pipeline output\n\nTo see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/spatialxe/results) tab on the nf-core website pipeline page.\nFor more details about the output files and reports, please refer to the\n[output documentation](https://nf-co.re/spatialxe/output).\n\n## Credits\n\nnf-core/spatialxe was originally written by [Sameesh Kher](https://github.com/khersameesh24) and [Florian Heyl](https://github.com/heylf).\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- Tobias Krause\n- Kre\u0161imir Be\u0161tak (kbestak)\n- Matthias H\u00f6rtenhuber (mashehu)\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\nFor further information or help, don't hesitate to get in touch on the [Slack `#spatialxe` channel](https://nfcore.slack.com/channels/spatialxe) (you can join with [this invite](https://nf-co.re/join/slack)).\n\n## Citations\n\n\n\n\n\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nYou can cite the `nf-core` publication as follows:\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", "hasPart": [ { "@id": "main.nf"