Skip to main content

Opera Phenix reader plugin for zarrmony — wraps pyphenix.OperaPhenixReader.

Project description

zarrmony-phenix

Opera Phenix reader plugin for zarrmony. Wraps pyphenix.OperaPhenixReader so that zarrmony convert /path/to/PhenixExperiment Just Works.

Install

pip install zarrmony-phenix

This pulls zarrmony and pyphenix from PyPI as transitive dependencies.

Verify the plugin registered

from zarrmony.readers.plugin import list_plugins
print([p.name for p in list_plugins()])
# -> [..., 'zarrmony-phenix']

Use

zarrmony inspect /path/to/PhenixExperiment   # lists fields per well
zarrmony convert /path/to/PhenixExperiment ./out

zarrmony convert defaults to --layout auto, which dispatches to the HCS plate writer for plate-shaped readers. The output at ./out is a single OME-NGFF 0.5 plate store: well groups at <row>/<column>/ (e.g. B/04/) each containing one image per imaged field. Pass --layout plate to make the choice explicit, or --layout per-scene to produce one <scene>.ome.zarr per FOV instead.

Scenes are named with the vendor's native field labels (F001, F002, …); plate coordinates live on the plate_layout attribute that zarrmony's plate writer consumes (see the reader-plugin authoring guide §9 and zarrmony ADR-0004). Multi-acquisition Phenix experiments emit a LayoutDowngradeWarning and only the first acquisition's fields are exported; pass --layout per-scene to get all acquisitions in one pass.

Migrating from v0.1.0

  • Scene names changed from <row-letter><col>-f<field> (e.g. B04-f02) to vendor-native field labels (F001, F002, …). Code that keys --per-scene-metadata (or anything else) by the old name must be re-keyed; plate coordinates now live on reader.plate_layout, not in the scene name.
  • Default output is now a single plate store, not one .ome.zarr per FOV. Pass --layout per-scene to keep the v0.1.0 shape.
  • zarrmony>=0.3.0 is now required (the plate writer ships there).

Supported Phenix exports

  • Export format: directory with Images/Index.xml and TIFFs under Images/.
  • Archive format: directory with index/<something>.xml and TIFFs under images/.

Detection is by the presence of either marker; both are scored equally.

Limitations

  • Flat-field correction is always-on and switches the output dtype to float32. When the Phenix export ships per-channel FFC profiles (FFC_Profile/*.xml or flatfieldcorrection/*.xml), the adapter divides each chunk by the corresponding illumination tile via dask.array.map_blocks and writes float32 arrays. Acquisitions with no profiles keep their native uint16. There is no on/off toggle — the presence of profiles in the export is itself the signal (see docs/adr/0001-always-on-float32-ffc.md). Partial coverage is surfaced as pyphenix.FFCCoverageWarning and does not block conversion. To get raw uint16 or an FFC-free pipeline, instantiate pyphenix.OperaPhenixReader directly and write the output yourself.
  • Multi-acquisition Phenix experiments degrade gracefully. Zarrmony's v1 plate writer is single-acquisition; if more than one AcquisitionID is detected in Index.xml, the adapter emits a LayoutDowngradeWarning and exports only the first acquisition's fields. Pass --layout per-scene to capture every acquisition as its own store.
  • napari shows only one field per well at the plate level. This is an upstream limitation in napari-ome-zarr, not a writer bug — all fields are present on disk and visible in the ome-ngff validator. To inspect individual fields in napari, open the per-well image group directly (e.g. path/to/plate.ome.zarr/B/04/0) instead of the plate root. Tracked upstream at ome/napari-ome-zarr#61.

Why a separate package?

Phenix carries real domain logic (FFC math, plate-coordinate parsing, mosaic stitching) and dependencies (PIL, custom XML parsing) that don't belong in zarrmony's import graph. See zarrmony ADR-0003 for the full rationale and the reader-plugin authoring guide for how to build your own.

License

Apache-2.0.

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_phenix-0.3.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

zarrmony_phenix-0.3.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for zarrmony_phenix-0.3.0.tar.gz
Algorithm Hash digest
SHA256 10e64c26012c0192c3ef7e9949c2d7a3dd4b99be10494322cb5ef590c8c9ab93
MD5 70b60692bf9daca526e80b14f2e7eaf2
BLAKE2b-256 16d5dddf5e1531034c1ddb946dcfe191316cbd0808eaa0b2b69181dc8128249c

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarrmony_phenix-0.3.0.tar.gz:

Publisher: release.yml on ferrinm/zarrmony-phenix

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_phenix-0.3.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for zarrmony_phenix-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac28dfdad8589c3fb0ba2ffbfea396f16d3456d08760945fdf1473d7ffd4d932
MD5 de7801523f33388a58377dd1df5794f2
BLAKE2b-256 10020147774ec27bd5b74a9f22e5c5a6dba89112bb29f15a7d23ca29056eb71d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarrmony_phenix-0.3.0-py3-none-any.whl:

Publisher: release.yml on ferrinm/zarrmony-phenix

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