Skip to content

Commit d257b1f

Browse files
committed
Fix CLI arguments for zarr-creating tasks (ref #61) + fix new metadata function
1 parent a0cce76 commit d257b1f

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

fractal/tasks/create_zarr_structure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def create_zarr_structure(
289289
parser.add_argument(
290290
"-c",
291291
"--path_dict_channels",
292-
type=int,
292+
type=str,
293293
help="path of channel dictionary",
294294
)
295295
args = parser.parse_args()
@@ -298,4 +298,5 @@ def create_zarr_structure(
298298
out_path=args.out_path,
299299
ext=args.ext,
300300
num_levels=args.num_levels,
301+
path_dict_channels=args.path_dict_channels,
301302
)

fractal/tasks/create_zarr_structure_multifov.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def create_zarr_structure_multifov(
208208

209209
# Identify sites / fields of view
210210
sites = [
211-
metadata(os.path.basename(fn))["site"]
211+
parse_metadata(os.path.basename(fn))["F"]
212212
for fn in glob(in_path + f"{plate}*_{row+column}*." + ext)
213213
]
214214
sites_unique = sorted(list(set(sites)))
@@ -283,8 +283,12 @@ def create_zarr_structure_multifov(
283283

284284
parser = ArgumentParser(prog="create_zarr_structure")
285285
parser.add_argument(
286-
"-i", "--in_path", help="directory containing the input files"
286+
"-i",
287+
"--in_paths",
288+
help="list of directories containing the input files",
289+
nargs="+",
287290
)
291+
288292
parser.add_argument(
289293
"-o", "--out_path", help="directory for the outnput zarr files"
290294
)
@@ -300,10 +304,19 @@ def create_zarr_structure_multifov(
300304
help="number of levels in the Zarr pyramid",
301305
)
302306

307+
parser.add_argument(
308+
"-c",
309+
"--path_dict_channels",
310+
type=str,
311+
help="path of channel dictionary",
312+
)
313+
303314
args = parser.parse_args()
315+
304316
create_zarr_structure_multifov(
305-
in_path=args.in_path,
317+
in_paths=args.in_paths,
306318
out_path=args.out_path,
307319
ext=args.ext,
308320
num_levels=args.num_levels,
321+
path_dict_channels=args.path_dict_channels,
309322
)

0 commit comments

Comments
 (0)