Skip to content

Commit 86e789f

Browse files
Merge pull request #165 from LukasHats/steinbock_reader
adjusted docstrings in steinbock reader py file
2 parents 753826e + b534195 commit 86e789f

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ __pycache__/
3535
_version.py
3636
node_modules/
3737
.code-workspace
38+
.asv/
39+
uv.lock
3840

3941
# memray report
4042
*.bin

src/spatialdata_io/readers/steinbock.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,29 @@ def steinbock(
5050
Returns
5151
-------
5252
:class:`spatialdata.SpatialData`
53+
54+
Notes
55+
-----
56+
Mandatory outputs of the Steinbock pipeline required by this reader:
57+
58+
- ``cells.h5ad``: the AnnData object in the main working directory
59+
- ``ome/``: directory containing the steinbock OME-TIFF images (``*.ome.tiff``)
60+
- ``masks_deepcell/`` or ``masks_ilastik/``: the masks directory, selected via the
61+
``labels_kind`` parameter (only one is used at a time)
62+
63+
When exporting to AnnData with ``steinbock export anndata``, the ``--info`` option
64+
(default: ``images.csv``) controls whether image metadata is embedded. When present,
65+
steinbock copies the ``image`` column from ``images.csv`` into ``adata.obs.image`` for
66+
every cell; this reader requires that column to map cells to their source image. Without
67+
it, ``adata.obs.image`` will not exist and the reader will fail. ``images.csv`` is
68+
generated automatically by ``steinbock preprocess imc images`` when starting from
69+
``.mcd`` files. Users who start from TIFF images must hand-craft ``images.csv`` with at
70+
least the columns ``image``, ``width_px``, ``height_px``, and ``num_channels`` as
71+
described in the
72+
`Steinbock file types documentation <https://bodenmillergroup.github.io/steinbock/latest/file-types/>`_.
73+
74+
All AnnData tables, masks, and OME-TIFFs must follow the steinbock naming conventions so
75+
that the reader can correctly match all instances.
5376
"""
5477
path = Path(path)
5578

0 commit comments

Comments
 (0)