Skill Tracer
Skills › Scientific Agent Skills › pathml › multiparametric.md

multiparametric.md

381 lines · skills/pathml/references/multiparametric.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Multiparametric imaging, spatial data, and Mesmer integration
2
3This reference targets **PathML 3.0.8 stable**. It distinguishes generic loading
4support from a dedicated analysis implementation and corrects older examples that
5invented MERFISH decoders, spectral unmixing options, named-channel arguments, or
6a DeepCell cloud prediction endpoint.
7

Multiparametric imaging, spatial data, and Mesmer integration

This reference targets PathML 3.0.8 stable. It distinguishes generic loading support from a dedicated analysis implementation and corrects older examples that invented MERFISH decoders, spectral unmixing options, named-channel arguments, or a DeepCell cloud prediction endpoint.

Raw lines 1 to 7
8## Stable slide types and array order
9
10```python
11from pathml.core import CODEXSlide, MultiparametricSlide, VectraSlide
13codex = CODEXSlide(
14 "data/codex_region.tif",
15 name="slide-001",
16 backend="bioformats",
18vectra = VectraSlide(
19 "data/vectra_component_data.tif",
20 name="slide-002",
22generic = MultiparametricSlide(
23 "data/multiplex.ome.tiff",
24 name="slide-003",
26```
28Bio-Formats returns PathML arrays as:
30```text
31(i, j, z, c, t) = (row, column, z-plane, channel, time/cycle)
32```
34Generic Bio-Formats support means a format may be readable. It does not mean
35PathML implements registration, decoding, spectral unmixing, compensation,
36autofluorescence correction, cell phenotyping, or platform-specific QC for that
37format.
39Stable PathML has convenience classes for CODEX and Vectra. It can load examples
40of MERFISH/Visium-like image data through generic backends, but it has no
41`MERFISHSlide`, `DecodeMERFISH`, or `AssignTranscripts` stable API.

Stable slide types and array order

from pathml.core import CODEXSlide, MultiparametricSlide, VectraSlide

codex = CODEXSlide(
    "data/codex_region.tif",
    name="slide-001",
    backend="bioformats",
)
vectra = VectraSlide(
    "data/vectra_component_data.tif",
    name="slide-002",
)
generic = MultiparametricSlide(
    "data/multiplex.ome.tiff",
    name="slide-003",
)

Bio-Formats returns PathML arrays as:

(i, j, z, c, t) = (row, column, z-plane, channel, time/cycle)

Generic Bio-Formats support means a format may be readable. It does not mean PathML implements registration, decoding, spectral unmixing, compensation, autofluorescence correction, cell phenotyping, or platform-specific QC for that format.

Stable PathML has convenience classes for CODEX and Vectra. It can load examples of MERFISH/Visium-like image data through generic backends, but it has no MERFISHSlide, DecodeMERFISH, or AssignTranscripts stable API.

Raw lines 8 to 42
43## Channel manifest
45Create a local, versioned channel manifest before processing:
47```text
48channel_index,channel_name,marker,cycle,z_plane,role,exposure,batch
490,DAPI,DAPI,0,2,nuclear,100,run-01
501,CD45,CD45,0,2,membrane,150,run-01
512,CD3,CD3,1,2,measurement,200,run-01
52```
54Validate:
56- channel index is zero-based, unique, and matches array order;
57- DAPI/nuclear and membrane/cytoplasm choices are biologically and technically
58 appropriate;
59- cycle and Z-plane mappings are documented;
60- blank, autofluorescence, isotype, and positive controls are identified;
61- saturation, clipping, hot pixels, bleed-through, exposure, registration, and
62 missing channels are assessed;
63- marker names are not inferred from position alone.
65Do not include patient names, accession numbers, or other direct identifiers.

Channel manifest

Create a local, versioned channel manifest before processing:

channel_index,channel_name,marker,cycle,z_plane,role,exposure,batch
0,DAPI,DAPI,0,2,nuclear,100,run-01
1,CD45,CD45,0,2,membrane,150,run-01
2,CD3,CD3,1,2,measurement,200,run-01

Validate:

  • channel index is zero-based, unique, and matches array order;
  • DAPI/nuclear and membrane/cytoplasm choices are biologically and technically appropriate;
  • cycle and Z-plane mappings are documented;
  • blank, autofluorescence, isotype, and positive controls are identified;
  • saturation, clipping, hot pixels, bleed-through, exposure, registration, and missing channels are assessed;
  • marker names are not inferred from position alone.

Do not include patient names, accession numbers, or other direct identifiers.

Raw lines 43 to 66
67## CODEX collapse
69Stable signature:
71```python
72from pathml.preprocessing import CollapseRunsCODEX, Pipeline
74pipeline = Pipeline([CollapseRunsCODEX(z=2)])
75```
77`CollapseRunsCODEX(z)` expects `(i, j, z, c, t)`, combines `c` and `t` into one
78channel axis, selects the zero-based Z-plane, and produces `(i, j, c*t)`.
80It does **not**:
82- register cycles;
83- choose a focal plane automatically;
84- subtract background;
85- reorder markers from a manifest;
86- aggregate with max/mean/median; or
87- correct illumination or bleed-through.
89Perform and validate those operations upstream with a protocol appropriate to the
90acquisition system. Record the exact flattened `(cycle, channel) → output index`
91mapping.
93The actual C-order reshape maps `(channel, cycle)` to
94`output_index = channel * n_cycles + cycle` (cycle varies fastest). Verify it
95with a channel-coded synthetic array; do not assume cycle-major order. The
96released Z-index assertion checks the flattened channel axis by mistake, so
97validate `0 <= z < image.shape[2]` yourself before calling it.

CODEX collapse

Stable signature:

from pathml.preprocessing import CollapseRunsCODEX, Pipeline

pipeline = Pipeline([CollapseRunsCODEX(z=2)])

CollapseRunsCODEX(z) expects (i, j, z, c, t), combines c and t into one channel axis, selects the zero-based Z-plane, and produces (i, j, c*t).

It does not:

  • register cycles;
  • choose a focal plane automatically;
  • subtract background;
  • reorder markers from a manifest;
  • aggregate with max/mean/median; or
  • correct illumination or bleed-through.

Perform and validate those operations upstream with a protocol appropriate to the acquisition system. Record the exact flattened (cycle, channel) → output index mapping.

The actual C-order reshape maps (channel, cycle) to output_index = channel * n_cycles + cycle (cycle varies fastest). Verify it with a channel-coded synthetic array; do not assume cycle-major order. The released Z-index assertion checks the flattened channel axis by mistake, so validate 0 <= z < image.shape[2] yourself before calling it.

Raw lines 67 to 98
99## Vectra collapse
101Stable signature:
103```python
104from pathml.preprocessing import CollapseRunsVectra
106collapse = CollapseRunsVectra()
107```
109It applies `numpy.squeeze` to coerce the image toward `(i, j, c)`. It does not
110accept wavelengths and does not perform spectral unmixing or autofluorescence
111correction. Supply already unmixed component data or perform those steps with
112validated upstream software. Verify that squeezing singleton axes did not remove
113an axis whose semantics must be retained.

Vectra collapse

Stable signature:

from pathml.preprocessing import CollapseRunsVectra

collapse = CollapseRunsVectra()

It applies numpy.squeeze to coerce the image toward (i, j, c). It does not accept wavelengths and does not perform spectral unmixing or autofluorescence correction. Supply already unmixed component data or perform those steps with validated upstream software. Verify that squeezing singleton axes did not remove an axis whose semantics must be retained.

Raw lines 99 to 114
115## Segmentation choices

Segmentation choices

Raw lines 115 to 116
117### Preferred no-network posture
119For sensitive images, use an institution-approved local segmenter with a
120reviewed, checksummed local model and network disabled. PathML's generic local
121ONNX `Inference` can run compatible models, but Mesmer-specific pre/postprocessing
122must match the model card exactly.
124PathML 3.0.8 has no fully offline, nondeprecated Mesmer convenience class that
125accepts a pre-provisioned model without trying a network download. Plan this
126constraint before choosing PathML's Mesmer wrapper.

Preferred no-network posture

For sensitive images, use an institution-approved local segmenter with a reviewed, checksummed local model and network disabled. PathML's generic local ONNX Inference can run compatible models, but Mesmer-specific pre/postprocessing must match the model card exactly.

PathML 3.0.8 has no fully offline, nondeprecated Mesmer convenience class that accepts a pre-provisioned model without trying a network download. Plan this constraint before choosing PathML's Mesmer wrapper.

Raw lines 117 to 127
128### `SegmentMIFRemote`: local inference after a model download
130Stable signature:
132```text
133SegmentMIFRemote(
134 model_path="temp.onnx",
135 nuclear_channel=<integer index>,
136 cytoplasm_channel=<integer index>,
137 image_resolution=0.5,
138 preprocess_kwargs=None,
139 postprocess_kwargs_nuclear=None,
140 postprocess_kwargs_whole_cell=None,
142```
144Despite the name, v3.0.8 does not send images to a DeepCell prediction service.
145At construction it performs an HTTP GET from:
147```text
148https://huggingface.co/pathml/test/resolve/main/mesmer.onnx
149```
151It writes the response to `temp.onnx`, loads that ONNX model, and runs pixels
152locally with ONNX Runtime. The outbound request discloses ordinary connection
153metadata (for example IP address and request headers) to Hugging Face; image
154pixels, channel data, and PathML metadata are not uploaded by this stable source.
156Security and reproducibility limitations:
158- construction has a network side effect;
159- there is no built-in checksum, signature, offline flag, timeout, or size cap;
160- inherited `local=False` forces `temp.onnx`, even if `SegmentMIFRemote` receives
161 a different `model_path`; a supplied destination does not prevent overwriting
162 that working-directory file;
163- the model supports 256×256 input and 0.5 µm/pixel in stable code;
164- `nuclear_channel` and `cytoplasm_channel` are integer indices, not names.
166Validate HWC input (despite a contradictory channel-first wrapper docstring),
167both spatial dimensions equal to 256, distinct valid channel indices, and
1680.5 µm/pixel before constructing/running the wrapper. The source only prints for
169other resolutions and its shape check uses `and`, so one incorrect spatial axis
170can escape that check; it does not resample to the model resolution for you.
172Do not instantiate it until the user explicitly consents to that endpoint and
173download. Do not use it in a network-disabled workflow.
175On 2026-10-01 the public Hugging Face model metadata listed both artifacts and
176HEAD requests followed download redirects successfully (Mesmer 104,218,552 bytes;
177HoVer-Net test model 151,068,601 bytes). These were unauthenticated metadata/HEAD
178probes only, not weight downloads, checksum verification, or inference tests.

SegmentMIFRemote: local inference after a model download

Stable signature:

SegmentMIFRemote(
    model_path="temp.onnx",
    nuclear_channel=<integer index>,
    cytoplasm_channel=<integer index>,
    image_resolution=0.5,
    preprocess_kwargs=None,
    postprocess_kwargs_nuclear=None,
    postprocess_kwargs_whole_cell=None,
)

Despite the name, v3.0.8 does not send images to a DeepCell prediction service. At construction it performs an HTTP GET from:

https://huggingface.co/pathml/test/resolve/main/mesmer.onnx

It writes the response to temp.onnx, loads that ONNX model, and runs pixels locally with ONNX Runtime. The outbound request discloses ordinary connection metadata (for example IP address and request headers) to Hugging Face; image pixels, channel data, and PathML metadata are not uploaded by this stable source.

Security and reproducibility limitations:

  • construction has a network side effect;
  • there is no built-in checksum, signature, offline flag, timeout, or size cap;
  • inherited local=False forces temp.onnx, even if SegmentMIFRemote receives a different model_path; a supplied destination does not prevent overwriting that working-directory file;
  • the model supports 256×256 input and 0.5 µm/pixel in stable code;
  • nuclear_channel and cytoplasm_channel are integer indices, not names.

Validate HWC input (despite a contradictory channel-first wrapper docstring), both spatial dimensions equal to 256, distinct valid channel indices, and 0.5 µm/pixel before constructing/running the wrapper. The source only prints for other resolutions and its shape check uses and, so one incorrect spatial axis can escape that check; it does not resample to the model resolution for you.

Do not instantiate it until the user explicitly consents to that endpoint and download. Do not use it in a network-disabled workflow.

On 2026-10-01 the public Hugging Face model metadata listed both artifacts and HEAD requests followed download redirects successfully (Mesmer 104,218,552 bytes; HoVer-Net test model 151,068,601 bytes). These were unauthenticated metadata/HEAD probes only, not weight downloads, checksum verification, or inference tests.

Raw lines 128 to 179
180### Deprecated `SegmentMIF`
182`SegmentMIF` imports `deepcell.applications.Mesmer` and calls its prediction API
183locally. PathML emits a deprecation warning directing users to
184`SegmentMIFRemote`. `deepcell` is not a PathML extra and is not declared in
185PathML's PyPI dependencies. Depending on the DeepCell version/cache, model
186initialization may fetch weights.
188Do not silently install an unpinned DeepCell stack or assume compatibility with
189PathML's pinned Python/TensorFlow ecosystem. If legacy replication requires it,
190lock the complete environment, pre-provision and verify artifacts, test with
191synthetic data, disable network during sensitive runs, and document the
192deprecation.

Deprecated SegmentMIF

SegmentMIF imports deepcell.applications.Mesmer and calls its prediction API locally. PathML emits a deprecation warning directing users to SegmentMIFRemote. deepcell is not a PathML extra and is not declared in PathML's PyPI dependencies. Depending on the DeepCell version/cache, model initialization may fetch weights.

Do not silently install an unpinned DeepCell stack or assume compatibility with PathML's pinned Python/TensorFlow ecosystem. If legacy replication requires it, lock the complete environment, pre-provision and verify artifacts, test with synthetic data, disable network during sensitive runs, and document the deprecation.

Raw lines 180 to 193
194## Explicit network consent template
196Before any download or hosted inference, present:
198```text
199Action: download model | download public dataset | upload image for prediction
200Destination: exact HTTPS host and path
201Outbound data: exact pixels/channels/metadata/identifiers, or "none; GET only"
202Inbound artifact: name, expected bytes, version, SHA-256/signature
203Local destination: approved path
204Retention/logging: vendor and institutional policy
205Authorization: data-use agreement/consent/waiver and user approval
206Alternative: local, network-disabled method
207```
209Only proceed after explicit opt-in. A future hosted endpoint that receives image
210data needs a new disclosure; do not infer permission from consent to download a
211model. Never upload PHI by default.

Explicit network consent template

Before any download or hosted inference, present:

Action: download model | download public dataset | upload image for prediction
Destination: exact HTTPS host and path
Outbound data: exact pixels/channels/metadata/identifiers, or "none; GET only"
Inbound artifact: name, expected bytes, version, SHA-256/signature
Local destination: approved path
Retention/logging: vendor and institutional policy
Authorization: data-use agreement/consent/waiver and user approval
Alternative: local, network-disabled method

Only proceed after explicit opt-in. A future hosted endpoint that receives image data needs a new disclosure; do not infer permission from consent to download a model. Never upload PHI by default.

Raw lines 194 to 212
213## Quantification
215Read Bio-Formats tiles with `normalize=False` for measurement. Its default
216normalization casts to 8-bit and can destroy quantitative dynamic range; h5path
217then separately stores images/masks as float16. Keep authoritative raw channels
218and integer instance maps outside that lossy storage path.
220Stable transform:
222```python
223from pathml.preprocessing import QuantifyMIF
225quantify = QuantifyMIF(segmentation_mask="cell_segmentation")
226```
228Input requirements:
230- tile image `(i, j, channels)`;
231- instance segmentation `(i, j)` or `(i, j, 1)`;
232- 0 is background and each object has a unique positive integer;
233- tile slide type has fluorescence stain;
234- `tile.coords` is present.
236`QuantifyMIF.apply(tile)` writes an `AnnData` object to `tile.counts`.
237Stable output contains:
239- `X`: per-object mean intensity for each channel;
240- `layers["min_intensity"]` and `layers["max_intensity"]`;
241- `obs["label"]`, `filled_area`, `euler_number`, `x`, and `y`;
242- `obsm["spatial"]`: `(x, y)` centroids.
244Channel variables are generated from numeric positions. Assign marker names only
245after matching the validated channel manifest:
247```python
248counts = tile.counts
249assert counts.n_vars == len(channel_names)
250counts.var_names = channel_names
251```
253Do not interpret raw intensity as abundance without validated background,
254normalization, exposure, compensation/unmixing, segmentation, and batch policies.

Quantification

Read Bio-Formats tiles with normalize=False for measurement. Its default normalization casts to 8-bit and can destroy quantitative dynamic range; h5path then separately stores images/masks as float16. Keep authoritative raw channels and integer instance maps outside that lossy storage path.

Stable transform:

from pathml.preprocessing import QuantifyMIF

quantify = QuantifyMIF(segmentation_mask="cell_segmentation")

Input requirements:

  • tile image (i, j, channels);
  • instance segmentation (i, j) or (i, j, 1);
  • 0 is background and each object has a unique positive integer;
  • tile slide type has fluorescence stain;
  • tile.coords is present.

QuantifyMIF.apply(tile) writes an AnnData object to tile.counts. Stable output contains:

  • X: per-object mean intensity for each channel;
  • layers["min_intensity"] and layers["max_intensity"];
  • obs["label"], filled_area, euler_number, x, and y;
  • obsm["spatial"]: (x, y) centroids.

Channel variables are generated from numeric positions. Assign marker names only after matching the validated channel manifest:

counts = tile.counts
assert counts.n_vars == len(channel_names)
counts.var_names = channel_names

Do not interpret raw intensity as abundance without validated background, normalization, exposure, compensation/unmixing, segmentation, and batch policies.

Raw lines 213 to 255
256## Coordinate conversion
258`Tile.coords` uses selected-level `(i, j)`. `QuantifyMIF` adds tile offsets to
259region centroids, then stores:
261- `obs["y"]`: row coordinate;
262- `obs["x"]`: column coordinate;
263- `obsm["spatial"]`: `[x, y]`.
265Convert selected-level pixels to level-0 and physical units:
267```text
268x_um = x_selected_level * level_downsample * mpp_x
269y_um = y_selected_level * level_downsample * mpp_y
270```
272Record whether coordinates are pixel centers, integer-rounded centroids, or
273continuous region centroids. Preserve source level and MPP. Do not combine slides
274with different resolutions in a shared coordinate space without conversion.
275The scalar-downsample formula assumes a validated series/pyramid transform and
276correct region origins; Bio-Formats series need not form a pyramid, and PathML's
277OpenSlide fractional-downsample origin issue must be excluded first.

Coordinate conversion

Tile.coords uses selected-level (i, j). QuantifyMIF adds tile offsets to region centroids, then stores:

  • obs["y"]: row coordinate;
  • obs["x"]: column coordinate;
  • obsm["spatial"]: [x, y].

Convert selected-level pixels to level-0 and physical units:

x_um = x_selected_level * level_downsample * mpp_x
y_um = y_selected_level * level_downsample * mpp_y

Record whether coordinates are pixel centers, integer-rounded centroids, or continuous region centroids. Preserve source level and MPP. Do not combine slides with different resolutions in a shared coordinate space without conversion. The scalar-downsample formula assumes a validated series/pyramid transform and correct region origins; Bio-Formats series need not form a pyramid, and PathML's OpenSlide fractional-downsample origin issue must be excluded first.

Raw lines 256 to 278
279## Spatial/multiplex schema
281For exchange, use one row per cell:
283```text
284cell_id,patient_id,slide_id,tile_i,tile_j,x,y,coordinate_unit,level,
285segmentation_label,area,marker:DAPI,marker:CD3,marker:CD8,...
286```
288Required invariants:
290- `(slide_id, cell_id)` is unique;
291- coordinates are finite and nonnegative;
292- `coordinate_unit` is explicit (`level_pixels`, `level0_pixels`, or `um`);
293- all rows for a slide agree on level/unit/channel schema;
294- marker values are finite or use one documented missing-value policy;
295- instance IDs do not collide when tiles are merged;
296- overlapping-tile duplicate cells are reconciled before counts;
297- patient/slide split is included or joinable without PHI.
299Validate bounded local CSV:
301```bash
302python scripts/validate_spatial_schema.py multiplex \
303 --input derived/cells.csv \
304 --root . \
305 --marker-columns marker:DAPI,marker:CD3,marker:CD8
306```

Spatial/multiplex schema

For exchange, use one row per cell:

cell_id,patient_id,slide_id,tile_i,tile_j,x,y,coordinate_unit,level,
segmentation_label,area,marker:DAPI,marker:CD3,marker:CD8,...

Required invariants:

  • (slide_id, cell_id) is unique;
  • coordinates are finite and nonnegative;
  • coordinate_unit is explicit (level_pixels, level0_pixels, or um);
  • all rows for a slide agree on level/unit/channel schema;
  • marker values are finite or use one documented missing-value policy;
  • instance IDs do not collide when tiles are merged;
  • overlapping-tile duplicate cells are reconciled before counts;
  • patient/slide split is included or joinable without PHI.

Validate bounded local CSV:

python scripts/validate_spatial_schema.py multiplex \
  --input derived/cells.csv \
  --root . \
  --marker-columns marker:DAPI,marker:CD3,marker:CD8
Raw lines 279 to 307
Runs code python scripts/validate_spatial_schema.py :302
308## Segmentation and marker QC
310Review representative training regions:
312- nuclear and whole-cell overlays;
313- object count, area, eccentricity, border-touching fraction, holes/fragments;
314- merge/split errors and compartment consistency;
315- negative/blank controls and background distributions;
316- per-channel saturation and dynamic range;
317- spatial striping, illumination, cycle registration, and tissue folds;
318- cell density by tissue compartment and slide;
319- marker distributions by batch/site/scanner;
320- effects of image resolution and channel choice.
322Freeze QC thresholds before the test set. Report exclusions and sensitivity
323analyses rather than hiding failed tiles.

Segmentation and marker QC

Review representative training regions:

  • nuclear and whole-cell overlays;
  • object count, area, eccentricity, border-touching fraction, holes/fragments;
  • merge/split errors and compartment consistency;
  • negative/blank controls and background distributions;
  • per-channel saturation and dynamic range;
  • spatial striping, illumination, cycle registration, and tissue folds;
  • cell density by tissue compartment and slide;
  • marker distributions by batch/site/scanner;
  • effects of image resolution and channel choice.

Freeze QC thresholds before the test set. Report exclusions and sensitivity analyses rather than hiding failed tiles.

Raw lines 308 to 324
325## Combining AnnData safely
327Before concatenation:
329- make `obs_names` globally unique with pseudonymous slide and cell IDs;
330- store `patient_id`, `slide_id`, `site`, `batch`, and `split` in `obs`;
331- enforce identical marker identity/order or perform an explicit outer join;
332- record raw versus transformed layers;
333- preserve coordinate unit/level per slide;
334- never batch-correct using held-out test data;
335- keep spatial neighbors within slides unless a cross-slide graph is scientifically
336 defined.
338Threshold cell typing from markers is a research annotation procedure, not a
339diagnosis. Use controls and domain review, and report ambiguous/unassigned cells.

Combining AnnData safely

Before concatenation:

  • make obs_names globally unique with pseudonymous slide and cell IDs;
  • store patient_id, slide_id, site, batch, and split in obs;
  • enforce identical marker identity/order or perform an explicit outer join;
  • record raw versus transformed layers;
  • preserve coordinate unit/level per slide;
  • never batch-correct using held-out test data;
  • keep spatial neighbors within slides unless a cross-slide graph is scientifically defined.

