2727from fractal_tasks_core .cellvoyager .metadata import (
2828 parse_yokogawa_metadata ,
2929)
30+ from fractal_tasks_core .cellvoyager .metadata import sanitize_string
3031from fractal_tasks_core .cellvoyager .wells import generate_row_col_split
3132from fractal_tasks_core .cellvoyager .wells import get_filename_well_id
3233from fractal_tasks_core .channels import check_unique_wavelength_ids
@@ -241,8 +242,9 @@ def cellvoyager_to_ome_zarr_init(
241242 parallelization_list = []
242243
243244 for plate in plates :
245+ plate_name = sanitize_string (plate )
244246 # Define plate zarr
245- relative_zarrurl = f"{ plate } .zarr"
247+ relative_zarrurl = f"{ plate_name } .zarr"
246248 in_path = dict_plate_paths [plate ]
247249 logger .info (f"Creating { relative_zarrurl } " )
248250 # Call zarr.open_group wrapper, which handles overwrite=True/False
@@ -337,7 +339,7 @@ def cellvoyager_to_ome_zarr_init(
337339 well_wavelength_ids = sorted (list (set (well_wavelength_ids )))
338340 if well_wavelength_ids != actual_wavelength_ids :
339341 raise ValueError (
340- f"ERROR: well { well } in plate { plate } (prefix: "
342+ f"ERROR: well { well } in plate { plate_name } (prefix: "
341343 f"{ plate_prefix } ) has missing channels.\n "
342344 f"Expected: { actual_channels } \n "
343345 f"Found: { well_wavelength_ids } .\n "
@@ -355,7 +357,7 @@ def cellvoyager_to_ome_zarr_init(
355357 col_list = sorted (list (set (col_list )))
356358
357359 plate_attrs = {
358- "acquisitions" : [{"id" : 0 , "name" : plate }],
360+ "acquisitions" : [{"id" : 0 , "name" : plate_name }],
359361 "columns" : [{"name" : col } for col in col_list ],
360362 "rows" : [{"name" : row } for row in row_list ],
361363 "version" : __OME_NGFF_VERSION__ ,
@@ -377,7 +379,9 @@ def cellvoyager_to_ome_zarr_init(
377379 for row , column in well_rows_columns :
378380 parallelization_list .append (
379381 {
380- "zarr_url" : f"{ zarr_dir } /{ plate } .zarr/{ row } /{ column } /0" ,
382+ "zarr_url" : (
383+ f"{ zarr_dir } /{ plate_name } .zarr/{ row } /{ column } /0"
384+ ),
381385 "init_args" : InitArgsCellVoyager (
382386 image_dir = in_path ,
383387 plate_prefix = plate_prefix ,
0 commit comments