Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Fix and update docs #38

Merged
merged 5 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
transform_shapes
```

<!-- ## Plotting
## Write

```{eval-rst}
.. module:: dvpio.pl
.. currentmodule:: dvpio
.. currentmodule:: dvpio.write
.. autosummary::
:toctree: generated

``` -->
write_lmd
```
4 changes: 2 additions & 2 deletions src/dvpio/read/image/czi.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ def read_czi(
Path to file
chunk_size
Size of the individual regions that are read into memory during the process
kwargs
Keyword arguments passed to Image2DModel.parse
channels
If multiple channels are available, select these channels
timepoint
If timeseries, select the given index (defaults to 0 [first])
z_stack
If z_stack, defaults to the given stack/index (defaults to 0 [first])
kwargs
Keyword arguments passed to :meth:`spatialdata.models.Image2DModel.parse`

Returns
-------
Expand Down
8 changes: 4 additions & 4 deletions src/dvpio/read/shapes/lmd_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def transform_shapes(

Returns
-------
`class`::`spatialdata.models.ShapesModel`
:class:`spatialdata.models.ShapesModel`
Transformed shapes in target coordinate system

Object has special attributes

- `ShapesModel.attrs.transformation`
- global: (image coordinates)
- leica_micro_dissection: Leica coordinate system transformation
- `global`: (image coordinates)
- `to_lmd`: Leica coordinate system transformation

Raises
------
Expand Down Expand Up @@ -104,7 +104,7 @@ def read_lmd(path: str, calibration_points_image: PointsModel, switch_orientatio

Returns
-------
`class`::`spatialdata.models.ShapesModel`
:class:`spatialdata.models.ShapesModel`
Transformed shapes in image coordinates.

Object has special attributes
Expand Down
15 changes: 7 additions & 8 deletions src/dvpio/write/lmd_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,21 @@ def write_lmd(
----------
path:
Export path for .xml
sdata
Spatialdata
annotation
Shapes to export with pyLMD
calibration_points
Calibration points in the image.
Calibration points in image coordinates
affine_transformation
Optional. Affine transformation to apply to the data to recover Leica coordinate system. If None,
tries to recover the `leica_micro_dissection` coordinate transformation from the `annotation`
`class`::`spatialdata.models.ShapesModel` object
Optional. Affine transformation to apply to the data to recover Leica coordinate system. If `None`,
tries to recover the `to_lmd` coordinate transformation from the `annotation`
:class:`spatialdata.models.ShapesModel` object
annotation_name_column
Optional. Provide column that specifies a (unique) cell name in `annotation`
`class`::`spatialdata.models.ShapesModel` object. Will be stored in as the tag of
:class:`spatialdata.models.ShapesModel` object. Will be stored as the tag of
the Shape.
annotation_well_column
Optional. Provide column that specifies a well in the `annotation`
`class`::`spatialdata.models.ShapesModel` object. Will be stored in as the `CapID` attribute of
:class:`spatialdata.models.ShapesModel` object. Will be stored in as the `CapID` attribute of
the Shape.
overwrite
Default `True`. Whether to overwrite existing data.
Expand All @@ -51,6 +49,7 @@ def write_lmd(
Example
-------
.. code-block:: python

from spatialdata.models import ShapesModel, PointsModel
from tempfile import mkdtemp
from dvpio.write import write_lmd
Expand Down
Loading