Skip to content

Add configurable OME-Zarr store format via bids_oz_out/bids_oz_in wrappers#177

Merged
akhanf merged 2 commits into
mainfrom
copilot/create-wrapper-function-bids-oz-out
Jun 17, 2026
Merged

Add configurable OME-Zarr store format via bids_oz_out/bids_oz_in wrappers#177
akhanf merged 2 commits into
mainfrom
copilot/create-wrapper-function-bids-oz-out

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Intermediate OME-Zarr stores are hardcoded as directories (ome.zarr), with no way to switch to single-file formats. This adds a --zarr-store-ext flag and wrapper functions that abstract the format choice away from individual rules.

New CLI arg

--zarr-store-ext {ome.zarr,ozx} (default: ozx) — controls the on-disk format for all intermediate zarr stores.

New wrapper functions (common.smk)

  • bids_oz_out(**kwargs) — use in output: blocks; substitutes {ext} in suffix=, wraps with directory() only when ome.zarr is selected
  • bids_oz_in(**kwargs) — use in input: blocks; same substitution, no directory() wrapping
# Before
output:
    corrected=temp(
        directory(bids(root=work, ..., suffix="SPIM.ome.zarr", ...)),
        group_jobs=True,
    )
input:
    corrected=bids(root=work, ..., suffix="SPIM.ome.zarr", ...)

# After
output:
    corrected=temp(
        bids_oz_out(root=work, ..., suffix="SPIM.{ext}", ...),
        group_jobs=True,
    )
input:
    corrected=bids_oz_in(root=work, ..., suffix="SPIM.{ext}", ...)

Updated rules

All OME-Zarr output/input paths replaced across: segmentation.smk, vessels.smk, regionprops.smk, patches.smk, qc.smk, fieldfrac.smk, templatereg.smk.

Copilot AI changed the title Add bids_oz_out/bids_oz_in wrappers for configurable OME-Zarr store format Add configurable OME-Zarr store format via bids_oz_out/bids_oz_in wrappers Jun 16, 2026
Copilot AI requested a review from akhanf June 16, 2026 22:53
Removed shard configuration from snakebids.yml
@akhanf akhanf marked this pull request as ready for review June 17, 2026 08:19
@akhanf akhanf merged commit b2f7008 into main Jun 17, 2026
2 checks passed
@akhanf akhanf deleted the copilot/create-wrapper-function-bids-oz-out branch June 17, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants