EuBI-Bridge Conversion Examples¶
Command examples loosely organized by use case. Copy and paste these commands, adjusting input/output paths for your data.
Select your operating system below to see the correct syntax for your platform.
Table of Contents¶
- Configuration Management
- Basic Unary Conversion
- Filtering & Pattern Matching
- Metadata Inspection & Override
- Aggregative Conversion
- Advanced Aggregation
- Multi-Series Datasets
- CSV Based Processing
- Zarr-to-Zarr Conversion
Configuration Management¶
Reset to Installation Defaults¶
Unix/macOS & Windows (same for both):
Modify Conversion Settings¶
Unix/macOS & Windows (same for both):
Display Current Configuration¶
Unix/macOS & Windows (same for both):
Basic Unary Conversion¶
Simple Conversion: Single Input → Single Output¶
Unix/macOS:
Windows (Command Prompt or PowerShell):
Verify the output:
Unix/macOS:
Windows:
Custom Chunk Sizes¶
Unix/macOS:
eubi to_zarr small_dataset $HOME/codash_output/small_dataset_zarr_new_chunks --auto_chunk False --y_chunk 64 --x_chunk 64
Windows:
eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr_new_chunks --auto_chunk False --y_chunk 64 --x_chunk 64
Multiple Resolution Layers (Pyramid)¶
Unix/macOS:
Windows:
Specify the Compression Algorithm¶
Unix/macOS:
eubi to_zarr small_dataset $HOME/codash_output/small_dataset_zarr_zstd --compressor zstd --compressor_params {level:13}
Windows:
eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr_6_layers --compressor zstd --compressor_params {level:13}
NGFF v0.5 with Sharding¶
Unix/macOS:
eubi to_zarr small_dataset $HOME/codash_output/small_dataset_zarr_v0.5 --auto_chunk False --y_chunk 64 --x_chunk 64 --ome_zarr_version 0.5 --y_shard_coef 5 --x_shard_coef 5
Windows:
eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr_v0.5 --auto_chunk False --y_chunk 64 --x_chunk 64 --ome_zarr_version 0.5 --y_shard_coef 5 --x_shard_coef 5
Filtering & Pattern Matching¶
Include Only TIFF Files¶
Unix/macOS:
Windows:
eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr_inc_filtered --includes .tiff
Exclude JPG Files¶
Unix/macOS:
Windows:
eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr_ex_filtered --excludes .jpg
Include Multiple Formats¶
Unix/macOS:
eubi to_zarr small_dataset $HOME/codash_output/small_dataset_zarr_multi_inc_filtered --includes .oir,.lsm
Windows:
eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr_multi_inc_filtered --includes .oir,.lsm
Exclude Multiple Formats¶
Unix/macOS:
eubi to_zarr small_dataset $HOME/codash_output/small_dataset_zarr_multi_ex_filtered --excludes .oir,.lsm
Windows:
eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr_multi_ex_filtered --excludes .oir,.lsm
Glob Pattern Matching¶
Unix/macOS:
Windows:
Metadata Inspection & Override¶
Inspect Source Metadata¶
Unix/macOS:
Windows:
Convert with Pixel Scale & Units¶
Unix/macOS:
eubi to_zarr small_dataset/23052022_D3_0001.oir $HOME/codash_output/small_image_with_metadata --y_scale 0.5 --y_unit micrometer --x_scale 0.5 --x_unit micrometer --channel_labels "0,GFP;1,mCherry;2,BF" --channel_colors "0,yellow;1,magenta;2,white"
Windows:
eubi to_zarr small_dataset\23052022_D3_0001.oir %USERPROFILE%\codash_output\small_image_with_metadata --y_scale 0.5 --y_unit micrometer --x_scale 0.5 --x_unit micrometer --channel_labels "0,GFP;1,mCherry;2,BF" --channel_colors "0,yellow;1,magenta;2,white"
Verify Overridden Metadata¶
Unix/macOS:
Windows:
Update Metadata In Place¶
Unix/macOS:
eubi update_pixel_meta "$HOME/codash_output/small_image_with_metadata/*.zarr" --y_scale 0.2 --x_scale 0.2
Windows:
eubi update_pixel_meta "%USERPROFILE%\codash_output\small_image_with_metadata\*.zarr" --y_scale 0.2 --x_scale 0.2
Verify Updated Metadata¶
Unix/macOS:
Windows:
Aggregative Conversion¶
Concatenate multiple input files into a single output file along specified dimensions.
Concatenate Along All Specified Axes¶
Combine files into channels and time points:
Unix/macOS:
eubi to_zarr multidim_dataset $HOME/codash_output/multidim_dataset_concat_zarr --channel_tag growing,moving,noise --time_tag step --concatenation_axes ct
Windows:
eubi to_zarr multidim_dataset %USERPROFILE%\codash_output\multidim_dataset_concat_zarr --channel_tag growing,moving,noise --time_tag step --concatenation_axes ct
With Nested Directory Structure¶
Unix/macOS:
eubi to_zarr multidim_dataset_nested $HOME/codash_output/multidim_dataset_nested_concat_zarr --channel_tag growing,moving,noise --time_tag step --concatenation_axes ct
Windows:
eubi to_zarr multidim_dataset_nested %USERPROFILE%\codash_output\multidim_dataset_nested_concat_zarr --channel_tag growing,moving,noise --time_tag step --concatenation_axes ct
Specify Channel Order¶
Unix/macOS:
eubi to_zarr multidim_dataset_nested $HOME/codash_output/multidim_dataset_nested_concat_zarr --channel_tag noise,growing,moving --time_tag step --concatenation_axes ct --override_channel_names
Windows:
eubi to_zarr multidim_dataset_nested %USERPROFILE%\codash_output\multidim_dataset_nested_concat_zarr --channel_tag noise,growing,moving --time_tag step --concatenation_axes ct --override_channel_names
Advanced Aggregation¶
Concatenate Along Time Only¶
Unix/macOS:
eubi to_zarr multidim_dataset $HOME/codash_output/multidim_dataset_concat_along_time_zarr --channel_tag moving,noise,growing --time_tag step --concatenation_axes t --override_channel_names
Windows:
eubi to_zarr multidim_dataset %USERPROFILE%\codash_output\multidim_dataset_concat_along_time_zarr --channel_tag moving,noise,growing --time_tag step --concatenation_axes t --override_channel_names
Aggregation with Pattern Filter¶
Unix/macOS:
eubi to_zarr "medium_dataset/PK2*.ome.tiff" $HOME/codash_output/multidim_dataset_concat_filtered_zarr --channel_tag ch --concatenation_axes c --skip_dask
Windows:
eubi to_zarr "medium_dataset\PK2*.ome.tiff" %USERPROFILE%\codash_output\multidim_dataset_concat_filtered_zarr --channel_tag ch --concatenation_axes c --skip_dask
Aggregation with Full Metadata Override¶
Unix/macOS:
eubi to_zarr multidim_dataset $HOME/codash_output/multidim_dataset_concat_zarr_with_metadata --channel_tag moving,noise,growing --time_tag step --concatenation_axes ct --time_scale 18 --time_unit millisecond --y_scale 0.5 --y_unit micrometer --x_scale 0.5 --x_unit micrometer --override_channel_names --channel_colors "0,red;1,green;2,white"
Windows:
eubi to_zarr multidim_dataset %USERPROFILE%\codash_output\multidim_dataset_concat_zarr_with_metadata --channel_tag moving,noise,growing --time_tag step --concatenation_axes ct --time_scale 18 --time_unit millisecond --y_scale 0.5 --y_unit micrometer --x_scale 0.5 --x_unit micrometer --override_channel_names --channel_colors "0,red;1,green;2,white"
Aggregation with Time Range Limit¶
Unix/macOS:
eubi to_zarr multidim_dataset $HOME/codash_output/multidim_dataset_concat_zarr_with_metadata --channel_tag moving,noise,growing --time_tag step --concatenation_axes ct --time_scale 18 --time_unit millisecond --y_scale 0.5 --y_unit micrometer --x_scale 0.5 --x_unit micrometer --override_channel_names --channel_colors "0,red;1,green;2,white" --time_range 0,5
Windows:
eubi to_zarr multidim_dataset %USERPROFILE%\codash_output\multidim_dataset_concat_zarr_with_metadata --channel_tag moving,noise,growing --time_tag step --concatenation_axes ct --time_scale 18 --time_unit millisecond --y_scale 0.5 --y_unit micrometer --x_scale 0.5 --x_unit micrometer --override_channel_names --channel_colors "0,red;1,green;2,white" --time_range 0,5
Multi-Series Datasets¶
Convert Selected Series Only¶
Unix/macOS:
eubi to_zarr medium_dataset/19_07_19_Lennard.lif $HOME/codash_output/multiseries_dataset --scene_index 2,4,6
Windows:
eubi to_zarr medium_dataset\19_07_19_Lennard.lif %USERPROFILE%\codash_output\multiseries_dataset --scene_index 2,4,6
Convert All Series from CZI Files¶
Unix/macOS:
Windows:
eubi to_zarr "medium_dataset\*.czi" %USERPROFILE%\codash_output\multiseries_dataset --scene_index all
CSV Based Processing¶
Create a CSV File¶
Find or create selection.csv. Its content should be similar to:
input_path,output_path,y_scale,x_scale,y_unit,x_unit,channel_labels
small_dataset/image1.tif,output/image1_zarr,0.5,0.5,micrometer,micrometer,"0,Red;1,Green"
small_dataset/image2.czi,output/image2_zarr,1.0,1.0,micrometer,micrometer,"0,DAPI;1,GFP"
Convert All Files in CSV¶
Unix/macOS & Windows:
Windows:
Verify Results¶
Unix/macOS:
Windows:
Zarr-to-Zarr Conversion¶
Re-chunk and reformat existing OME-Zarr files:
Unix/macOS:
eubi to_zarr $HOME/codash_output/multidim_dataset_concat_filtered_zarr/PK2_ATH_5to20_20240705_MID_01_ch_cset.ome.zarr $HOME/codash_output/multidim_dataset_concat_filtered_zarr_newchunks_newshards_v0.5 --auto_chunk False --ome_zarr_version 0.5 --y_shard_coef 5 --x_shard_coef 5
Windows:
eubi to_zarr %USERPROFILE%\codash_output\multidim_dataset_concat_filtered_zarr\PK2_ATH_5to20_20240705_MID_01_ch_cset.ome.zarr %USERPROFILE%\codash_output\multidim_dataset_concat_filtered_zarr_newchunks_newshards_v0.5 --auto_chunk False --ome_zarr_version 0.5 --y_shard_coef 5 --x_shard_coef 5