Convert scientific image formats (TIFF, MRC, N5) to OME-Zarr
Project description
Zarrify
Convert TIFF, TIFF stacks, MRC, N5, and zarr v2 files to OME-Zarr v3.
Install
Requires Pixi.
git clone <repo>
cd zarrify
pixi run dev-install
Run
pixi run zarrify --config config.yaml
Copy a config template from config_examples/ and edit for your data.
Config
src: "/path/to/input" # tiff, tiff stack dir, .mrc, .n5, or zarr v2 .zarr
dest: "/path/to/output.zarr"
cluster: lsf # local | lsf
workers: 100
log_dir: "/path/to/lsf/logs"
extra_directives: ["-P myproject"]
zarr_chunks: [32, 32, 32] # inner chunk shape
shard_shape: [1024, 1024, 1024] # outer shard — null to disable
codec: zstd # zstd | gzip | blosc
codec_level: 3 # null = per-codec default (zstd:3, gzip:6, blosc:5)
axes: [z, y, x]
scale: [8.0, 8.0, 8.0]
translation: [0.0, 0.0, 0.0]
units: [nanometer, nanometer, nanometer]
optimize_reads: false # chunk-aligned TIFF reads (single TIFF only)
multiscale: false # build a multiscale pyramid
ms_workers: 100
data_origin: raw # raw | labels
antialiasing: false
normalize_voxel_size: false
custom_scale_factors: null # e.g. [[1,1,1],[2,2,2],[4,4,4]]
CLI flags override config values:
pixi run zarrify --config config.yaml --workers 200 --scale 1.0 1.0 0.058 0.058
LSF example
bsub -n 4 -P myproject -o out.log -e err.log \
"pixi run zarrify --config config.yaml"
Python API
from zarrify.to_zarr import to_zarr
from zarrify.utils.dask_utils import initialize_dask_client
client = initialize_dask_client("local")
to_zarr("input.mrc", "output.zarr", client)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zarrify-0.1.2.tar.gz
(22.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
zarrify-0.1.2-py3-none-any.whl
(31.3 kB
view details)
File details
Details for the file zarrify-0.1.2.tar.gz.
File metadata
- Download URL: zarrify-0.1.2.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afe1cb68649171fab23bdc52d14264918c866c1960f7830c6877594ad1f1abe4
|
|
| MD5 |
f382d23b128aad7e7063fdcf182a5c6e
|
|
| BLAKE2b-256 |
75af5ac0f1433c3cbb1b2a00a0d6bb0ea1371b438c260b053ce9bb6b865d18b3
|
File details
Details for the file zarrify-0.1.2-py3-none-any.whl.
File metadata
- Download URL: zarrify-0.1.2-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9768a735e31a12026ab153e6e74692ad7f8546ffcc2fdd13df0f25e6a1cf00dc
|
|
| MD5 |
ebb2a3de76d091d37d78e8b886292ffe
|
|
| BLAKE2b-256 |
d01cfc635f722cd9be23764cf67710bc1c6846a5d51dbafbb4e6b8ffe38882b6
|