Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Hotfix to tackle some bugs
### `Added`

- Template update for nf-core/tools version 4.0.3
- Adding new conf/tests folder
- Adding new test for coordinate mode to check the bugfixes

### `Fixed`

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

include { BAYSOR_PREPROCESS_TRANSCRIPTS } from '../../../modules/local/baysor/preprocess/main'
include { BAYSOR_RUN } from '../../../modules/local/baysor/run/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'


workflow BAYSOR_RUN_PRIOR_SEGMENTATION_MASK {
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/baysor_run_transcripts_parquet/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include { BAYSOR_RUN } from '../../../modules/local/baysor
include { BAYSOR_PREPROCESS_TRANSCRIPTS } from '../../../modules/local/baysor/preprocess/main'
include { XENIUM_PATCH_STITCH } from '../../../modules/local/xenium_patch/stitch/main'
include { RECONSTRUCT_PATCHES } from '../../../modules/local/utility/reconstruct_patches/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'


workflow BAYSOR_RUN_TRANSCRIPTS_PARQUET {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include { XENIUM_PATCH_DIVIDE } from '../../../modules/local/xenium
include { BAYSOR_PREPROCESS_TRANSCRIPTS } from '../../../modules/local/baysor/preprocess/main'
include { BAYSOR_RUN } from '../../../modules/local/baysor/run/main'
include { XENIUM_PATCH_STITCH } from '../../../modules/local/xenium_patch/stitch/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'

workflow BAYSOR_RUN_TRANSCRIPTS_PARQUET_TILED {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include { CONVERT_MASK_UINT32 } from '../../../modules/local/utilit
include { BAYSOR_PREPROCESS_TRANSCRIPTS } from '../../../modules/local/baysor/preprocess/main'
include { RESIZE_TIF } from '../../../modules/local/utility/resize_tif/main'
include { GET_TRANSCRIPTS_COORDINATES } from '../../../modules/local/utility/get_coordinates/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'

workflow CELLPOSE_BAYSOR_IMPORT_SEGMENTATION {
take:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include { CELLPOSE as CELLPOSE_CELLS } from '../../../modules/nf-core/cell
include { EXTRACT_DAPI } from '../../../modules/local/utility/extract_dapi/main'
include { STARDIST as STARDIST_NUCLEI } from '../../../modules/nf-core/stardist/main'
include { CONVERT_MASK_UINT32 } from '../../../modules/local/utility/convert_mask_uint32/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'

workflow CELLPOSE_RESOLIFT_MORPHOLOGY_OME_TIF {
take:
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/proseg_preset_proseg2baysor/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

include { PROSEG } from '../../../modules/local/proseg/preset/main'
include { PROSEG2BAYSOR } from '../../../modules/local/proseg/proseg2baysor/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'

workflow PROSEG_PRESET_PROSEG2BAYSOR {
take:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include { XENIUM_PATCH_DIVIDE } from '../../../modules/local/xenium
include { PROSEG } from '../../../modules/local/proseg/preset/main'
include { PROSEG2BAYSOR } from '../../../modules/local/proseg/proseg2baysor/main'
include { XENIUM_PATCH_STITCH } from '../../../modules/local/xenium_patch/stitch/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'

workflow PROSEG_PRESET_PROSEG2BAYSOR_TILED {

Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/segger_create_train_predict/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include { SEGGER2XR } from '../../../modules/local/utilit
include { SEGGER_TRAIN } from '../../../modules/local/segger/train/main'
include { SEGGER_PREDICT } from '../../../modules/local/segger/predict/main'
include { SEGGER_CREATE_DATASET } from '../../../modules/local/segger/create_dataset/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'

workflow SEGGER_CREATE_TRAIN_PREDICT {
take:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include { RESOLIFT } from '../../../modules/local/resoli
include { EXTRACT_DAPI } from '../../../modules/local/utility/extract_dapi/main'
include { STARDIST as STARDIST_NUCLEI } from '../../../modules/nf-core/stardist/main'
include { CONVERT_MASK_UINT32 } from '../../../modules/local/utility/convert_mask_uint32/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'

workflow STARDIST_RESOLIFT_MORPHOLOGY_OME_TIF {
take:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

include { XENIUMRANGER_RESEGMENT } from '../../../modules/nf-core/xeniumranger/resegment/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'
include { XENIUMRANGER_IMPORTSEGMENTATION } from '../../../modules/nf-core/xeniumranger/importsegmentation/main'

workflow XENIUMRANGER_RESEGMENT_MORPHOLOGY_OME_TIF {
take:
Expand Down
40 changes: 40 additions & 0 deletions tests/.nftignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,43 @@ multiqc/multiqc_plots/{svg,pdf,png}/*.{svg,pdf,png}
multiqc/multiqc_report.html
pipeline_info/*.{html,json,txt,yml}
**/proseg/preset/**

# proseg2baysor re-serializes proseg's segmentation non-deterministically (geojson/csv);
# this propagates into every spatialdata bundle built from it
coordinate/proseg/proseg2baysor/test_run/cell-polygons.geojson
coordinate/proseg/proseg2baysor/test_run/transcript-metadata.csv
coordinate/spatialdata/write/spatialdata/test_run/raw_bundle/points/**
coordinate/spatialdata/write/spatialdata/test_run/raw_bundle/shapes/**
coordinate/spatialdata/write/spatialdata/test_run/raw_bundle/tables/**
coordinate/spatialdata/merge/spatialdata/test_run/merged_bundle/points/**
coordinate/spatialdata/merge/spatialdata/test_run/merged_bundle/shapes/**
coordinate/spatialdata/merge/spatialdata/test_run/merged_bundle/tables/**
coordinate/spatialdata/meta/spatialdata/test_run/metadata/points/**
coordinate/spatialdata/meta/spatialdata/test_run/metadata/shapes/**
coordinate/spatialdata/meta/spatialdata/test_run/metadata/tables/**

# xeniumranger's internal secondary analysis (clustering/PCA/UMAP/diffexp) and
# resegmentation are not run-to-run reproducible; only existence is checked
xeniumranger/test_run/**
coordinate/untar/test_run/**
coordinate/spatialdata/write/spatialdata/test_run/redefined_bundle/points/**
coordinate/spatialdata/write/spatialdata/test_run/redefined_bundle/shapes/**
coordinate/spatialdata/write/spatialdata/test_run/redefined_bundle/tables/**

# MultiQC pre/post-Xeniumranger reports embed non-deterministic run data
coordinate/multiqc/*/MultiQC-*-Xeniumranger-import-segmentation-Run_multiqc_report.html
coordinate/multiqc/*/MultiQC-*-Xeniumranger-import-segmentation-Run_multiqc_report_data/llms-full.txt
coordinate/multiqc/*/MultiQC-*-Xeniumranger-import-segmentation-Run_multiqc_report_data/multiqc.log
coordinate/multiqc/*/MultiQC-*-Xeniumranger-import-segmentation-Run_multiqc_report_data/multiqc.parquet
coordinate/multiqc/*/MultiQC-*-Xeniumranger-import-segmentation-Run_multiqc_report_data/multiqc_data.json
coordinate/multiqc/*/MultiQC-*-Xeniumranger-import-segmentation-Run_multiqc_report_data/multiqc_sources.txt

# OME-Zarr group metadata (member/channel ordering) is not written in a stable
# order across runs, both for the images subgroup and for each bundle's root
# store (which declares its images/points/shapes/tables members); the
# underlying pixel/array chunk data itself is unaffected
**/images/zarr.json
coordinate/spatialdata/write/spatialdata/test_run/raw_bundle/zarr.json
coordinate/spatialdata/write/spatialdata/test_run/redefined_bundle/zarr.json
coordinate/spatialdata/merge/spatialdata/test_run/merged_bundle/zarr.json
coordinate/spatialdata/meta/spatialdata/test_run/metadata/zarr.json
50 changes: 49 additions & 1 deletion tests/coordinate_mode.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,55 @@ nextflow_pipeline {
name "Test pipeline for the `coordinate` mode, test run the proseg subworkflow"
script "../main.nf"
tag "pipeline"
config "../conf/test_coordinate_mode.config"
config "../conf/tests/test_coordinate_mode.config"


test("-profile test") {

when {
params {
outdir = "$outputDir"
}
}

then {
// Stable_name: All files + folders in ${params.outdir}/ with a stable name.
// Zarr tables store one chunk file per obs/var column, leading to incoherent output files.
// Only the tables' existence is checked below instead.
// Xeniumranger's secondary analysis is skipped entirely on some runs (writing
// a single note.txt instead of the clustering/diffexp/pca/umap tree).
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: [
'pipeline_info/*.{html,json,txt}',
'**/proseg/preset/**',
'coordinate/spatialdata/write/spatialdata/test_run/raw_bundle/tables/**',
'coordinate/spatialdata/write/spatialdata/test_run/redefined_bundle/tables/**',
'coordinate/spatialdata/merge/spatialdata/test_run/merged_bundle/tables/**',
'coordinate/spatialdata/meta/spatialdata/test_run/metadata/tables/**',
'xeniumranger/test_run/**',
'coordinate/untar/test_run/**',
])
// 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(
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we test pipelines on multiple Nextflow versions
removeNextflowVersion("$outputDir/pipeline_info/nf_core_spatialaxe_software_mqc_versions.yml"),
// All stable path name, with a relative path
stable_name,
// All files with stable contents
stable_path
).match() },
{ assert file("$outputDir/coordinate/proseg/preset/test_run/proseg-output.zarr").exists() },
{ assert file("$outputDir/coordinate/spatialdata/write/spatialdata/test_run/raw_bundle/tables/table").exists() },
{ assert file("$outputDir/coordinate/spatialdata/write/spatialdata/test_run/redefined_bundle/tables/table").exists() },
{ assert file("$outputDir/coordinate/spatialdata/merge/spatialdata/test_run/merged_bundle/tables/raw_table").exists() },
{ assert file("$outputDir/coordinate/spatialdata/meta/spatialdata/test_run/metadata/tables/raw_table").exists() },
{ assert file("$outputDir/xeniumranger/test_run").exists() },
{ assert file("$outputDir/coordinate/untar/test_run").exists() },
)
}
}

test("-profile test stub") {

Expand Down
Loading
Loading