Skip to main content

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

Project description

zarrmony

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 a configurable user-metadata gate, mean-pool pyramid generation, and a full audit trail of the conversion.

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.3 in active development. API and metadata schema are not yet stable.

Install

pip install zarrmony

Optional 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

CZI, LIF, and ND2 reader plugins are included by default.

Usage

CLI

# Per-scene (default): writes one <scene>.ome.zarr store per scene under OUTPUT.
zarrmony convert input.czi output_dir/ --metadata-file metadata.json

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

zarrmony inspect input.czi
zarrmony schema dump > zarrmony-metadata.schema.json

Library

from zarrmony import convert, UserMetadata

# Per-scene (default): returns {"input": ..., "stores": [<per-store audit>, ...]}.
result = convert(
    "input.lif",
    "output_dir/",
    metadata=UserMetadata(...),
)

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

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.

Project details


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.3.0.tar.gz (255.9 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.3.0-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zarrmony-0.3.0.tar.gz
  • Upload date:
  • Size: 255.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zarrmony-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7a73dbae500fb42abfb989aac9a2b5b61cac0da8caa1a561fb250819435c32c0
MD5 c966d72db84a85b2c2c53163679a1860
BLAKE2b-256 d2f9cf33259698a6759a138ac1edf789dedb9496d0e2107f3db1c6805de118fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarrmony-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: zarrmony-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 41.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zarrmony-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72437c6724877acd851fb6b02df52255948e15f42ef0dad63358914089f2a819
MD5 a009f78279311f9e5d8f1f93552fe28b
BLAKE2b-256 9c54b0042f92ddad08aac73e88add7ea4be91b312320dea85ab5e8f4d89bccf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarrmony-0.3.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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page