zarrmony-phenix 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zarrmony_phenix-0.2.0/.github/workflows/ci.yml +35 -0
- zarrmony_phenix-0.2.0/.github/workflows/release.yml +26 -0
- zarrmony_phenix-0.2.0/.gitignore +31 -0
- zarrmony_phenix-0.2.0/CHANGELOG.md +42 -0
- zarrmony_phenix-0.2.0/CLAUDE.md +15 -0
- zarrmony_phenix-0.2.0/LICENSE +201 -0
- zarrmony_phenix-0.2.0/PKG-INFO +112 -0
- zarrmony_phenix-0.2.0/README.md +89 -0
- zarrmony_phenix-0.2.0/docs/agents/domain.md +38 -0
- zarrmony_phenix-0.2.0/docs/agents/issue-tracker.md +22 -0
- zarrmony_phenix-0.2.0/docs/agents/triage-labels.md +19 -0
- zarrmony_phenix-0.2.0/pyproject.toml +50 -0
- zarrmony_phenix-0.2.0/src/zarrmony_phenix/__init__.py +29 -0
- zarrmony_phenix-0.2.0/src/zarrmony_phenix/adapter.py +180 -0
- zarrmony_phenix-0.2.0/src/zarrmony_phenix/match.py +25 -0
- zarrmony_phenix-0.2.0/tests/__init__.py +0 -0
- zarrmony_phenix-0.2.0/tests/conftest.py +133 -0
- zarrmony_phenix-0.2.0/tests/test_adapter.py +75 -0
- zarrmony_phenix-0.2.0/tests/test_match.py +29 -0
- zarrmony_phenix-0.2.0/tests/test_plate_layout.py +295 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Test (${{ matrix.os }})
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, macos-latest]
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.13"
|
|
24
|
+
|
|
25
|
+
- name: Install zarrmony-phenix and dev tools
|
|
26
|
+
run: uv pip install -e ".[dev]"
|
|
27
|
+
|
|
28
|
+
- name: Lint
|
|
29
|
+
run: .venv/bin/ruff check
|
|
30
|
+
|
|
31
|
+
- name: Format check
|
|
32
|
+
run: .venv/bin/ruff format --check
|
|
33
|
+
|
|
34
|
+
- name: Test
|
|
35
|
+
run: .venv/bin/pytest
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ['v*']
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build-and-publish:
|
|
9
|
+
name: Build and publish to PyPI
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: pypi
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write # OIDC for PyPI trusted publishing
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Install uv
|
|
18
|
+
uses: astral-sh/setup-uv@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.13"
|
|
21
|
+
|
|
22
|
+
- name: Build sdist and wheel
|
|
23
|
+
run: uv build
|
|
24
|
+
|
|
25
|
+
- name: Publish to PyPI
|
|
26
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
*.egg-info/
|
|
8
|
+
*.egg
|
|
9
|
+
build/
|
|
10
|
+
dist/
|
|
11
|
+
pip-wheel-metadata/
|
|
12
|
+
|
|
13
|
+
# Virtual envs
|
|
14
|
+
.venv/
|
|
15
|
+
venv/
|
|
16
|
+
env/
|
|
17
|
+
|
|
18
|
+
# uv
|
|
19
|
+
uv.lock
|
|
20
|
+
|
|
21
|
+
# Test / lint caches
|
|
22
|
+
.pytest_cache/
|
|
23
|
+
.ruff_cache/
|
|
24
|
+
.coverage
|
|
25
|
+
htmlcov/
|
|
26
|
+
|
|
27
|
+
# IDE
|
|
28
|
+
.vscode/
|
|
29
|
+
.idea/
|
|
30
|
+
*.swp
|
|
31
|
+
.DS_Store
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
6
|
+
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.2.0] — 2026-05-11
|
|
9
|
+
|
|
10
|
+
### Changed (BREAKING)
|
|
11
|
+
|
|
12
|
+
- `PhenixReader.scenes` now contains vendor-native field labels (`F001`,
|
|
13
|
+
`F002`, ...) instead of the v0.1.0 `<row-letter><col>-f<field>` encoding
|
|
14
|
+
(`B04-f02`). Plate coordinates live on the new `plate_layout` attribute.
|
|
15
|
+
Code that keys `--per-scene-metadata` (or any other lookup) by the old
|
|
16
|
+
scene-name format must be re-keyed to the new `F\d{3}` shape.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- `PhenixReader.plate_layout` is now a populated `PlateLayout`, so
|
|
21
|
+
`zarrmony convert` with `--layout auto` (or `--layout plate`) writes a
|
|
22
|
+
single OME-NGFF 0.5 plate store.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Bumped `zarrmony>=0.3.0` (the plate writer was added there).
|
|
27
|
+
- Multi-acquisition Phenix experiments emit a `LayoutDowngradeWarning`
|
|
28
|
+
and only the first acquisition's fields are exported.
|
|
29
|
+
|
|
30
|
+
## [0.1.0] — 2026-05-08
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- Initial release. `PhenixReader` adapter wraps `pyphenix.OperaPhenixReader`
|
|
35
|
+
and satisfies zarrmony's `ReaderProtocol`. Registers as `zarrmony-phenix`
|
|
36
|
+
via the `zarrmony.readers` entry point.
|
|
37
|
+
- Scenes flatten `(well, field)` pairs into names like `B04-f02` so plate
|
|
38
|
+
coordinates remain recoverable from flat output (zarrmony ADR-0002).
|
|
39
|
+
- `layout_hint = "plate"` set from day one; zarrmony 0.2.x ignores the hint
|
|
40
|
+
and emits per-scene flat output until HCS-Plate writer support lands.
|
|
41
|
+
- Detects both Phenix on-disk shapes: export (`Images/Index.xml`) and archive
|
|
42
|
+
(`index/*.xml`).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# zarrmony-phenix
|
|
2
|
+
|
|
3
|
+
## Agent skills
|
|
4
|
+
|
|
5
|
+
### Issue tracker
|
|
6
|
+
|
|
7
|
+
Issues live in the `ferrinm/zarrmony-phenix` GitHub repo, managed via the `gh` CLI. See `docs/agents/issue-tracker.md`.
|
|
8
|
+
|
|
9
|
+
### Triage labels
|
|
10
|
+
|
|
11
|
+
Canonical names (`needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`). See `docs/agents/triage-labels.md`.
|
|
12
|
+
|
|
13
|
+
### Domain docs
|
|
14
|
+
|
|
15
|
+
Single-context: one `CONTEXT.md` + `docs/adr/` at the repo root. See `docs/agents/domain.md`.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not restrict the use of the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Support. While redistributing the Work or
|
|
166
|
+
Derivative Works thereof, You may choose to offer, and charge a
|
|
167
|
+
fee for, acceptance of support, warranty, indemnity, or other
|
|
168
|
+
liability obligations and/or rights consistent with this License.
|
|
169
|
+
However, in accepting such obligations, You may act only on Your
|
|
170
|
+
own behalf and on Your sole responsibility, not on behalf of any
|
|
171
|
+
other Contributor, and only if You agree to indemnify, defend,
|
|
172
|
+
and hold each Contributor harmless for any liability incurred by,
|
|
173
|
+
or claims asserted against, such Contributor by reason of your
|
|
174
|
+
accepting any such warranty or support.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Calico Life Sciences LLC
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
200
|
+
implied. See the License for the specific language governing
|
|
201
|
+
permissions and limitations under the License.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: zarrmony-phenix
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Opera Phenix reader plugin for zarrmony — wraps pyphenix.OperaPhenixReader.
|
|
5
|
+
Project-URL: Homepage, https://github.com/ferrinm/zarrmony-phenix
|
|
6
|
+
Project-URL: Issues, https://github.com/ferrinm/zarrmony-phenix/issues
|
|
7
|
+
Project-URL: Changelog, https://github.com/ferrinm/zarrmony-phenix/blob/main/CHANGELOG.md
|
|
8
|
+
Author-email: Max Ferrin <ferrin@calicolabs.com>
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Python: >=3.13
|
|
12
|
+
Requires-Dist: dask>=2026.3.0
|
|
13
|
+
Requires-Dist: numpy>=2
|
|
14
|
+
Requires-Dist: pyphenix>=0.3.3
|
|
15
|
+
Requires-Dist: xarray>=2025.9.0
|
|
16
|
+
Requires-Dist: zarrmony>=0.3.0
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest-cov>=7; extra == 'dev'
|
|
19
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
20
|
+
Requires-Dist: ruff>=0.14; extra == 'dev'
|
|
21
|
+
Requires-Dist: tifffile>=2024.0; extra == 'dev'
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# zarrmony-phenix
|
|
25
|
+
|
|
26
|
+
Opera Phenix reader plugin for [zarrmony](https://github.com/ferrinm/zarrmony).
|
|
27
|
+
Wraps [`pyphenix.OperaPhenixReader`](https://github.com/ferrinm/pyphenix) so
|
|
28
|
+
that `zarrmony convert /path/to/PhenixExperiment` Just Works.
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install zarrmony-phenix
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
This pulls `zarrmony` and `pyphenix` from PyPI as transitive dependencies.
|
|
37
|
+
|
|
38
|
+
## Verify the plugin registered
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from zarrmony.readers.plugin import list_plugins
|
|
42
|
+
print([p.name for p in list_plugins()])
|
|
43
|
+
# -> [..., 'zarrmony-phenix']
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Use
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
zarrmony inspect /path/to/PhenixExperiment # lists fields per well
|
|
50
|
+
zarrmony convert /path/to/PhenixExperiment ./out
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`zarrmony convert` defaults to `--layout auto`, which dispatches to the HCS
|
|
54
|
+
plate writer for plate-shaped readers. The output at `./out` is a single
|
|
55
|
+
OME-NGFF 0.5 plate store: well groups at `<row>/<column>/` (e.g. `B/04/`)
|
|
56
|
+
each containing one image per imaged field. Pass `--layout plate` to make
|
|
57
|
+
the choice explicit, or `--layout per-scene` to produce one
|
|
58
|
+
`<scene>.ome.zarr` per FOV instead.
|
|
59
|
+
|
|
60
|
+
Scenes are named with the vendor's native field labels (`F001`, `F002`, …);
|
|
61
|
+
plate coordinates live on the `plate_layout` attribute that zarrmony's plate
|
|
62
|
+
writer consumes (see the
|
|
63
|
+
[reader-plugin authoring guide §9](https://github.com/ferrinm/zarrmony/blob/main/docs/writing-a-reader-plugin.md#9-writing-a-plate-shaped-reader)
|
|
64
|
+
and zarrmony [ADR-0004](https://github.com/ferrinm/zarrmony/blob/main/docs/adr/0004-plate-output-design.md)).
|
|
65
|
+
Multi-acquisition Phenix experiments emit a `LayoutDowngradeWarning` and
|
|
66
|
+
only the first acquisition's fields are exported; pass `--layout per-scene`
|
|
67
|
+
to get all acquisitions in one pass.
|
|
68
|
+
|
|
69
|
+
### Migrating from v0.1.0
|
|
70
|
+
|
|
71
|
+
- Scene names changed from `<row-letter><col>-f<field>` (e.g. `B04-f02`)
|
|
72
|
+
to vendor-native field labels (`F001`, `F002`, …). Code that keys
|
|
73
|
+
`--per-scene-metadata` (or anything else) by the old name must be
|
|
74
|
+
re-keyed; plate coordinates now live on `reader.plate_layout`, not in
|
|
75
|
+
the scene name.
|
|
76
|
+
- Default output is now a single plate store, not one
|
|
77
|
+
`.ome.zarr` per FOV. Pass `--layout per-scene` to keep the v0.1.0 shape.
|
|
78
|
+
- `zarrmony>=0.3.0` is now required (the plate writer ships there).
|
|
79
|
+
|
|
80
|
+
## Supported Phenix exports
|
|
81
|
+
|
|
82
|
+
- **Export format**: directory with `Images/Index.xml` and TIFFs under
|
|
83
|
+
`Images/`.
|
|
84
|
+
- **Archive format**: directory with `index/<something>.xml` and TIFFs under
|
|
85
|
+
`images/`.
|
|
86
|
+
|
|
87
|
+
Detection is by the presence of either marker; both are scored equally.
|
|
88
|
+
|
|
89
|
+
## Limitations
|
|
90
|
+
|
|
91
|
+
- **Flat-field correction is disabled.** zarrmony streams data into Zarr
|
|
92
|
+
chunk-by-chunk and pyphenix's FFC pipeline requires loading whole stacks
|
|
93
|
+
eagerly. If you need FFC-corrected output, run pyphenix's own loader and
|
|
94
|
+
feed the corrected NumPy arrays into a custom writer.
|
|
95
|
+
- **Multi-acquisition Phenix experiments degrade gracefully.** Zarrmony's
|
|
96
|
+
v1 plate writer is single-acquisition; if more than one `AcquisitionID`
|
|
97
|
+
is detected in `Index.xml`, the adapter emits a `LayoutDowngradeWarning`
|
|
98
|
+
and exports only the first acquisition's fields. Pass
|
|
99
|
+
`--layout per-scene` to capture every acquisition as its own store.
|
|
100
|
+
|
|
101
|
+
## Why a separate package?
|
|
102
|
+
|
|
103
|
+
Phenix carries real domain logic (FFC math, plate-coordinate parsing, mosaic
|
|
104
|
+
stitching) and dependencies (PIL, custom XML parsing) that don't belong in
|
|
105
|
+
zarrmony's import graph. See zarrmony [ADR-0003](https://github.com/ferrinm/zarrmony/blob/main/docs/adr/0003-external-adapter-package-for-non-bioio-readers.md)
|
|
106
|
+
for the full rationale and the
|
|
107
|
+
[reader-plugin authoring guide](https://github.com/ferrinm/zarrmony/blob/main/docs/writing-a-reader-plugin.md)
|
|
108
|
+
for how to build your own.
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
Apache-2.0.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# zarrmony-phenix
|
|
2
|
+
|
|
3
|
+
Opera Phenix reader plugin for [zarrmony](https://github.com/ferrinm/zarrmony).
|
|
4
|
+
Wraps [`pyphenix.OperaPhenixReader`](https://github.com/ferrinm/pyphenix) so
|
|
5
|
+
that `zarrmony convert /path/to/PhenixExperiment` Just Works.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install zarrmony-phenix
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This pulls `zarrmony` and `pyphenix` from PyPI as transitive dependencies.
|
|
14
|
+
|
|
15
|
+
## Verify the plugin registered
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from zarrmony.readers.plugin import list_plugins
|
|
19
|
+
print([p.name for p in list_plugins()])
|
|
20
|
+
# -> [..., 'zarrmony-phenix']
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Use
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
zarrmony inspect /path/to/PhenixExperiment # lists fields per well
|
|
27
|
+
zarrmony convert /path/to/PhenixExperiment ./out
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`zarrmony convert` defaults to `--layout auto`, which dispatches to the HCS
|
|
31
|
+
plate writer for plate-shaped readers. The output at `./out` is a single
|
|
32
|
+
OME-NGFF 0.5 plate store: well groups at `<row>/<column>/` (e.g. `B/04/`)
|
|
33
|
+
each containing one image per imaged field. Pass `--layout plate` to make
|
|
34
|
+
the choice explicit, or `--layout per-scene` to produce one
|
|
35
|
+
`<scene>.ome.zarr` per FOV instead.
|
|
36
|
+
|
|
37
|
+
Scenes are named with the vendor's native field labels (`F001`, `F002`, …);
|
|
38
|
+
plate coordinates live on the `plate_layout` attribute that zarrmony's plate
|
|
39
|
+
writer consumes (see the
|
|
40
|
+
[reader-plugin authoring guide §9](https://github.com/ferrinm/zarrmony/blob/main/docs/writing-a-reader-plugin.md#9-writing-a-plate-shaped-reader)
|
|
41
|
+
and zarrmony [ADR-0004](https://github.com/ferrinm/zarrmony/blob/main/docs/adr/0004-plate-output-design.md)).
|
|
42
|
+
Multi-acquisition Phenix experiments emit a `LayoutDowngradeWarning` and
|
|
43
|
+
only the first acquisition's fields are exported; pass `--layout per-scene`
|
|
44
|
+
to get all acquisitions in one pass.
|
|
45
|
+
|
|
46
|
+
### Migrating from v0.1.0
|
|
47
|
+
|
|
48
|
+
- Scene names changed from `<row-letter><col>-f<field>` (e.g. `B04-f02`)
|
|
49
|
+
to vendor-native field labels (`F001`, `F002`, …). Code that keys
|
|
50
|
+
`--per-scene-metadata` (or anything else) by the old name must be
|
|
51
|
+
re-keyed; plate coordinates now live on `reader.plate_layout`, not in
|
|
52
|
+
the scene name.
|
|
53
|
+
- Default output is now a single plate store, not one
|
|
54
|
+
`.ome.zarr` per FOV. Pass `--layout per-scene` to keep the v0.1.0 shape.
|
|
55
|
+
- `zarrmony>=0.3.0` is now required (the plate writer ships there).
|
|
56
|
+
|
|
57
|
+
## Supported Phenix exports
|
|
58
|
+
|
|
59
|
+
- **Export format**: directory with `Images/Index.xml` and TIFFs under
|
|
60
|
+
`Images/`.
|
|
61
|
+
- **Archive format**: directory with `index/<something>.xml` and TIFFs under
|
|
62
|
+
`images/`.
|
|
63
|
+
|
|
64
|
+
Detection is by the presence of either marker; both are scored equally.
|
|
65
|
+
|
|
66
|
+
## Limitations
|
|
67
|
+
|
|
68
|
+
- **Flat-field correction is disabled.** zarrmony streams data into Zarr
|
|
69
|
+
chunk-by-chunk and pyphenix's FFC pipeline requires loading whole stacks
|
|
70
|
+
eagerly. If you need FFC-corrected output, run pyphenix's own loader and
|
|
71
|
+
feed the corrected NumPy arrays into a custom writer.
|
|
72
|
+
- **Multi-acquisition Phenix experiments degrade gracefully.** Zarrmony's
|
|
73
|
+
v1 plate writer is single-acquisition; if more than one `AcquisitionID`
|
|
74
|
+
is detected in `Index.xml`, the adapter emits a `LayoutDowngradeWarning`
|
|
75
|
+
and exports only the first acquisition's fields. Pass
|
|
76
|
+
`--layout per-scene` to capture every acquisition as its own store.
|
|
77
|
+
|
|
78
|
+
## Why a separate package?
|
|
79
|
+
|
|
80
|
+
Phenix carries real domain logic (FFC math, plate-coordinate parsing, mosaic
|
|
81
|
+
stitching) and dependencies (PIL, custom XML parsing) that don't belong in
|
|
82
|
+
zarrmony's import graph. See zarrmony [ADR-0003](https://github.com/ferrinm/zarrmony/blob/main/docs/adr/0003-external-adapter-package-for-non-bioio-readers.md)
|
|
83
|
+
for the full rationale and the
|
|
84
|
+
[reader-plugin authoring guide](https://github.com/ferrinm/zarrmony/blob/main/docs/writing-a-reader-plugin.md)
|
|
85
|
+
for how to build your own.
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
Apache-2.0.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Domain Docs
|
|
2
|
+
|
|
3
|
+
How the engineering skills should consume this repo's domain documentation when exploring the codebase.
|
|
4
|
+
|
|
5
|
+
## Before exploring, read these
|
|
6
|
+
|
|
7
|
+
- **`CONTEXT.md`** at the repo root, or
|
|
8
|
+
- **`CONTEXT-MAP.md`** at the repo root if it exists — it points at one `CONTEXT.md` per context. Read each one relevant to the topic.
|
|
9
|
+
- **`docs/adr/`** — read ADRs that touch the area you're about to work in. In multi-context repos, also check `src/<context>/docs/adr/` for context-scoped decisions.
|
|
10
|
+
|
|
11
|
+
If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The producer skill (`/grill-with-docs`) creates them lazily when terms or decisions actually get resolved.
|
|
12
|
+
|
|
13
|
+
## File structure
|
|
14
|
+
|
|
15
|
+
This repo is **single-context**:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/
|
|
19
|
+
├── CONTEXT.md
|
|
20
|
+
├── docs/adr/
|
|
21
|
+
│ ├── 0001-example-decision.md
|
|
22
|
+
│ └── 0002-another-decision.md
|
|
23
|
+
└── src/
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
For reference, a multi-context layout (not used here) would have `CONTEXT-MAP.md` at the root pointing to per-context `CONTEXT.md` files under `src/<context>/`.
|
|
27
|
+
|
|
28
|
+
## Use the glossary's vocabulary
|
|
29
|
+
|
|
30
|
+
When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids.
|
|
31
|
+
|
|
32
|
+
If the concept you need isn't in the glossary yet, that's a signal — either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/grill-with-docs`).
|
|
33
|
+
|
|
34
|
+
## Flag ADR conflicts
|
|
35
|
+
|
|
36
|
+
If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
|
|
37
|
+
|
|
38
|
+
> _Contradicts ADR-0007 (event-sourced orders) — but worth reopening because…_
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Issue tracker: GitHub
|
|
2
|
+
|
|
3
|
+
Issues and PRDs for this repo live as GitHub issues. Use the `gh` CLI for all operations.
|
|
4
|
+
|
|
5
|
+
## Conventions
|
|
6
|
+
|
|
7
|
+
- **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
|
|
8
|
+
- **Read an issue**: `gh issue view <number> --comments`, filtering comments by `jq` and also fetching labels.
|
|
9
|
+
- **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
|
|
10
|
+
- **Comment on an issue**: `gh issue comment <number> --body "..."`
|
|
11
|
+
- **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
|
|
12
|
+
- **Close**: `gh issue close <number> --comment "..."`
|
|
13
|
+
|
|
14
|
+
Infer the repo from `git remote -v` — `gh` does this automatically when run inside a clone.
|
|
15
|
+
|
|
16
|
+
## When a skill says "publish to the issue tracker"
|
|
17
|
+
|
|
18
|
+
Create a GitHub issue.
|
|
19
|
+
|
|
20
|
+
## When a skill says "fetch the relevant ticket"
|
|
21
|
+
|
|
22
|
+
Run `gh issue view <number> --comments`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Triage Labels
|
|
2
|
+
|
|
3
|
+
The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
|
|
4
|
+
|
|
5
|
+
| Label in mattpocock/skills | Label in our tracker | Meaning |
|
|
6
|
+
| -------------------------- | -------------------- | ---------------------------------------- |
|
|
7
|
+
| `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
|
|
8
|
+
| `needs-info` | `needs-info` | Waiting on reporter for more information |
|
|
9
|
+
| `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
|
|
10
|
+
| `ready-for-human` | `ready-for-human` | Requires human implementation |
|
|
11
|
+
| `wontfix` | `wontfix` | Will not be actioned |
|
|
12
|
+
|
|
13
|
+
When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
|
|
14
|
+
|
|
15
|
+
Edit the right-hand column to match whatever vocabulary you actually use.
|
|
16
|
+
|
|
17
|
+
## Note on label creation
|
|
18
|
+
|
|
19
|
+
Only `wontfix` exists in the repo today. The other four will need to be created the first time a triage skill applies them — `gh label create <name>` will do this. Creating them lazily is fine; the skill will surface a clear error if the label is missing.
|