_utils
Utility functions and models for HCS OME-Zarr URL handling.
format_template_name(template, **kwargs)
¶
Format a name from a template string and keyword arguments.
The template may contain zero or more placeholders in {key} form.
If no placeholders are present the template is returned verbatim,
ignoring the supplied kwargs.
| PARAMETER | DESCRIPTION |
|---|---|
template |
A format string such as
TYPE:
|
**kwargs |
Values to substitute into the template. Allowed placeholder names are the keys of kwargs.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
The formatted name. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the template references a placeholder that is not one of the supplied kwargs. |
Source code in fractal_tasks_core/_utils.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
group_by_plate(zarr_urls)
¶
Group a list of zarr_urls by plate.
| PARAMETER | DESCRIPTION |
|---|---|
zarr_urls |
list of zarr_urls, each containing the path to an OME-Zarr image. |
Source code in fractal_tasks_core/_utils.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
group_by_well(zarr_urls)
¶
Group a list of zarr_urls by well.
| PARAMETER | DESCRIPTION |
|---|---|
zarr_urls |
list of zarr_urls, each containing the path to an OME-Zarr image. |
Source code in fractal_tasks_core/_utils.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
split_well_path_image_path(zarr_url)
¶
Split a zarr_url into the well path and the image path.
| PARAMETER | DESCRIPTION |
|---|---|
zarr_url |
zarr_url of the form
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
well_path
|
path to the well, of the form
TYPE:
|
image_path
|
path to the image within the well, of the form
TYPE:
|
Source code in fractal_tasks_core/_utils.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |