ngio 0.3.0a0__tar.gz → 0.3.0a1__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.
- ngio-0.3.0a1/CHANGELOG.md +7 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/PKG-INFO +2 -1
- ngio-0.3.0a1/docs/changelog.md +5 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/code_of_conduct.md +2 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/getting_started/1_ome_zarr_containers.md +1 -1
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/getting_started/3_tables.md +3 -3
- ngio-0.3.0a1/docs/table_specs/backend.md +112 -0
- ngio-0.3.0a1/docs/table_specs/overview.md +92 -0
- ngio-0.3.0a1/docs/table_specs/table_types/condition_table.md +28 -0
- ngio-0.3.0a1/docs/table_specs/table_types/custom_table.md +6 -0
- ngio-0.3.0a1/docs/table_specs/table_types/feature_table.md +54 -0
- ngio-0.3.0a1/docs/table_specs/table_types/generic_table.md +23 -0
- ngio-0.3.0a1/docs/table_specs/table_types/masking_roi_table.md +35 -0
- ngio-0.3.0a1/docs/table_specs/table_types/roi_table.md +39 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/mkdocs.yml +13 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/pyproject.toml +1 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/hcs/plate.py +4 -4
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/images/ome_zarr_container.py +4 -4
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/_meta_handlers.py +16 -8
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/__init__.py +6 -1
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/abstract_table.py +5 -4
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/backends/__init__.py +6 -4
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/backends/_abstract_backend.py +1 -1
- ngio-0.3.0a0/src/ngio/tables/backends/_anndata_v1.py → ngio-0.3.0a1/src/ngio/tables/backends/_anndata.py +1 -1
- ngio-0.3.0a0/src/ngio/tables/backends/_csv_v1.py → ngio-0.3.0a1/src/ngio/tables/backends/_csv.py +2 -2
- ngio-0.3.0a0/src/ngio/tables/backends/_json_v1.py → ngio-0.3.0a1/src/ngio/tables/backends/_json.py +1 -1
- ngio-0.3.0a0/src/ngio/tables/backends/_parquet_v1.py → ngio-0.3.0a1/src/ngio/tables/backends/_parquet.py +2 -2
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/backends/_table_backends.py +7 -5
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/tables_container.py +13 -13
- ngio-0.3.0a1/src/ngio/tables/v1/__init__.py +23 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/v1/_condition_table.py +7 -3
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/v1/_feature_table.py +10 -12
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/v1/_generic_table.py +13 -2
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/v1/_roi_table.py +10 -6
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/common/test_table_ops.py +1 -1
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/hcs/test_plate.py +1 -1
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/tables/test_backends.py +25 -27
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/tables/test_feature_table.py +3 -3
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/tables/test_generic_table.py +2 -2
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/tables/test_masking_roi_table_v1.py +3 -3
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/tables/test_roi_table_v1.py +7 -5
- ngio-0.3.0a0/src/ngio/tables/v1/__init__.py +0 -14
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.copier-answers.yml +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.gitattributes +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.github/ISSUE_TEMPLATE.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.github/TEST_FAIL_TEMPLATE.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.github/dependabot.yml +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.github/scripts/download_data.sh +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.github/workflows/build_docs.yml +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.github/workflows/ci.yml +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.gitignore +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/.pre-commit-config.yaml +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/LICENSE +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/README.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/_typos.toml +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/api/common.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/api/hcs.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/api/images.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/api/ngio.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/api/tables.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/api/utils.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/contributing.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/getting_started/0_quickstart.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/getting_started/2_images.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/getting_started/4_masked_images.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/getting_started/5_hcs.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/index.md +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/tutorials/feature_extraction.ipynb +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/tutorials/hcs_processing.ipynb +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/tutorials/image_processing.ipynb +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/docs/tutorials/image_segmentation.ipynb +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/__init__.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/__init__.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_array_pipe.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_axes_transforms.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_common_types.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_dimensions.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_masking_roi.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_pyramid.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_roi.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_slicer.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_table_ops.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/common/_zoom.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/hcs/__init__.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/images/__init__.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/images/abstract_image.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/images/create.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/images/image.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/images/label.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/images/masked_image.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/__init__.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/__init__.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_axes.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_channels.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_dataset.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_hcs.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_image.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_pixel_size.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/v04/__init__.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/v04/_custom_models.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/v04/_v04_spec_utils.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/backends/_anndata_utils.py +0 -0
- /ngio-0.3.0a0/src/ngio/tables/backends/_non_zarr_backends_v1.py → /ngio-0.3.0a1/src/ngio/tables/backends/_non_zarr_backends.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/tables/backends/_utils.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/utils/__init__.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/utils/_datasets.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/utils/_errors.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/utils/_fractal_fsspec_store.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/utils/_logger.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/src/ngio/utils/_zarr_utils.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/conftest.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/meta/base_ome_zarr_image_meta.json +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/meta/base_ome_zarr_image_meta_wrong_axis_order.json +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/meta/base_ome_zarr_label_meta.json +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/meta/base_ome_zarr_well_meta.json +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/data/v04/meta/ome_zarr_well_path_normalization_meta.json +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/common/test_dimensions.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/common/test_pyramid.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/common/test_roi.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/hcs/test_well.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/images/test_create.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/images/test_images.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/images/test_masked_images.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/images/test_omezarr_container.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/ome_zarr_meta/test_image_handler.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/ome_zarr_meta/test_unit_ngio_specs.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/ome_zarr_meta/test_unit_v04_utils.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/tables/test_backends_utils.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/tables/test_table_group.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/utils/test_download_datasets.py +0 -0
- {ngio-0.3.0a0 → ngio-0.3.0a1}/tests/unit/utils/test_zarr_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ngio
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.0a1
|
|
4
4
|
Summary: Next Generation file format IO
|
|
5
5
|
Project-URL: homepage, https://github.com/fractal-analytics-platform/ngio
|
|
6
6
|
Project-URL: repository, https://github.com/fractal-analytics-platform/ngio
|
|
@@ -50,6 +50,7 @@ Requires-Dist: mkdocs; extra == 'docs'
|
|
|
50
50
|
Requires-Dist: mkdocs-autorefs; extra == 'docs'
|
|
51
51
|
Requires-Dist: mkdocs-git-committers-plugin-2; extra == 'docs'
|
|
52
52
|
Requires-Dist: mkdocs-git-revision-date-localized-plugin; extra == 'docs'
|
|
53
|
+
Requires-Dist: mkdocs-include-markdown-plugin; extra == 'docs'
|
|
53
54
|
Requires-Dist: mkdocs-jupyter; extra == 'docs'
|
|
54
55
|
Requires-Dist: mkdocs-material; extra == 'docs'
|
|
55
56
|
Requires-Dist: mkdocstrings[python]; extra == 'docs'
|
|
@@ -89,7 +89,7 @@ Examples of the OME-Zarr metadata access:
|
|
|
89
89
|
|
|
90
90
|
To access images, labels, and tables, you can use the `get_image`, `get_label`, and `get_table` methods of the `OME-Zarr Container` object.
|
|
91
91
|
|
|
92
|
-
A variety of examples and additional information can be found in the [Images and Labels](./2_images.md), and [Tables](
|
|
92
|
+
A variety of examples and additional information can be found in the [Images and Labels](./2_images.md), and [Tables](./3_tables.md) sections.
|
|
93
93
|
|
|
94
94
|
## Creating derived images
|
|
95
95
|
|
|
@@ -190,7 +190,7 @@ Tables (differently from Images and Labels) can be purely in memory objects, and
|
|
|
190
190
|
>>> from ngio.tables import FeatureTable
|
|
191
191
|
>>> import pandas as pd
|
|
192
192
|
>>> example_data = pd.DataFrame({"label": [1, 2, 3], "area": [100, 200, 300]})
|
|
193
|
-
>>> feature_table = FeatureTable(
|
|
193
|
+
>>> feature_table = FeatureTable(table_data=example_data)
|
|
194
194
|
>>> feature_table
|
|
195
195
|
>>> print(feature_table) # markdown-exec: hide
|
|
196
196
|
```
|
|
@@ -203,7 +203,7 @@ Tables (differently from Images and Labels) can be purely in memory objects, and
|
|
|
203
203
|
>>> from ngio.tables import GenericTable
|
|
204
204
|
>>> import pandas as pd
|
|
205
205
|
>>> example_data = pd.DataFrame({"area": [100, 200, 300], "perimeter": [50, 60, 70]})
|
|
206
|
-
>>> generic_table = GenericTable(
|
|
206
|
+
>>> generic_table = GenericTable(table_data=example_data)
|
|
207
207
|
>>> generic_table
|
|
208
208
|
>>> print(generic_table) # markdown-exec: hide
|
|
209
209
|
```
|
|
@@ -212,7 +212,7 @@ Tables (differently from Images and Labels) can be purely in memory objects, and
|
|
|
212
212
|
>>> from ngio.tables import GenericTable
|
|
213
213
|
>>> import anndata as ad
|
|
214
214
|
>>> adata = ad.AnnData(X=np.random.rand(10, 5), obs=pd.DataFrame({"cell_type": ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]}))
|
|
215
|
-
>>> generic_table = GenericTable(
|
|
215
|
+
>>> generic_table = GenericTable(table_data=adata)
|
|
216
216
|
>>> generic_table
|
|
217
217
|
>>> print(generic_table) # markdown-exec: hide
|
|
218
218
|
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Table Backends
|
|
2
|
+
|
|
3
|
+
In ngio we implemented four different table backends. Each table backend is a python class that can serialize tabular data into OME-Zarr containers.
|
|
4
|
+
|
|
5
|
+
These backends are wrappers around existing tooling implemented in `anndata`, `pandas`, and `polars`.
|
|
6
|
+
Currently, we provide a thin layer of metadata and table normalization to ensure that tables are serialized/deserialized in a consistent way across the different backends and across different table objects.
|
|
7
|
+
|
|
8
|
+
In particular, we provide the metadata that describes the intended index key and type of the table for each backend.
|
|
9
|
+
|
|
10
|
+
## AnnData Backend
|
|
11
|
+
|
|
12
|
+
AnnData is a widely used format in single-cell genomics, and can natively store complex tabular data in a Zarr group. The AnnData backend in ngio is a wrapper around the `anndata` library, which performs some table normalization for consistency and compatibility with the ngio table specifications.
|
|
13
|
+
|
|
14
|
+
The following normalization steps are applied to each table before saving it to the AnnData backend:
|
|
15
|
+
|
|
16
|
+
- We separate the table in two parts: The floating point columns are casted to `float32` and stored as `X` in the AnnData object, while the categorical, boolean, and integer columns are stored as `obs`.
|
|
17
|
+
- The index column is cast to a string, and the name and original type is stored in the zarr attributes.
|
|
18
|
+
|
|
19
|
+
AnnData backend metadata:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
// Backend metadata
|
|
24
|
+
"backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
|
|
25
|
+
"index_key": "index", // The default index key for the table, which is used to identify each row.
|
|
26
|
+
"index_type": "str", // Either "int" or "str"
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Additionally, the AnnData package will write some additional metadata to the group attributes
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"encoding-type": "anndata",
|
|
35
|
+
"encoding-version": "0.1.0",
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Parquet Backend
|
|
40
|
+
|
|
41
|
+
The Parquet backend is a high-performance columnar storage format that is widely used in big data processing. It is designed to efficiently store large datasets and can be used with various data processing frameworks.
|
|
42
|
+
Another advantage of the Parquet backend is that it can be used lazily, meaning that the data is not loaded into memory until it is needed. This can be useful for working with large datasets that do not fit into memory.
|
|
43
|
+
|
|
44
|
+
Parquet backend metadata:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
// Backend metadata
|
|
49
|
+
"backend": "parquet", // the backend used to store the table, e.g. "annadata", "parquet", etc..
|
|
50
|
+
"index_key": "index", // The default index key for the table, which is used to identify each row.
|
|
51
|
+
"index_type": "int", // Either "int" or "str"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The Zarr group directory will contain the Parquet file, and the metadata will be stored in the group attributes.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
table.zarr # Zarr group for the table
|
|
59
|
+
├── table.parquet # Parquet file containing the table data
|
|
60
|
+
├── .zattrs # Zarr group attributes containing the metadata
|
|
61
|
+
└── .zgroup # Zarr group metadata
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## CSV Backend
|
|
65
|
+
|
|
66
|
+
The CSV backend is a plain text format that is widely used for tabular data. It is easy to read and write, and can be used across many different tools.
|
|
67
|
+
|
|
68
|
+
The CSV backen in ngio follows closely the same specifications as the Parquet backend, with the following metadata:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
// Backend metadata
|
|
73
|
+
"backend": "csv", // the backend used to store the table, e.g. "annadata", "parquet", etc..
|
|
74
|
+
"index_key": "index", // The default index key for the table, which is used to identify each row.
|
|
75
|
+
"index_type": "int", // Either "int" or "str"
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The Zarr group directory will contain the CSV file, and the metadata will be stored in the group attributes.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
table.zarr # Zarr group for the table
|
|
83
|
+
├── table.csv # CSV file containing the table data
|
|
84
|
+
├── .zattrs # Zarr group attributes containing the metadata
|
|
85
|
+
└── .zgroup # Zarr group metadata
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## JSON Backend
|
|
89
|
+
|
|
90
|
+
The JSON backend serializes the table data into the Zarr group attributes as a JSON object. This backend is useful for tiny tables.
|
|
91
|
+
|
|
92
|
+
JSON backend metadata:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
// Backend metadata
|
|
97
|
+
"backend": "json", // the backend used to store the table, e.g. "annadata", "parquet", etc..
|
|
98
|
+
"index_key": "index", // The default index key for the table, which is used to identify each row.
|
|
99
|
+
"index_type": "int" // Either "int" or "str"
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The table will be stored in a subgroup of the Zarr group, and the metadata will be stored in the group attributes. Storing the table in a subgroup instead of a standalone json file allows for easier access via the Zarr API.
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
table.zarr # Zarr group for the table
|
|
107
|
+
└── table # Zarr subgroup containing the table data
|
|
108
|
+
├── .zattrs # the json table data serialized as a JSON object
|
|
109
|
+
└── .zgroup # Zarr group metadata
|
|
110
|
+
├── .zattrs # Zarr group attributes containing the metadata
|
|
111
|
+
└── .zgroup # Zarr group metadata
|
|
112
|
+
```
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Tables Overview
|
|
2
|
+
|
|
3
|
+
Ngio's architecture is designed to tightly integrate image and tabular data. For this purpose we developed custom specifications for serializing and deserializing tabular data into OME-Zarr containers, and semantically typed tables derived from the [fractal table specification](https://fractal-analytics-platform.github.io/fractal-tasks-core/tables/).
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
The ngio tables architectures is composed of three main components:
|
|
8
|
+
|
|
9
|
+
### 1. Table Backends
|
|
10
|
+
|
|
11
|
+
A backend module is a class that can serialize tabular data into OME-Zarr containers. We currently support four on-disk file formats:
|
|
12
|
+
|
|
13
|
+
- **AnnData**: Commonly used in single-cell genomics and was the standard table for the initial Fractal table spec.
|
|
14
|
+
- **Parquet**: A columnar storage file format optimized for large datasets.
|
|
15
|
+
- **CSV**: A simple text format for tabular data, easily human readable and writable.
|
|
16
|
+
- **JSON**: A lightweight data interchange format that both readable and efficient for small tables.
|
|
17
|
+
|
|
18
|
+
A more detailed description of the backend module can be found in the [Table Backends documentation](backend.md).
|
|
19
|
+
|
|
20
|
+
### 2. In-Memory Table Objects
|
|
21
|
+
|
|
22
|
+
These are Python objects that represent the tabular data in memory. They provide a convenient interface for manipulating and analyzing the data without needing to interact directly with the underlying file format. We support the following in-memory table objects:
|
|
23
|
+
|
|
24
|
+
- **Pandas DataFrame**: The most commonly used data structure for tabular data in Python.
|
|
25
|
+
- **Polars LazyFrame**: A fast DataFrame implementation that allows for lazy evaluation and efficient computation on large datasets.
|
|
26
|
+
- **AnnData**: A specialized data structure for single-cell genomics data, which goes beyond simple tabular data.
|
|
27
|
+
|
|
28
|
+
We also provide utilities to convert between these in-memory representations in a standardized way based on the table type specifications/metadata.
|
|
29
|
+
|
|
30
|
+
### 3. Table Type Specifications
|
|
31
|
+
|
|
32
|
+
These specifications define structured tables that standardize common table types used in image analysis. We have defined five table types so far:
|
|
33
|
+
|
|
34
|
+
- **Generic Tables**: A flexible table type that can represent any tabular data. See more in the [Generic Tables documentation](table_types/generic_table.md).
|
|
35
|
+
- **ROI Tables**: A table type specifically designed for representing Regions of Interest (ROIs) in images. See more in the [ROI Tables documentation](table_types/roi_table.md).
|
|
36
|
+
- **Masking ROI Tables**: A specialized table type for representing ROIs that are associated with specific labels in a OME-Zarr label image. See more in the [Masking ROI Tables documentation](table_types/masking_roi_table.md).
|
|
37
|
+
- **Feature Tables**: A table type for representing features extracted from images. This table is also associated with a specific label image. See more in the [Feature Tables documentation](table_types/feature_table.md).
|
|
38
|
+
- **Condition Tables**: A table to represent experimental conditions or metadata associated with images or experiments. See more in the [Condition Tables documentation](table_types/condition_table.md).
|
|
39
|
+
|
|
40
|
+
## Tables Groups
|
|
41
|
+
|
|
42
|
+
Tables in OME-Zarr images are organized into groups of tables. Each group is saved in a Zarr group, and can be associated with a specific image or plate. The tables groups are:
|
|
43
|
+
|
|
44
|
+
- **Image Tables**: These tables are a sub group of the OME-Zarr image group and contain metadata or features related only to that specific image. The `.zarr` hierarchy is based on image [specification in NGFF 0.4](https://ngff.openmicroscopy.org/0.4/index.html#image-layout). The subgroup structure is based on the approach of the OME-Zarr `labels` group.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
image.zarr # Zarr group for a OME-Zarr image
|
|
48
|
+
|
|
|
49
|
+
├── 0 # Zarr array for multiscale level 0
|
|
50
|
+
├── ...
|
|
51
|
+
├── N # Zarr array for multiscale level N
|
|
52
|
+
|
|
|
53
|
+
├── labels # Zarr subgroup with a list of labels associated to this image
|
|
54
|
+
| ├── label_A # Zarr subgroup for a given label
|
|
55
|
+
| ├── label_B # Zarr subgroup for a given label
|
|
56
|
+
| └── ...
|
|
57
|
+
|
|
|
58
|
+
└── tables # Zarr subgroup with a list of tables associated to this image
|
|
59
|
+
├── table_1 # Zarr subgroup for a given table
|
|
60
|
+
├── table_2 # Zarr subgroup for a given table
|
|
61
|
+
└── ...
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- **Plate Tables**: These tables are a sub group of the OME-Zarr plate group and contain metadata or features related only to that specific plate.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
plate.zarr # Zarr group for a OME-Zarr HCS plate
|
|
68
|
+
|
|
|
69
|
+
├── A # Row A of the plate
|
|
70
|
+
| ├── 1 # Column 0 of row A
|
|
71
|
+
| | ├── 0 # Acquisition 0 of column A1
|
|
72
|
+
| | ├── 1 # Acquisition 1 of column A1
|
|
73
|
+
| | └── ... # Other acquisitions of column A1
|
|
74
|
+
...
|
|
75
|
+
├── tables # Zarr subgroup with a list of tables associated to this plate
|
|
76
|
+
| ├── table_1 # Zarr subgroup for a given table
|
|
77
|
+
| ├── table_2 # Zarr subgroup for a given table
|
|
78
|
+
| └── ...
|
|
79
|
+
└── ...
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
If a plate table contains per image information, the table should contain a `row`, `column`, and `path_in_well` columns.
|
|
83
|
+
|
|
84
|
+
## Tables Group Attributes
|
|
85
|
+
|
|
86
|
+
The Zarr attributes of the tables group must include the key tables, pointing to the list of all tables (this simplifies discovery of tables associated to the current OME-Zarr image or plate), as in
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"tables": ["table_1", "table_2"]
|
|
91
|
+
}
|
|
92
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Condition Table
|
|
2
|
+
|
|
3
|
+
A condition table is a simple table that can be used to represent experimental conditions or metadata associated with images or experiments. It is a flexible table type that can be used to store any kind of metadata related to the images or experiments.
|
|
4
|
+
|
|
5
|
+
Example condition table:
|
|
6
|
+
|
|
7
|
+
| Cell Type | Drug | Dose |
|
|
8
|
+
|-----------|-----------|------|
|
|
9
|
+
| A | Drug A | 10 |
|
|
10
|
+
| A | Drug B | 20 |
|
|
11
|
+
|
|
12
|
+
## Specifications
|
|
13
|
+
|
|
14
|
+
### V1
|
|
15
|
+
|
|
16
|
+
A condition table must include the following metadata fields in the group attributes:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
// Condition table metadata
|
|
21
|
+
"type": "condition_table",
|
|
22
|
+
"table_version": "1",
|
|
23
|
+
// Backend metadata
|
|
24
|
+
"backend": "csv", // the backend used to store the table, e.g. "annadata", "parquet", etc..
|
|
25
|
+
"index_key": "index", // The default index key for the condition table, which is used to identify each row.
|
|
26
|
+
"index_type": "int" // Either "int" or "str"
|
|
27
|
+
}
|
|
28
|
+
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Add a Custom Table
|
|
2
|
+
|
|
3
|
+
Ngio allows users to define custom tables that can be used to store any kind of tabular data. Custom tables are flexible and can be used to represent any kind of data that does not fit into the predefined table types.
|
|
4
|
+
|
|
5
|
+
!!! warning
|
|
6
|
+
The library is still in the early stages and full documentation for custom tables is not yet available.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Feature Tables
|
|
2
|
+
|
|
3
|
+
A feature table is a table type for representing per object features in an image. Each row in a feature table corresponds to a specific label in the label image.
|
|
4
|
+
|
|
5
|
+
Feature tables can optionally include metadata to specify the type of features stored in each column:
|
|
6
|
+
|
|
7
|
+
- `measurement`: A quantitative measurement of the object, such as area, perimeter, or intensity.
|
|
8
|
+
- `categorical`: A categorical feature of the object, such as a classification label or a type.
|
|
9
|
+
- `metadata`: Additional free-from columns that can be used to store any other information about the object, but that should not be used for analysis/classification purposes.
|
|
10
|
+
|
|
11
|
+
These feature types inform casting of the values when serialising a table and can be used in downstream analysis to select specific subsets of features. The feature type can be explicitly specified in the feature table metadata. Alternatively, if a column is not specified, we apply the following casting rules:
|
|
12
|
+
|
|
13
|
+
- If the column contains only numeric values, it is considered a `measurement`.
|
|
14
|
+
- If the column contains string or boolean values, it is considered a `categorical`.
|
|
15
|
+
- The index column is considered a `categorical` feature.
|
|
16
|
+
|
|
17
|
+
## Specifications
|
|
18
|
+
|
|
19
|
+
### V1
|
|
20
|
+
|
|
21
|
+
A feature table must include the following metadata fields in the group attributes:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
// Feature table metadata
|
|
26
|
+
"type": "feature_table",
|
|
27
|
+
"table_version": "1",
|
|
28
|
+
"region": {"path": "../labels/label_DAPI"}, // Path to the label image associated with this feature table
|
|
29
|
+
// Backend metadata
|
|
30
|
+
"backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
|
|
31
|
+
"index_key": "label",
|
|
32
|
+
"index_type": "int", // Either "int" or "str"
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Additionally, it can include feature type information such as:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"categorical_columns": [
|
|
41
|
+
"label",
|
|
42
|
+
"cell_type",
|
|
43
|
+
],
|
|
44
|
+
"measurement_columns": [
|
|
45
|
+
"area",
|
|
46
|
+
"perimeter",
|
|
47
|
+
"intensity_mean",
|
|
48
|
+
"intensity_std"
|
|
49
|
+
],
|
|
50
|
+
"metadata_columns": [
|
|
51
|
+
"description",
|
|
52
|
+
],
|
|
53
|
+
}
|
|
54
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generic Tables
|
|
2
|
+
|
|
3
|
+
A generic table is a flexible table type that can represent any tabular data. It is not tied to any specific domain or use case, making it suitable for a wide range of custom applications.
|
|
4
|
+
|
|
5
|
+
Generic tables can used as a safe fallback when trying to read a table that does not match any other specific table type.
|
|
6
|
+
|
|
7
|
+
## Specifications
|
|
8
|
+
|
|
9
|
+
### V1
|
|
10
|
+
|
|
11
|
+
A generic table should include the following metadata fields in the group attributes:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
// Generic table metadata
|
|
16
|
+
"type": "generic_table",
|
|
17
|
+
"table_version": "1",
|
|
18
|
+
// Backend metadata
|
|
19
|
+
"backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
|
|
20
|
+
"index_key": "index", // The default index key for the generic table, which is used to identify each row.
|
|
21
|
+
"index_type": "int" // Either "int" or "str"
|
|
22
|
+
}
|
|
23
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Masking ROI Tables
|
|
2
|
+
|
|
3
|
+
A masking ROI table is a specialized table type for representing Regions of Interest (ROIs) that are associated with specific labels in a label image.
|
|
4
|
+
Each row in a masking ROI table corresponds to a specific label in the label image.
|
|
5
|
+
|
|
6
|
+
Masking ROI tables can be used for several purposes, such as:
|
|
7
|
+
|
|
8
|
+
- Feature extraction from specific regions in the image.
|
|
9
|
+
- Masking specific regions in the image for further processing. For example a masking ROI table could store the ROIs for specific tissues, and for each of these ROIs we would like to perform cell segmentation.
|
|
10
|
+
|
|
11
|
+
## Specifications
|
|
12
|
+
|
|
13
|
+
### V1
|
|
14
|
+
|
|
15
|
+
A ROI table must include the following metadata fields in the group attributes:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
// ROI table metadata
|
|
20
|
+
"type": "masking_roi_table",
|
|
21
|
+
"table_version": "1",
|
|
22
|
+
"region": {"path": "../labels/label_DAPI"}, // Path to the label image associated with this masking ROI table
|
|
23
|
+
// Backend metadata
|
|
24
|
+
"backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
|
|
25
|
+
"index_key": "label", // The default index key for the ROI table, which is used to identify each ROI.
|
|
26
|
+
"index_type": "int", // Either "int" or "str"
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Moreover the ROI table must include the following columns:
|
|
31
|
+
|
|
32
|
+
- `x_micrometer`, `y_micrometer`, `z_micrometer`: the top-left corner coordinates of the ROI in micrometers.
|
|
33
|
+
- `len_x_micrometer`, `len_y_micrometer`, `len_z_micrometer`: the size of the ROI in micrometers along each axis.
|
|
34
|
+
|
|
35
|
+
Additionally, each ROI can include the following optional columns: see [ROI Table](./roi_table.md).
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# ROI Table
|
|
2
|
+
|
|
3
|
+
A ROI table defines regions of space which are axes-aligned bounding boxes in the image space.
|
|
4
|
+
|
|
5
|
+
ROI tables can be used for several purposes, such as:
|
|
6
|
+
|
|
7
|
+
- Storing information about the Microscope Field of View (FOV).
|
|
8
|
+
- Storing arbitrary regions of interest (ROIs).
|
|
9
|
+
- Use them as masks for other processes, such as segmentation or feature extraction.
|
|
10
|
+
|
|
11
|
+
## Specifications
|
|
12
|
+
|
|
13
|
+
### V1
|
|
14
|
+
|
|
15
|
+
A ROI table must include the following metadata fields in the group attributes:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
// ROI table metadata
|
|
20
|
+
"type": "roi_table",
|
|
21
|
+
"table_version": "1",
|
|
22
|
+
// Backend metadata
|
|
23
|
+
"backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
|
|
24
|
+
"index_key": "FieldIndex", // The default index key for the ROI table, which is used to identify each ROI.
|
|
25
|
+
"index_type": "str", // Either "int" or "str"
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Moreover the ROI table must include the following columns:
|
|
30
|
+
|
|
31
|
+
- `x_micrometer`, `y_micrometer`, `z_micrometer`: the top-left corner coordinates of the ROI in micrometers.
|
|
32
|
+
- `len_x_micrometer`, `len_y_micrometer`, `len_z_micrometer`: the size of the ROI in micrometers along each axis.
|
|
33
|
+
|
|
34
|
+
Additionally, each ROI can include the following optional columns:
|
|
35
|
+
|
|
36
|
+
- `x_micrometer_original` and `y_micrometer_original` which are the original coordinates of the ROI in micrometers. These are typically used when the data is saved in different coordinates during conversion, e.g. to avoid overwriting data from overlapping ROIs.
|
|
37
|
+
- `translation_x`, `translation_y` and `translation_z`, which are used during registration of multiplexing acquisitions.
|
|
38
|
+
|
|
39
|
+
The user can also add additional columns to the ROI table, but these columns will not be exposed in the ROI table API.
|
|
@@ -52,6 +52,7 @@ plugins:
|
|
|
52
52
|
- search
|
|
53
53
|
- autorefs
|
|
54
54
|
- markdown-exec
|
|
55
|
+
- include-markdown
|
|
55
56
|
- mkdocstrings:
|
|
56
57
|
handlers:
|
|
57
58
|
python:
|
|
@@ -99,6 +100,16 @@ nav:
|
|
|
99
100
|
- tutorials/feature_extraction.ipynb
|
|
100
101
|
- tutorials/hcs_processing.ipynb
|
|
101
102
|
|
|
103
|
+
- Table Specifications:
|
|
104
|
+
- "Overview": table_specs/overview.md
|
|
105
|
+
- "Table Backends": table_specs/backend.md
|
|
106
|
+
- "Table Types":
|
|
107
|
+
- "ROI Table": table_specs/table_types/roi_table.md
|
|
108
|
+
- "Masking ROI Table": table_specs/table_types/masking_roi_table.md
|
|
109
|
+
- "Feature Table": table_specs/table_types/feature_table.md
|
|
110
|
+
- "Condition Table": table_specs/table_types/condition_table.md
|
|
111
|
+
- "Add Custom Table": table_specs/table_types/custom_table.md
|
|
112
|
+
|
|
102
113
|
- API Reference:
|
|
103
114
|
- "ngio": api/ngio.md
|
|
104
115
|
- "ngio.images": api/images.md
|
|
@@ -106,6 +117,8 @@ nav:
|
|
|
106
117
|
- "ngio.hcs": api/hcs.md
|
|
107
118
|
- "ngio.utils": api/utils.md
|
|
108
119
|
- "ngio.common": api/common.md
|
|
120
|
+
- changelog.md
|
|
121
|
+
|
|
109
122
|
- Contributing:
|
|
110
123
|
- "Contributing Guide": contributing.md
|
|
111
124
|
- "Code of Conduct": code_of_conduct.md
|
|
@@ -32,7 +32,7 @@ from ngio.tables import (
|
|
|
32
32
|
MaskingRoiTable,
|
|
33
33
|
RoiTable,
|
|
34
34
|
Table,
|
|
35
|
-
|
|
35
|
+
TableBackend,
|
|
36
36
|
TablesContainer,
|
|
37
37
|
TableType,
|
|
38
38
|
TypedTable,
|
|
@@ -909,14 +909,14 @@ class OmeZarrPlate:
|
|
|
909
909
|
self,
|
|
910
910
|
name: str,
|
|
911
911
|
table_cls: type[TableType],
|
|
912
|
-
backend:
|
|
912
|
+
backend: TableBackend | None = None,
|
|
913
913
|
) -> TableType:
|
|
914
914
|
"""Get a table from the image as a specific type.
|
|
915
915
|
|
|
916
916
|
Args:
|
|
917
917
|
name (str): The name of the table.
|
|
918
918
|
table_cls (type[TableType]): The type of the table.
|
|
919
|
-
backend (
|
|
919
|
+
backend (TableBackend | None): The backend to use. If None,
|
|
920
920
|
the default backend is used.
|
|
921
921
|
"""
|
|
922
922
|
return self.tables_container.get_as(
|
|
@@ -929,7 +929,7 @@ class OmeZarrPlate:
|
|
|
929
929
|
self,
|
|
930
930
|
name: str,
|
|
931
931
|
table: Table,
|
|
932
|
-
backend:
|
|
932
|
+
backend: TableBackend = "anndata",
|
|
933
933
|
overwrite: bool = False,
|
|
934
934
|
) -> None:
|
|
935
935
|
"""Add a table to the image."""
|
|
@@ -28,7 +28,7 @@ from ngio.tables import (
|
|
|
28
28
|
MaskingRoiTable,
|
|
29
29
|
RoiTable,
|
|
30
30
|
Table,
|
|
31
|
-
|
|
31
|
+
TableBackend,
|
|
32
32
|
TablesContainer,
|
|
33
33
|
TableType,
|
|
34
34
|
TypedTable,
|
|
@@ -441,14 +441,14 @@ class OmeZarrContainer:
|
|
|
441
441
|
self,
|
|
442
442
|
name: str,
|
|
443
443
|
table_cls: type[TableType],
|
|
444
|
-
backend:
|
|
444
|
+
backend: TableBackend | None = None,
|
|
445
445
|
) -> TableType:
|
|
446
446
|
"""Get a table from the image as a specific type.
|
|
447
447
|
|
|
448
448
|
Args:
|
|
449
449
|
name (str): The name of the table.
|
|
450
450
|
table_cls (type[TableType]): The type of the table.
|
|
451
|
-
backend (
|
|
451
|
+
backend (TableBackend | None): The backend to use. If None,
|
|
452
452
|
the default backend is used.
|
|
453
453
|
"""
|
|
454
454
|
return self.tables_container.get_as(
|
|
@@ -469,7 +469,7 @@ class OmeZarrContainer:
|
|
|
469
469
|
self,
|
|
470
470
|
name: str,
|
|
471
471
|
table: Table,
|
|
472
|
-
backend:
|
|
472
|
+
backend: TableBackend = "anndata",
|
|
473
473
|
overwrite: bool = False,
|
|
474
474
|
) -> None:
|
|
475
475
|
"""Add a table to the image."""
|
|
@@ -187,10 +187,6 @@ class GenericMetaHandler(
|
|
|
187
187
|
|
|
188
188
|
raise NgioValueError(f"Could not load metadata: {meta_or_error}")
|
|
189
189
|
|
|
190
|
-
def safe_load_meta(self) -> _image_meta | ConverterError:
|
|
191
|
-
"""Load the metadata from the store."""
|
|
192
|
-
return self._load_meta(return_error=True)
|
|
193
|
-
|
|
194
190
|
def _write_meta(self, meta) -> None:
|
|
195
191
|
"""Write the metadata to the store."""
|
|
196
192
|
_meta = self._meta_exporter(metadata=meta)
|
|
@@ -217,6 +213,10 @@ class ImageMetaHandler(
|
|
|
217
213
|
return meta
|
|
218
214
|
raise NgioValueError(f"Could not load metadata: {meta}")
|
|
219
215
|
|
|
216
|
+
def safe_load_meta(self) -> NgioImageMeta | ConverterError:
|
|
217
|
+
"""Load the metadata from the store."""
|
|
218
|
+
return self._load_meta(return_error=True)
|
|
219
|
+
|
|
220
220
|
|
|
221
221
|
class LabelMetaHandler(
|
|
222
222
|
GenericMetaHandler[NgioLabelMeta, LabelMetaImporter, LabelMetaExporter]
|
|
@@ -230,6 +230,10 @@ class LabelMetaHandler(
|
|
|
230
230
|
return meta
|
|
231
231
|
raise NgioValueError(f"Could not load metadata: {meta}")
|
|
232
232
|
|
|
233
|
+
def safe_load_meta(self) -> NgioLabelMeta | ConverterError:
|
|
234
|
+
"""Load the metadata from the store."""
|
|
235
|
+
return self._load_meta(return_error=True)
|
|
236
|
+
|
|
233
237
|
|
|
234
238
|
###########################################################################
|
|
235
239
|
#
|
|
@@ -267,10 +271,6 @@ class GenericHCSMetaHandler(Generic[_hcs_meta, _hcs_meta_importer, _hcs_meta_exp
|
|
|
267
271
|
|
|
268
272
|
raise NgioValueError(f"Could not load metadata: {meta_or_error}")
|
|
269
273
|
|
|
270
|
-
def safe_load_meta(self) -> _hcs_meta | ConverterError:
|
|
271
|
-
"""Load the metadata from the store."""
|
|
272
|
-
return self._load_meta(return_error=True)
|
|
273
|
-
|
|
274
274
|
def _write_meta(self, meta) -> None:
|
|
275
275
|
_meta = self._meta_exporter(metadata=meta)
|
|
276
276
|
self._group_handler.write_attrs(_meta)
|
|
@@ -295,6 +295,10 @@ class WellMetaHandler(
|
|
|
295
295
|
return meta
|
|
296
296
|
raise NgioValueError(f"Could not load metadata: {meta}")
|
|
297
297
|
|
|
298
|
+
def safe_load_meta(self) -> NgioWellMeta | ConverterError:
|
|
299
|
+
"""Load the metadata from the store."""
|
|
300
|
+
return self._load_meta(return_error=True)
|
|
301
|
+
|
|
298
302
|
|
|
299
303
|
class PlateMetaHandler(
|
|
300
304
|
GenericHCSMetaHandler[NgioPlateMeta, PlateMetaImporter, PlateMetaExporter]
|
|
@@ -308,6 +312,10 @@ class PlateMetaHandler(
|
|
|
308
312
|
return meta
|
|
309
313
|
raise NgioValueError(f"Could not load metadata: {meta}")
|
|
310
314
|
|
|
315
|
+
def safe_load_meta(self) -> NgioPlateMeta | ConverterError:
|
|
316
|
+
"""Load the metadata from the store."""
|
|
317
|
+
return self._load_meta(return_error=True)
|
|
318
|
+
|
|
311
319
|
|
|
312
320
|
###########################################################################
|
|
313
321
|
#
|