Closed jluethi closed 2 months ago
I'm doing some refactoring work on the Create OME-Zarr & Yokogawa to OME-Zarr handling. At first, I thought I could just pass the patterns list between the two functions. But the regex for finding individual channels could in some cases break in that approach. Thus, I've now set up an init_args model like this one:
class InitArgsCellVoyager(BaseModel):
"""
Arguments to be passed from cellvoyager converter init to compute
Attributes:
image_dir: Directory where the raw images are found
plate_prefix: part of the image filename needed for finding the
right subset of image files
well_ID: part of the image filename needed for finding the
right subset of image files
image_extension: part of the image filename needed for finding the
right subset of image files
image_glob_patterns: Additional glob patterns to filter the available
images with
acquisition: Acquisition metadata needed for multiplexing
"""
image_dir: str
plate_prefix: str
well_ID: str
image_extension: str
image_glob_patterns: Optional[list[str]]
acquisition: Optional[int]
And pattern parsing like this:
patterns = [
f"{init_args.plate_prefix}_{init_args.well_ID}_*{A}*{C}*."
f"{init_args.image_extension}"
]
if init_args.image_glob_patterns:
patterns.extend(init_args.image_glob_patterns)
Update input API & output handling for:
Simple updates:
overwrite_input=False
functionality, return the relevant image list updateRefactoring required
Update Manifest
Testing
test_valid_args_schemas
test_task_interface
intest_valid_task_interface
once new Manifest is builttest_MIP_subset_of_images
intest_workflows
again: When MIP task is also ready (because it relies on metadata)test_workflow_with_per_well_labeling_2D
intest_workflows_cellpose_segmenation
again (relies on MIP)test_multiplexing_MIP
intest_workflows_multiplexing
again (relies on MIP)test_multiplexing_registration
intest_registration
once multiplexing tasks are updatedtest_import_ome_zarr_plate
intest_import_ome_zarr
again once Import task is updatedFuture goals
prepare_3D_zarr
andprepare_2D_zarr
in _zenodo_ome_zarrs still return zarrs with the old metadata logic (defined in thezenodo_zarr_metadata
fixture)create_cellvoyager_ome_zarr_init
: It's been there before, not sure how well tested it is