Threshold cell typing from markers is a research annotation procedure, not a diagnosis. Use controls and domain review, and report ambiguous/unassigned cells.

Raw lines 325 to 340
341## Stable versus absent APIs
343Present in stable:
345- `MultiparametricSlide`, `VectraSlide`, `CODEXSlide`
346- `CollapseRunsCODEX(z)`
347- `CollapseRunsVectra()`
348- `SegmentMIFRemote(...)`
349- deprecated `SegmentMIF(...)`
350- `QuantifyMIF(segmentation_mask)`
352Not present as stable APIs:
354- named-channel arguments such as `"DAPI"` or `"CD45"` for segmentation;
355- `CollapseRunsCODEX(method=..., background_subtract=...)`;
356- `CollapseRunsVectra(wavelengths=..., unmix=True)`;
357- `MERFISHSlide`, `DecodeMERFISH`, or `AssignTranscripts`;
358- a DeepCell image-upload URL in PathML;
359- automatic marker names in `QuantifyMIF`;
360- automatic cell-type annotation.

Stable versus absent APIs

Present in stable:

  • MultiparametricSlide, VectraSlide, CODEXSlide
  • CollapseRunsCODEX(z)
  • CollapseRunsVectra()
  • SegmentMIFRemote(...)
  • deprecated SegmentMIF(...)
  • QuantifyMIF(segmentation_mask)

Not present as stable APIs:

  • named-channel arguments such as "DAPI" or "CD45" for segmentation;
  • CollapseRunsCODEX(method=..., background_subtract=...);
  • CollapseRunsVectra(wavelengths=..., unmix=True);
  • MERFISHSlide, DecodeMERFISH, or AssignTranscripts;
  • a DeepCell image-upload URL in PathML;
  • automatic marker names in QuantifyMIF;
  • automatic cell-type annotation.
Raw lines 341 to 361
362## Sources and further reading
364API baseline reviewed 2026-10-01 using the released wheel/tag; hosted docs may lag.
366- Stable loading guide:
367 https://pathml.readthedocs.io/en/stable/loading_slides.html
368- Stable preprocessing API:
369 https://pathml.readthedocs.io/en/stable/api_preprocessing_reference.html
370- Stable transforms source:
371 https://github.com/Dana-Farber-AIOS/pathml/blob/v3.0.8/pathml/preprocessing/transforms.py
372- Stable inference source:
373 https://github.com/Dana-Farber-AIOS/pathml/blob/v3.0.8/pathml/inference/inference.py
374- Stable multiplex tutorial:
375 https://pathml.readthedocs.io/en/stable/examples/link_multiplex_if.html
376- Stable CODEX tutorial:
377 https://pathml.readthedocs.io/en/stable/examples/link_codex.html
378- Greenwald et al. (2022), Mesmer:
379 https://doi.org/10.1038/s41587-021-01094-0
380- Omar et al. (2025), antibody-based multiplex workflows:
381 https://doi.org/10.1016/j.labinv.2025.104220

Sources and further reading

API baseline reviewed 2026-10-01 using the released wheel/tag; hosted docs may lag.

  • Stable loading guide: https://pathml.readthedocs.io/en/stable/loading_slides.html
  • Stable preprocessing API: https://pathml.readthedocs.io/en/stable/api_preprocessing_reference.html
  • Stable transforms source: https://github.com/Dana-Farber-AIOS/pathml/blob/v3.0.8/pathml/preprocessing/transforms.py
  • Stable inference source: https://github.com/Dana-Farber-AIOS/pathml/blob/v3.0.8/pathml/inference/inference.py
  • Stable multiplex tutorial: https://pathml.readthedocs.io/en/stable/examples/link_multiplex_if.html
  • Stable CODEX tutorial: https://pathml.readthedocs.io/en/stable/examples/link_codex.html
  • Greenwald et al. (2022), Mesmer: https://doi.org/10.1038/s41587-021-01094-0
  • Omar et al. (2025), antibody-based multiplex workflows: https://doi.org/10.1016/j.labinv.2025.104220
Raw lines 362 to 381