patchworks 0.11.1__tar.gz → 0.11.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. {patchworks-0.11.1 → patchworks-0.11.2}/PKG-INFO +1 -1
  2. {patchworks-0.11.1 → patchworks-0.11.2}/docs/guide/snakemake.md +5 -0
  3. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvbGFiZWxzLmRvbmU= +1 -0
  4. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvc2VnLzAuZG9uZQ== +1 -0
  5. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvc2VnLzEuZG9uZQ== +1 -0
  6. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvc2VnLzIuZG9uZQ== +1 -0
  7. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvc2VnLzMuZG9uZQ== +1 -0
  8. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvc2VnLzQuZG9uZQ== +1 -0
  9. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvc2VnLzUuZG9uZQ== +1 -0
  10. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvc2VnLzYuZG9uZQ== +1 -0
  11. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvc2VnLzcuZG9uZQ== +1 -0
  12. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvc3RhZ2UuemFycg== +1 -0
  13. patchworks-0.11.2/workflow/.snakemake/metadata/L3RtcC9wd193Zi9vdXQvdGlsZXMuanNvbg== +1 -0
  14. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/config/config.yaml +2 -0
  15. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/rules/common.smk +5 -0
  16. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/rules/convert.smk +2 -1
  17. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/rules/segment.smk +2 -2
  18. patchworks-0.11.2/workflow/scripts/convert.py +21 -0
  19. patchworks-0.11.1/workflow/.snakemake/metadata/L3RtcC90b3kvb3V0L2ltYWdlLnphcnI= +0 -1
  20. patchworks-0.11.1/workflow/.snakemake/metadata/L3RtcC90b3kvb3V0L2xhYmVscy5kb25l +0 -1
  21. patchworks-0.11.1/workflow/.snakemake/metadata/L3RtcC90b3kvb3V0L3N0YWdlLnphcnI= +0 -1
  22. patchworks-0.11.1/workflow/.snakemake/metadata/L3RtcC90b3kvb3V0L3NlZy80LmRvbmU= +0 -1
  23. patchworks-0.11.1/workflow/.snakemake/metadata/L3RtcC90b3kvb3V0L3NlZy8wLmRvbmU= +0 -1
  24. patchworks-0.11.1/workflow/.snakemake/metadata/L3RtcC90b3kvb3V0L3NlZy8xLmRvbmU= +0 -1
  25. patchworks-0.11.1/workflow/.snakemake/metadata/L3RtcC90b3kvb3V0L3NlZy8zLmRvbmU= +0 -1
  26. patchworks-0.11.1/workflow/.snakemake/metadata/L3RtcC90b3kvb3V0L3RpbGVzLmpzb24= +0 -1
  27. patchworks-0.11.1/workflow/scripts/convert.py +0 -15
  28. {patchworks-0.11.1 → patchworks-0.11.2}/.github/workflows/docs.yml +0 -0
  29. {patchworks-0.11.1 → patchworks-0.11.2}/.github/workflows/lint.yml +0 -0
  30. {patchworks-0.11.1 → patchworks-0.11.2}/.github/workflows/release.yml +0 -0
  31. {patchworks-0.11.1 → patchworks-0.11.2}/.gitignore +0 -0
  32. {patchworks-0.11.1 → patchworks-0.11.2}/.markdownlint-cli2.yaml +0 -0
  33. {patchworks-0.11.1 → patchworks-0.11.2}/README.md +0 -0
  34. {patchworks-0.11.1 → patchworks-0.11.2}/cliff.toml +0 -0
  35. {patchworks-0.11.1 → patchworks-0.11.2}/docs/api/chunks.md +0 -0
  36. {patchworks-0.11.1 → patchworks-0.11.2}/docs/api/cluster.md +0 -0
  37. {patchworks-0.11.1 → patchworks-0.11.2}/docs/api/io.md +0 -0
  38. {patchworks-0.11.1 → patchworks-0.11.2}/docs/api/merge_tile_labels.md +0 -0
  39. {patchworks-0.11.1 → patchworks-0.11.2}/docs/api/plugins/cellpose.md +0 -0
  40. {patchworks-0.11.1 → patchworks-0.11.2}/docs/api/plugins/napari.md +0 -0
  41. {patchworks-0.11.1 → patchworks-0.11.2}/docs/api/plugins/ome_zarr.md +0 -0
  42. {patchworks-0.11.1 → patchworks-0.11.2}/docs/api/relabel.md +0 -0
  43. {patchworks-0.11.1 → patchworks-0.11.2}/docs/api/tile_process.md +0 -0
  44. {patchworks-0.11.1 → patchworks-0.11.2}/docs/examples/cellpose_2d.md +0 -0
  45. {patchworks-0.11.1 → patchworks-0.11.2}/docs/examples/cellpose_2d.py +0 -0
  46. {patchworks-0.11.1 → patchworks-0.11.2}/docs/examples/cellpose_3d.md +0 -0
  47. {patchworks-0.11.1 → patchworks-0.11.2}/docs/examples/cellpose_3d.py +0 -0
  48. {patchworks-0.11.1 → patchworks-0.11.2}/docs/examples/custom.md +0 -0
  49. {patchworks-0.11.1 → patchworks-0.11.2}/docs/examples/custom_method.py +0 -0
  50. {patchworks-0.11.1 → patchworks-0.11.2}/docs/examples/standalone_merge.md +0 -0
  51. {patchworks-0.11.1 → patchworks-0.11.2}/docs/examples/stardist.md +0 -0
  52. {patchworks-0.11.1 → patchworks-0.11.2}/docs/examples/stardist_2d.py +0 -0
  53. {patchworks-0.11.1 → patchworks-0.11.2}/docs/getting_started.md +0 -0
  54. {patchworks-0.11.1 → patchworks-0.11.2}/docs/guide/gpu_distributed.md +0 -0
  55. {patchworks-0.11.1 → patchworks-0.11.2}/docs/guide/merging.md +0 -0
  56. {patchworks-0.11.1 → patchworks-0.11.2}/docs/guide/ome_zarr_napari.md +0 -0
  57. {patchworks-0.11.1 → patchworks-0.11.2}/docs/guide/performance.md +0 -0
  58. {patchworks-0.11.1 → patchworks-0.11.2}/docs/guide/pitfalls.md +0 -0
  59. {patchworks-0.11.1 → patchworks-0.11.2}/docs/guide/skip_empty.md +0 -0
  60. {patchworks-0.11.1 → patchworks-0.11.2}/docs/guide/tiling.md +0 -0
  61. {patchworks-0.11.1 → patchworks-0.11.2}/docs/index.md +0 -0
  62. {patchworks-0.11.1 → patchworks-0.11.2}/mkdocs.yml +0 -0
  63. {patchworks-0.11.1 → patchworks-0.11.2}/pyproject.toml +0 -0
  64. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/__init__.py +0 -0
  65. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/_chunks.py +0 -0
  66. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/_cluster.py +0 -0
  67. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/_core.py +0 -0
  68. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/_distributed.py +0 -0
  69. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/_io.py +0 -0
  70. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/_merge.py +0 -0
  71. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/_relabel.py +0 -0
  72. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/plugins/__init__.py +0 -0
  73. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/plugins/cellpose.py +0 -0
  74. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/plugins/napari.py +0 -0
  75. {patchworks-0.11.1 → patchworks-0.11.2}/src/patchworks/plugins/ome_zarr.py +0 -0
  76. {patchworks-0.11.1 → patchworks-0.11.2}/tests/test_core.py +0 -0
  77. {patchworks-0.11.1 → patchworks-0.11.2}/tests/test_distributed.py +0 -0
  78. {patchworks-0.11.1 → patchworks-0.11.2}/tests/test_napari.py +0 -0
  79. {patchworks-0.11.1 → patchworks-0.11.2}/tests/test_ome_zarr.py +0 -0
  80. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/README.md +0 -0
  81. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/Snakefile +0 -0
  82. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/pixi.toml +0 -0
  83. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/profile/slurm/config.yaml +0 -0
  84. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/rules/merge.smk +0 -0
  85. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/scripts/_pw.py +0 -0
  86. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/scripts/merge.py +0 -0
  87. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/scripts/prepare_tiles.py +0 -0
  88. {patchworks-0.11.1 → patchworks-0.11.2}/workflow/scripts/segment_tile.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: patchworks
