From a08873aa31a0489d6dfcdc34f323e8b05671c68d Mon Sep 17 00:00:00 2001 From: dariarom94 Date: Fri, 19 Jun 2026 19:01:51 +0200 Subject: [PATCH 1/5] adjust mem --- src/datasets/loaders/bruker_cosmx/config.vsh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datasets/loaders/bruker_cosmx/config.vsh.yaml b/src/datasets/loaders/bruker_cosmx/config.vsh.yaml index 5fd748df..2fee3340 100644 --- a/src/datasets/loaders/bruker_cosmx/config.vsh.yaml +++ b/src/datasets/loaders/bruker_cosmx/config.vsh.yaml @@ -76,4 +76,4 @@ runners: - type: executable - type: nextflow directives: - label: [midmem, midcpu, hightime] + label: [highmem, midcpu, hightime] From 5a3814041356153bf56b1c8faed0f87979422c75 Mon Sep 17 00:00:00 2001 From: dariarom94 Date: Sat, 20 Jun 2026 09:03:04 +0200 Subject: [PATCH 2/5] fix FOVs --- src/datasets/loaders/allen_brain_cell_atlas_merfish/script.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/datasets/loaders/allen_brain_cell_atlas_merfish/script.py b/src/datasets/loaders/allen_brain_cell_atlas_merfish/script.py index 1469e2c4..01afc383 100644 --- a/src/datasets/loaders/allen_brain_cell_atlas_merfish/script.py +++ b/src/datasets/loaders/allen_brain_cell_atlas_merfish/script.py @@ -344,7 +344,9 @@ def um_to_px_y(y): fov_img = fov_img[:, OVERLAP_SIZE:, :] xp += OVERLAP_SIZE - complete_img[:, xp:xp + fov_img.shape[1], yp:yp + fov_img.shape[2]] = fov_img + h = min(fov_img.shape[1], complete_img.shape[1] - xp) + w = min(fov_img.shape[2], complete_img.shape[2] - yp) + complete_img[:, xp:xp + h, yp:yp + w] = fov_img[:, :h, :w] if fov % 10 == 0: delete_dax_files() From 737e51f1fa9a997592aff5c33e4f794521a518e6 Mon Sep 17 00:00:00 2001 From: dariarom94 Date: Sat, 20 Jun 2026 09:04:47 +0200 Subject: [PATCH 3/5] fix mem config --- .../loaders/allen_brain_cell_atlas_merfish/config.vsh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datasets/loaders/allen_brain_cell_atlas_merfish/config.vsh.yaml b/src/datasets/loaders/allen_brain_cell_atlas_merfish/config.vsh.yaml index 8c7a249a..70061623 100644 --- a/src/datasets/loaders/allen_brain_cell_atlas_merfish/config.vsh.yaml +++ b/src/datasets/loaders/allen_brain_cell_atlas_merfish/config.vsh.yaml @@ -91,4 +91,4 @@ runners: - type: executable - type: nextflow directives: - label: [midmem, midcpu, hightime] + label: [highmem, midcpu, hightime] From a7519b661f31f0525965a17d2a96428a46097b38 Mon Sep 17 00:00:00 2001 From: dariarom94 Date: Sun, 21 Jun 2026 12:43:01 +0200 Subject: [PATCH 4/5] fix table/metadata label issue --- src/data_processors/process_dataset/script.py | 1 + src/methods_segmentation/binning/script.py | 4 ++-- src/methods_segmentation/cellpose/config.vsh.yaml | 6 +++--- src/methods_segmentation/cellpose/script.py | 4 ++-- src/methods_segmentation/custom_segmentation/script.py | 4 ++-- src/methods_segmentation/stardist/config.vsh.yaml | 6 +++--- src/methods_segmentation/stardist/script.py | 4 ++-- src/methods_segmentation/watershed/script.py | 4 ++-- src/methods_transcript_assignment/baysor/script_no_sopa.py | 2 +- src/methods_transcript_assignment/proseg/script_no_sopa.py | 2 +- 10 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/data_processors/process_dataset/script.py b/src/data_processors/process_dataset/script.py index be2c9705..5976079d 100644 --- a/src/data_processors/process_dataset/script.py +++ b/src/data_processors/process_dataset/script.py @@ -213,6 +213,7 @@ def subsample_adata_group_balanced(adata, group_key, n_samples, seed=0): if "metadata" not in sdata.tables: if "table" in sdata.tables: sdata["metadata"] = sdata["table"] + del sdata["table"] else: sdata["metadata"] = ad.AnnData(uns={}) diff --git a/src/methods_segmentation/binning/script.py b/src/methods_segmentation/binning/script.py index 2afc747c..44df8d73 100644 --- a/src/methods_segmentation/binning/script.py +++ b/src/methods_segmentation/binning/script.py @@ -49,8 +49,8 @@ def convert_to_lower_dtype(arr): parsed_data = Labels2DModel.parse(data_array, transformations=transformation) sd_output.labels['segmentation'] = parsed_data sd_output.tables['table'] = ad.AnnData( - obs=sdata.tables["table"].obs[["cell_id", "region"]], - var=sdata.tables["table"].var[[]] + obs=sdata.tables["metadata"].obs[["cell_id", "region"]], + var=sdata.tables["metadata"].var[[]] ) print("Writing output", flush=True) diff --git a/src/methods_segmentation/cellpose/config.vsh.yaml b/src/methods_segmentation/cellpose/config.vsh.yaml index f43d741b..35e6ef5d 100644 --- a/src/methods_segmentation/cellpose/config.vsh.yaml +++ b/src/methods_segmentation/cellpose/config.vsh.yaml @@ -79,8 +79,8 @@ resources: engines: - type: docker - #image: openproblems/base_pytorch_nvidia:1 # TODO: ideally get gpu image to work - image: openproblems/base_python:1 + image: openproblems/base_pytorch_nvidia:1 # TODO: ideally get gpu image to work + #image: openproblems/base_python:1 setup: - type: python pypi: cellpose<4.0.0 @@ -93,4 +93,4 @@ runners: - type: executable - type: nextflow directives: - label: [ midtime, midcpu, veryhighmem, gpu ] + label: [ midtime, midcpu, gpu ] diff --git a/src/methods_segmentation/cellpose/script.py b/src/methods_segmentation/cellpose/script.py index 9a4745cd..190f80da 100644 --- a/src/methods_segmentation/cellpose/script.py +++ b/src/methods_segmentation/cellpose/script.py @@ -48,8 +48,8 @@ def convert_to_lower_dtype(arr): sd_output.labels['segmentation'] = parsed_data sd_output.tables['table'] = ad.AnnData( - obs=sdata.tables["table"].obs[["cell_id", "region"]], - var=sdata.tables["table"].var[[]] + obs=sdata.tables["metadata"].obs[["cell_id", "region"]], + var=sdata.tables["metadata"].var[[]] ) print("Writing output", flush=True) diff --git a/src/methods_segmentation/custom_segmentation/script.py b/src/methods_segmentation/custom_segmentation/script.py index 8f6cb972..c108117f 100644 --- a/src/methods_segmentation/custom_segmentation/script.py +++ b/src/methods_segmentation/custom_segmentation/script.py @@ -26,8 +26,8 @@ }, tables={ "table": ad.AnnData( - obs=sdata.tables["table"].obs[["cell_id", "region"]], - var=sdata.tables["table"].var[[]] + obs=sdata.tables["metadata"].obs[["cell_id", "region"]], + var=sdata.tables["metadata"].var[[]] ) } ) diff --git a/src/methods_segmentation/stardist/config.vsh.yaml b/src/methods_segmentation/stardist/config.vsh.yaml index 9c17fcf6..cf26e63f 100644 --- a/src/methods_segmentation/stardist/config.vsh.yaml +++ b/src/methods_segmentation/stardist/config.vsh.yaml @@ -24,8 +24,8 @@ engines: # NOTE: On mac the tensorflow install leads to an error. Develop the method in a conda env instead (and test docker via gh-actions). # Installations can be done with pip (except tensorflow: use conda install -c conda-forge tensorflow) - type: docker - #image: openproblems/base_tensorflow_nvidia:1 # TODO: ideally get gpu image to work - image: openproblems/base_python:1 + image: openproblems/base_tensorflow_nvidia:1 # TODO: ideally get gpu image to work + #image: openproblems/base_python:1 __merge__: - /src/base/setup_spatialdata_partial.yaml setup: @@ -41,4 +41,4 @@ runners: - type: executable - type: nextflow directives: - label: [ midtime, midcpu, highmem, gpu ] + label: [ midtime, midcpu, gpu ] diff --git a/src/methods_segmentation/stardist/script.py b/src/methods_segmentation/stardist/script.py index 968e5bbf..0bb0a179 100644 --- a/src/methods_segmentation/stardist/script.py +++ b/src/methods_segmentation/stardist/script.py @@ -78,8 +78,8 @@ def do_after(self): sd_output.labels['segmentation'] = parsed_labels sd_output.tables['table'] = ad.AnnData( - obs=sdata.tables["table"].obs[["cell_id", "region"]], - var=sdata.tables["table"].var[[]] + obs=sdata.tables["metadata"].obs[["cell_id", "region"]], + var=sdata.tables["metadata"].var[[]] ) print("Writing output", flush=True) diff --git a/src/methods_segmentation/watershed/script.py b/src/methods_segmentation/watershed/script.py index 30045ba6..9b6aca07 100644 --- a/src/methods_segmentation/watershed/script.py +++ b/src/methods_segmentation/watershed/script.py @@ -49,8 +49,8 @@ def convert_to_lower_dtype(arr): sd_output.labels['segmentation'] = parsed_data sd_output.tables['table'] = ad.AnnData( - obs=sdata.tables["table"].obs[["cell_id", "region"]], - var=sdata.tables["table"].var[[]] + obs=sdata.tables["metadata"].obs[["cell_id", "region"]], + var=sdata.tables["metadata"].var[[]] ) print("Writing output", flush=True) diff --git a/src/methods_transcript_assignment/baysor/script_no_sopa.py b/src/methods_transcript_assignment/baysor/script_no_sopa.py index f105fdb2..35544ef6 100644 --- a/src/methods_transcript_assignment/baysor/script_no_sopa.py +++ b/src/methods_transcript_assignment/baysor/script_no_sopa.py @@ -177,7 +177,7 @@ def convert_str_ids_to_ints(df, file_path_for_error_messages=None): tables={ "table": ad.AnnData( obs=pd.DataFrame(cell_id_col), - var=sdata.tables["table"].var[[]] + var=sdata.tables["metadata"].var[[]] ) } ) diff --git a/src/methods_transcript_assignment/proseg/script_no_sopa.py b/src/methods_transcript_assignment/proseg/script_no_sopa.py index b9008fb3..80dac031 100644 --- a/src/methods_transcript_assignment/proseg/script_no_sopa.py +++ b/src/methods_transcript_assignment/proseg/script_no_sopa.py @@ -132,7 +132,7 @@ tables={ "table": ad.AnnData( obs=pd.DataFrame(cell_id_col), - var=sdata.tables["table"].var[[]] + var=sdata.tables["metadata"].var[[]] ) } ) From 24bf60016d745205e77009b73042275958127da9 Mon Sep 17 00:00:00 2001 From: dariarom94 Date: Sun, 21 Jun 2026 12:43:27 +0200 Subject: [PATCH 5/5] config to gpu --- src/methods_segmentation/cellpose/config.vsh.yaml | 2 +- src/methods_segmentation/stardist/config.vsh.yaml | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/methods_segmentation/cellpose/config.vsh.yaml b/src/methods_segmentation/cellpose/config.vsh.yaml index 35e6ef5d..1187c12a 100644 --- a/src/methods_segmentation/cellpose/config.vsh.yaml +++ b/src/methods_segmentation/cellpose/config.vsh.yaml @@ -93,4 +93,4 @@ runners: - type: executable - type: nextflow directives: - label: [ midtime, midcpu, gpu ] + label: [ midtime, midcpu, highmem, gpu ] diff --git a/src/methods_segmentation/stardist/config.vsh.yaml b/src/methods_segmentation/stardist/config.vsh.yaml index cf26e63f..5b5207c0 100644 --- a/src/methods_segmentation/stardist/config.vsh.yaml +++ b/src/methods_segmentation/stardist/config.vsh.yaml @@ -30,15 +30,14 @@ engines: - /src/base/setup_spatialdata_partial.yaml setup: - type: python - pypi: stardist - - type: python - pypi: numpy<2.0.0 - - type: python - pypi: tensorflow + pypi: + - stardist + - tensorflow==2.17.0 + - numpy<2.0.0 - type: native runners: - type: executable - type: nextflow directives: - label: [ midtime, midcpu, gpu ] + label: [ hightime, midcpu, highmem, gpu ]