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
4 changes: 4 additions & 0 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ IMAGE = f"{WORK}/image.zarr"
IMAGE_OK = f"{IMAGE}/zarr.json"
TILES = f"{WORK}/tiles.json"
STAGE = f"{WORK}/stage.zarr"
# Completion sentinel for the stage store. Tracking a touch()ed marker instead
# of directory(STAGE) keeps Snakemake from deleting/recreating the store on a
# re-run and avoids directory-mtime quirks (same touch() discipline as sopa).
STAGE_OK = f"{STAGE}.done"


def occupied_done(wildcards):
Expand Down
4 changes: 2 additions & 2 deletions workflow/rules/segment.smk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ checkpoint prepare:
IMAGE_OK,
output:
tiles=TILES,
stage=directory(STAGE),
stage=touch(STAGE_OK),
script:
"../scripts/prepare_tiles.py"

Expand All @@ -14,7 +14,7 @@ rule segment:
"""Segment one tile on a GPU and write it into the stage store."""
input:
tiles=TILES,
stage=STAGE,
stage=STAGE_OK,
image=IMAGE_OK,
output:
f"{WORK}/seg/{{index}}.done",
Expand Down
Loading