3
- Version: 0.11.1
3
+ Version: 0.11.2
4
4
  Summary: Tiled processing of arbitrarily large images with globally consistent labels
5
5
  Project-URL: Homepage, https://github.com/imcf/patchworks
6
6
  Project-URL: Issues, https://github.com/imcf/patchworks/issues
@@ -174,6 +174,11 @@ Snakemake is resumable — if jobs fail or you cancel, just relaunch the same
174
174
  command and it picks up only the missing tiles. To force a clean rerun, delete
175
175
  `work_dir` (or the relevant outputs).
176
176
 
177
+ The OME-ZARR conversion is **not redone** once `image.zarr` exists: the
178
+ `convert` rule's output is a marker file inside the store, so Snakemake skips it
179
+ on every later run. To force a fresh conversion, delete `image.zarr` or run
180
+ `snakemake --forcerun convert`.
181
+
177
182
  ## pixi (instead of conda)
178
183
 
179
184
  Conda is **not** required — Snakemake runs in whatever environment launches it.
@@ -0,0 +1 @@
1
+ {"rule": "merge", "input": ["/tmp/pw_wf/out/seg/0.done", "/tmp/pw_wf/out/seg/1.done", "/tmp/pw_wf/out/seg/2.done", "/tmp/pw_wf/out/seg/3.done", "/tmp/pw_wf/out/seg/4.done", "/tmp/pw_wf/out/seg/5.done", "/tmp/pw_wf/out/seg/6.done", "/tmp/pw_wf/out/seg/7.done"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/merge.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289946198395, "starttime": 1782306826.05809, "endtime": 1782306826.057891, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/seg/0.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/pw_wf/out/seg/1.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/pw_wf/out/seg/2.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/pw_wf/out/seg/3.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/pw_wf/out/seg/4.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/pw_wf/out/seg/5.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/pw_wf/out/seg/6.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/pw_wf/out/seg/7.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}}
@@ -0,0 +1 @@
1
+ {"rule": "segment", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json", "/tmp/pw_wf/out/stage.zarr", "/tmp/pw_wf/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289938895482, "starttime": 1782306823.2564273, "endtime": 1782306823.255227, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/tiles.json": "sha256:d5abe0a9301e6274b02cdae545a8b5e414d3b51c1396d18ae9bcb1ea935bfe67", "/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -0,0 +1 @@
1
+ {"rule": "segment", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json", "/tmp/pw_wf/out/stage.zarr", "/tmp/pw_wf/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289938895635, "starttime": 1782306823.2361996, "endtime": 1782306823.2352273, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/tiles.json": "sha256:d5abe0a9301e6274b02cdae545a8b5e414d3b51c1396d18ae9bcb1ea935bfe67", "/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -0,0 +1 @@
1
+ {"rule": "segment", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json", "/tmp/pw_wf/out/stage.zarr", "/tmp/pw_wf/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289938895788, "starttime": 1782306820.7251186, "endtime": 1782306820.724245, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/tiles.json": "sha256:d5abe0a9301e6274b02cdae545a8b5e414d3b51c1396d18ae9bcb1ea935bfe67", "/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -0,0 +1 @@
1
+ {"rule": "segment", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json", "/tmp/pw_wf/out/stage.zarr", "/tmp/pw_wf/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289938792521, "starttime": 1782306820.8450873, "endtime": 1782306820.8442442, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/tiles.json": "sha256:d5abe0a9301e6274b02cdae545a8b5e414d3b51c1396d18ae9bcb1ea935bfe67", "/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -0,0 +1 @@
1
+ {"rule": "segment", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json", "/tmp/pw_wf/out/stage.zarr", "/tmp/pw_wf/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289938792674, "starttime": 1782306820.7828398, "endtime": 1782306820.7822447, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/tiles.json": "sha256:d5abe0a9301e6274b02cdae545a8b5e414d3b51c1396d18ae9bcb1ea935bfe67", "/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -0,0 +1 @@
1
+ {"rule": "segment", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json", "/tmp/pw_wf/out/stage.zarr", "/tmp/pw_wf/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289938792827, "starttime": 1782306823.5588164, "endtime": 1782306823.558225, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/tiles.json": "sha256:d5abe0a9301e6274b02cdae545a8b5e414d3b51c1396d18ae9bcb1ea935bfe67", "/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -0,0 +1 @@
1
+ {"rule": "segment", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json", "/tmp/pw_wf/out/stage.zarr", "/tmp/pw_wf/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289938792980, "starttime": 1782306823.0890763, "endtime": 1782306823.0882282, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/tiles.json": "sha256:d5abe0a9301e6274b02cdae545a8b5e414d3b51c1396d18ae9bcb1ea935bfe67", "/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -0,0 +1 @@
1
+ {"rule": "segment", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json", "/tmp/pw_wf/out/stage.zarr", "/tmp/pw_wf/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289938793133, "starttime": 1782306821.0048127, "endtime": 1782306821.0042431, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/tiles.json": "sha256:d5abe0a9301e6274b02cdae545a8b5e414d3b51c1396d18ae9bcb1ea935bfe67", "/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -0,0 +1 @@
1
+ {"rule": "prepare", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/prepare_tiles.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289946375343, "starttime": 1782306818.2703326, "endtime": 1782306818.2701185, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -0,0 +1 @@
1
+ {"rule": "prepare", "input": ["/tmp/pw_wf/out/image.zarr/zarr.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/prepare_tiles.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 8289946375343, "starttime": 1782306818.2703326, "endtime": 1782306818.2692626, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/pw_wf/out/image.zarr/zarr.json": "sha256:8baa9bb439818b6e4a5358464300e6239dae6fddb2b31fa26717a7c56eaf1458"}}
@@ -15,6 +15,8 @@ work_dir: "/path/to/results" # everything is written under here
15
15
  reuse_pyramid: true # for .ims: copy its own pyramid (fast); else rebuild
16
16
  convert_chunks: null # null → patchworks' bounded auto chunks; or [c,z,y,x]
17
17
  shard: false # true → pack chunks into shards (zarr v3; fewer files)
18
+ # Re-running reuses an existing image.zarr automatically (skips conversion).
19
+ # To force a rebuild: delete image.zarr, or `snakemake --forcerun convert`.
18
20
 
19
21
  # ---- tiling -----------------------------------------------------------------
20
22
  channel: 0 # channel to segment
@@ -2,6 +2,11 @@
2
2
 
3
3
  WORK = config["work_dir"]
4
4
  IMAGE = f"{WORK}/image.zarr"
5
+ # A single file inside the store, used as the convert rule's output and as the
6
+ # dependency marker for downstream rules. Tracking a leaf file (not the
7
+ # directory) lets Snakemake skip conversion when the store already exists and
8
+ # avoids wiping the whole store on a re-run (same trick as imcf/sopa).
9
+ IMAGE_OK = f"{IMAGE}/zarr.json"
5
10
  TILES = f"{WORK}/tiles.json"
6
11
  STAGE = f"{WORK}/stage.zarr"
7
12
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  rule convert:
4
4
  output:
5
- directory(IMAGE),
5
+ # marker file inside the store; existence => skip re-conversion.
6
+ IMAGE_OK,
6
7
  script:
7
8
  "../scripts/convert.py"
@@ -2,7 +2,7 @@
2
2
 
3
3
  checkpoint prepare:
4
4
  input:
5
- IMAGE,
5
+ IMAGE_OK,
6
6
  output:
7
7
  tiles=TILES,
8
8
  stage=directory(STAGE),
@@ -15,7 +15,7 @@ rule segment:
15
15
  input:
16
16
  tiles=TILES,
17
17
  stage=STAGE,
18
- image=IMAGE,
18
+ image=IMAGE_OK,
19
19
  output:
20
20
  f"{WORK}/seg/{{index}}.done",
21
21
  script:
@@ -0,0 +1,21 @@
1
+ """Snakemake script: convert the input to a pyramidal OME-ZARR.
2
+
3
+ The rule's output is a marker file inside the store (``image.zarr/zarr.json``),
4
+ so Snakemake skips this step entirely when the store already exists — the
5
+ conversion is not redone. To force a fresh conversion, delete ``image.zarr``
6
+ (or run ``snakemake --forcerun convert``).
7
+ """
8
+
9
+ from patchworks.plugins.ome_zarr import to_ome_zarr
10
+
11
+ cfg = snakemake.config # noqa: F821 (injected by Snakemake)
12
+ chunks = cfg.get("convert_chunks")
13
+ to_ome_zarr(
14
+ cfg["input"],
15
+ str(snakemake.output[0]).removesuffix("/zarr.json"), # noqa: F821
16
+ chunks=tuple(chunks) if chunks else None,
17
+ shard=bool(cfg.get("shard", False)),
18
+ reuse_pyramid=bool(cfg.get("reuse_pyramid", False)),
19
+ progress=False,
20
+ overwrite=True,
21
+ )
@@ -1 +0,0 @@
1
- {"rule": "convert", "input": [], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/convert.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 7968324357465, "starttime": 1782285191.3091571, "endtime": 1782285191.3090107, "incomplete": false, "external_jobid": null, "input_checksums": {}}
@@ -1 +0,0 @@
1
- {"rule": "merge", "input": ["/tmp/toy/out/seg/0.done", "/tmp/toy/out/seg/1.done", "/tmp/toy/out/seg/3.done", "/tmp/toy/out/seg/4.done"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/merge.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 7968324177309, "starttime": 1782285198.9120235, "endtime": 1782285198.9118745, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/toy/out/seg/0.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/toy/out/seg/1.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/toy/out/seg/3.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "/tmp/toy/out/seg/4.done": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}}
@@ -1 +0,0 @@
1
- {"rule": "prepare", "input": ["/tmp/toy/out/image.zarr"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/prepare_tiles.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 7968324357329, "starttime": 1782285193.0925362, "endtime": 1782285193.0922585, "incomplete": false, "external_jobid": null, "input_checksums": {}}
@@ -1 +0,0 @@
1
- {"rule": "segment", "input": ["/tmp/toy/out/image.zarr", "/tmp/toy/out/stage.zarr", "/tmp/toy/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 7968316803128, "starttime": 1782285194.9512916, "endtime": 1782285194.9498596, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/toy/out/tiles.json": "sha256:a7ba7de7a100b9eed2f69158d779580251e48da2c4bdb722e28c4d9a79abb411"}}
@@ -1 +0,0 @@
1
- {"rule": "segment", "input": ["/tmp/toy/out/image.zarr", "/tmp/toy/out/stage.zarr", "/tmp/toy/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 7968316911209, "starttime": 1782285194.9791708, "endtime": 1782285194.9778593, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/toy/out/tiles.json": "sha256:a7ba7de7a100b9eed2f69158d779580251e48da2c4bdb722e28c4d9a79abb411"}}
@@ -1 +0,0 @@
1
- {"rule": "segment", "input": ["/tmp/toy/out/image.zarr", "/tmp/toy/out/stage.zarr", "/tmp/toy/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 7968316911362, "starttime": 1782285196.8732357, "endtime": 1782285196.871846, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/toy/out/tiles.json": "sha256:a7ba7de7a100b9eed2f69158d779580251e48da2c4bdb722e28c4d9a79abb411"}}
@@ -1 +0,0 @@
1
- {"rule": "segment", "input": ["/tmp/toy/out/image.zarr", "/tmp/toy/out/stage.zarr", "/tmp/toy/out/tiles.json"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/segment_tile.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 7968316911515, "starttime": 1782285196.9122667, "endtime": 1782285196.9108458, "incomplete": false, "external_jobid": null, "input_checksums": {"/tmp/toy/out/tiles.json": "sha256:a7ba7de7a100b9eed2f69158d779580251e48da2c4bdb722e28c4d9a79abb411"}}
@@ -1 +0,0 @@
1
- {"rule": "prepare", "input": ["/tmp/toy/out/image.zarr"], "log": [], "shellcmd": null, "params": [], "code": " \"../scripts/prepare_tiles.py\"\n", "record_format_version": 6, "conda_env": null, "container_img_url": null, "software_stack_hash": "d41d8cd98f00b204e9800998ecf8427e", "job_hash": 7968324357329, "starttime": 1782285193.0925362, "endtime": 1782285193.0908728, "incomplete": false, "external_jobid": null, "input_checksums": {}}
@@ -1,15 +0,0 @@
1
- """Snakemake script: convert the input to a pyramidal OME-ZARR."""
2
-
3
- from patchworks.plugins.ome_zarr import to_ome_zarr
4
-
5
- cfg = snakemake.config # noqa: F821 (injected by Snakemake)
6
- chunks = cfg.get("convert_chunks")
7
- to_ome_zarr(
8
- cfg["input"],
9
- snakemake.output[0], # noqa: F821
10
- chunks=tuple(chunks) if chunks else None,
11
- shard=bool(cfg.get("shard", False)),
12
- reuse_pyramid=bool(cfg.get("reuse_pyramid", False)),
13
- progress=False,
14
- overwrite=True,
15
- )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes