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

  1. Configuration Management
  2. Basic Unary Conversion
  3. Filtering & Pattern Matching
  4. Metadata Inspection & Override
  5. Aggregative Conversion
  6. Advanced Aggregation
  7. Multi-Series Datasets
  8. CSV Based Processing
  9. Zarr-to-Zarr Conversion


Configuration Management

Reset to Installation Defaults

Unix/macOS & Windows (same for both):

eubi reset_config
eubi show_config

Modify Conversion Settings

Unix/macOS & Windows (same for both):

eubi configure_conversion --channel_intensity_limits from_array
eubi show_config

Display Current Configuration

Unix/macOS & Windows (same for both):

eubi show_config

Basic Unary Conversion

Simple Conversion: Single Input → Single Output

Unix/macOS:

eubi to_zarr small_dataset $HOME/codash_output/small_dataset_zarr

Windows (Command Prompt or PowerShell):

eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr

Verify the output:

Unix/macOS:

eubi show_pixel_meta $HOME/codash_output/small_dataset_zarr

Windows:

eubi show_pixel_meta %USERPROFILE%\codash_output\small_dataset_zarr

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:

eubi to_zarr small_dataset $HOME/codash_output/small_dataset_zarr_6_layers --n_layers 6

Windows:

eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr_6_layers --n_layers 6

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 --zarr_format 3 --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 --zarr_format 3 --y_shard_coef 5 --x_shard_coef 5

Filtering & Pattern Matching

Include Only TIFF Files

Unix/macOS:

eubi to_zarr small_dataset $HOME/codash_output/small_dataset_zarr_inc_filtered --includes .tiff

Windows:

eubi to_zarr small_dataset %USERPROFILE%\codash_output\small_dataset_zarr_inc_filtered --includes .tiff

Exclude JPG Files

Unix/macOS:

eubi to_zarr small_dataset $HOME/codash_output/small_dataset_zarr_ex_filtered --excludes .jpg

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:

eubi to_zarr "small_dataset/*.tif" $HOME/codash_output/small_dataset_zarr_wildcards

Windows:

eubi to_zarr "small_dataset\*.tif" %USERPROFILE%\codash_output\small_dataset_zarr_wildcards

Metadata Inspection & Override

Inspect Source Metadata

Unix/macOS:

eubi show_pixel_meta "small_dataset/*oir"

Windows:

eubi show_pixel_meta "small_dataset\*oir"

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:

eubi show_pixel_meta "$HOME/codash_output/small_image_with_metadata/*.zarr"

Windows:

eubi show_pixel_meta "%USERPROFILE%\codash_output\small_image_with_metadata\*.zarr"

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:

eubi show_pixel_meta "$HOME/codash_output/small_image_with_metadata/*.zarr"

Windows:

eubi show_pixel_meta "%USERPROFILE%\codash_output\small_image_with_metadata\*.zarr"

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:

eubi to_zarr "medium_dataset/*.czi" $HOME/codash_output/multiseries_dataset --scene_index all

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:

eubi to_zarr selection.csv $HOME/codash_output/from_csv_zarr

Windows:

eubi to_zarr selection.csv %USERPROFILE%\codash_output\from_csv_zarr

Verify Results

Unix/macOS:

eubi show_pixel_meta $HOME/codash_output/from_csv_zarr

Windows:

eubi show_pixel_meta %USERPROFILE%\codash_output\from_csv_zarr

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 --zarr_format 3 --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 --zarr_format 3 --y_shard_coef 5 --x_shard_coef 5