Skip to main content

Command line tool to convert MRC-files to OME-Zarr.

Project description

mrc2omezarr

Command line tool for conversion from MRC to multiscale OME-Zarr format.

Default settings produce Zarr-files similar to those on the CZI cryoET data portal:

  • Files contain one image
  • Scales: 1x, 2x, 4x (original resolution)
  • Scale transformations transform to angstrom coordinates
  • Chunk size: 256, 256, 256

The original MRC-header is retained as a dictionary in the root .zattrs file.

Input as well as output can be local or remote. For remote files include the protocol in the filename, e.g. s3://bucket/path/to/file.mrc.

Install

git clone https://github.com/uermel/mrc2omezarr.git
cd mrc2omezarr
pip install .

Usage

Usage: mrc2omezarr [OPTIONS]

Options:
  --mrc-path TEXT                 Path to the MRC file. Include the protocol
                                  if necessary. (e.g. s3://)  [required]
  --zarr-path TEXT                Path to the output Zarr file. Include the
                                  protocol if necessary. (e.g. s3://)
                                  [required]
  --permissive / --no-permissive  Whether to read the MRC file in permissive
                                  mode.  [default: no-permissive]
  --overwrite / --no-overwrite    Whether to overwrite the output Zarr file.
                                  [default: overwrite]
  --scale-factors TEXT            Scale factors for multiscale pyramid. Comma-
                                  separated list of integers.  [default:
                                  1,2,4]
  --voxel-size TEXT               Voxel size in Angstroms. Comma-separated
                                  list of floats or single float. If not
                                  provided, it will be read from the MRC
                                  header.
  --is-image-stack / --no-is-image-stack
                                  Whether the data is an image stack
                                  (determined from MRC-header by default).
  --chunk-size INTEGER            Chunk size for the Zarr file.  [default:
                                  256]
  --filesystem-args TEXT          Path to a JSON file containing additional
                                  arguments to pass to the fsspec-filesystem.
  --help                          Show this message and exit.

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

mrc2omezarr-0.2.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

mrc2omezarr-0.2.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file mrc2omezarr-0.2.1.tar.gz.

File metadata

  • Download URL: mrc2omezarr-0.2.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for mrc2omezarr-0.2.1.tar.gz
Algorithm Hash digest
SHA256 51234f06e2c21d262afa4a93bf1a54826bd9647d351fbc7d5dccb233c2885cd2
MD5 ef7f4241205f8fc4c496af1b1ecbdffa
BLAKE2b-256 97ad209d875b7f888bf01dbf411633d54f077e67c0be91960ce3ab48eaa582f9

See more details on using hashes here.

File details

Details for the file mrc2omezarr-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mrc2omezarr-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for mrc2omezarr-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2987b6814c59a2265301f6895c2f328c610bdef0123e1c6b5d490952a87cbd6
MD5 f81d0dfe7c0941f1fd39d78393c23a8a
BLAKE2b-256 5017335d759dd0971fde0ca67ce70d34355ae06e0aac0349d65e60cfd9ba3eaf

See more details on using hashes here.

Supported by

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