Skip to content

Commit 83b9eb4

Browse files
committed
feat(workflow): ✨ expose sequence_pattern in the convert cluster rule
Wires the new to_ome_zarr(sequence_pattern=) through the convert Snakemake script/config, so a folder-of-TIFFs input runs on the same SLURM profile as any other conversion.
1 parent 379c884 commit 83b9eb4

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

workflow/config/config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
# GPUs run in parallel; the merge is a single CPU job.
66

77
# ---- input / output ---------------------------------------------------------
8-
input: "/path/to/scan.ims" # .ims, .czi, .lif, .nd2, ome-tiff, or an .zarr
8+
input: "/path/to/scan.ims" # .ims, .czi, .lif, .nd2, ome-tiff, .zarr, or a
9+
# glob (e.g. "/path/*.tif") when sequence_pattern
10+
# is set below
911
work_dir: "/path/to/results" # everything is written under here
1012
# Final outputs (under work_dir):
1113
# image.zarr — converted, pyramidal OME-ZARR
@@ -15,6 +17,10 @@ work_dir: "/path/to/results" # everything is written under here
1517
reuse_pyramid: false # for .ims: copy its own pyramid (fast); else rebuild
1618
convert_chunks: null # null → patchworks' bounded auto chunks; or [c,z,y,x]
1719
shard: false # true → pack chunks into shards (zarr v3; fewer files)
20+
# For a folder of single-plane TIFFs (input: a glob), set the filename regex
21+
# below; named groups become axes, e.g. one file per Z/C plane:
22+
# sequence_pattern: '_T(?P<T>\d+)_Z(?P<Z>\d+)_C(?P<C>\d+)_V\d+'
23+
sequence_pattern: null
1824
# Re-running reuses an existing image.zarr automatically (skips conversion).
1925
# To force a rebuild: delete image.zarr, or `snakemake --forcerun convert`.
2026

workflow/scripts/convert.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
to_ome_zarr(
1717
cfg["input"],
1818
str(snakemake.output[0]).removesuffix("/zarr.json"), # noqa: F821
19+
sequence_pattern=cfg.get("sequence_pattern"),
1920
chunks=tuple(chunks) if chunks else None,
2021
shard=bool(cfg.get("shard", False)),
2122
reuse_pyramid=bool(cfg.get("reuse_pyramid", False)),

0 commit comments

Comments
 (0)