Skip to main content

zarrmony

PyPI version Python versions License CI

Convert any bioimage file to OME-Zarr v0.5, preserving metadata.

Zarrmony reads proprietary microscopy formats (CZI, LIF, ND2, OME-TIFF, ...) via bioio and writes them as OME-Zarr v0.5, with mean-pool pyramid generation and a full audit trail of the conversion. User-supplied metadata (study/treatment/etc.) is not handled by zarrmony — it is owned by aperture-backend, which associates OME-Zarr stores to a separate metadata database.

By default (--layout auto) the writer is chosen from the reader's layout_hint: a flat reader writes one self-describing <scene>.ome.zarr store per scene under the output directory; a plate-shaped reader writes a single OME-NGFF HCS plate store at the output. The legacy bundled bioformats2raw.layout shape is opt-in via --layout bf2raw (CLI) or layout="bf2raw" (library).

Status: v0.9 in active development. API and metadata schema are not yet stable.

Install

pip install zarrmony

Readers

Zarrmony dispatches to a reader plugin per input format. They come in three tiers:

  • Built-in (bundled by default): CZI, LIF, ND2.
  • Optional extras in this repo (opt-in via pip install "zarrmony[<extra>]"): OME-TIFF via the ome-tiff extra.
  • External plugins (separate PyPI distributions, entry-point registered):
    • zarrmony-phenix — Opera Phenix (wraps pyphenix.OperaPhenixReader) — pip install zarrmony-phenix
    • zarrmony-blaze — Miltenyi UltraMicroscope Blaze (MACS iQ-processed) — pip install zarrmony-blaze
    • zarrmony-snouty — Snouty single-objective light-sheet — pip install zarrmony-snouty

Extras

Extra Adds When you need it
gcs gcsfs Writing output to gs:// URIs
s3 s3fs Writing output to s3:// URIs
ome-tiff bioio-ome-tiff Reading OME-TIFF input
all All of the above
dev pytest, ruff, pre-commit Contributing

Usage

CLI

# Auto (default): dispatches on the reader's layout_hint.
#   flat readers (CZI, LIF, ND2, OME-TIFF) → per-scene stores under OUTPUT
#   plate-shaped readers (e.g. zarrmony-phenix) → a single HCS plate store at OUTPUT
zarrmony convert input.czi output_dir/

# Force per-scene (one <scene>.ome.zarr store per scene under OUTPUT).
zarrmony convert input.czi output_dir/ --layout per-scene

# Force HCS plate (one <plate>.ome.zarr store at OUTPUT). Requires a
# plate-shaped reader; flat readers raise LayoutMismatchError.
zarrmony convert phenix-acquisition/ output.ome.zarr --layout plate

# Bundled bioformats2raw.layout (opt-in): writes a single store at OUTPUT.
zarrmony convert input.czi output.ome.zarr --layout bf2raw

# LIF-specific: write one OME-Zarr per mosaic tile (with stage positions in
# <Plane>) instead of bioio-lif's auto-stitched 1-pixel-overlap output.
# See docs/adr/0005-lif-mosaic-write-strategy.md.
zarrmony convert mosaic.lif output_dir/ --lif-mosaic per-tile

zarrmony inspect input.czi

Library

from zarrmony import convert

# Auto (default): for a flat reader, returns {"input": ..., "stores": [...]};
# for a plate-shaped reader, returns the single plate audit dict (schema 3,
# with "fields" and a top-level "plate" block). Switch on audit["layout"].
result = convert("input.lif", "output_dir/")

# Bundled: returns the single bundle's audit dict.
audit = convert("input.lif", "output.ome.zarr", layout="bf2raw")

# HCS plate: writes one OME-NGFF plate store at OUTPUT.
audit = convert("phenix-acquisition/", "output.ome.zarr", layout="plate")

Extending zarrmony

Add support for a new bioimage format by writing a reader plugin. See Writing a zarrmony reader plugin for the Reader Protocol, matcher conventions, entry-point registration, and a worked example.

License

Apache-2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zarrmony-0.10.0.tar.gz (502.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zarrmony-0.10.0-py3-none-any.whl (107.3 kB view details)

Uploaded Python 3

File details

Details for the file zarrmony-0.10.0.tar.gz.

File metadata

  • Download URL: zarrmony-0.10.0.tar.gz
  • Upload date:
  • Size: 502.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zarrmony-0.10.0.tar.gz
Algorithm Hash digest
SHA256 2fa3f5a49f5aad6881862976749879163cb30dbca9e5244cfe83f518e0f7ef3f
MD5 10aac149e6dcd594983c539be4a11d25
BLAKE2b-256 49e97f25847abe80af4f7c003c8cd696f516067e7f1fd9c42c85173a68bc3a8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarrmony-0.10.0.tar.gz:

Publisher: release.yml on ferrinm/zarrmony

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zarrmony-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: zarrmony-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 107.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zarrmony-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 483362e373050c6db9f9b067c23d44bce66af89e3497e275505a3840729d1822
MD5 05a33e972c793a82b4a892c6bb3bc190
BLAKE2b-256 d8cb737ad0fc2b405091d1e0eb21e9202d78d6f174f0ea073e7e924ea4a3873b

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarrmony-0.10.0-py3-none-any.whl:

Publisher: release.yml on ferrinm/zarrmony

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

This release

0.10.0 This release

2 files

0.9.0

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page