ngio 0.3.1__py3-none-any.whl → 0.3.3__py3-none-any.whl
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/common/_roi.py +2 -0
- ngio/hcs/_plate.py +7 -6
- ngio/images/_ome_zarr_container.py +3 -2
- ngio/tables/__init__.py +2 -0
- ngio/tables/_abstract_table.py +2 -1
- ngio/tables/_tables_container.py +5 -4
- ngio/tables/backends/__init__.py +2 -0
- ngio/tables/backends/_abstract_backend.py +1 -1
- ngio/tables/backends/_table_backends.py +1 -0
- ngio/tables/v1/_condition_table.py +1 -1
- ngio/tables/v1/_roi_table.py +12 -2
- ngio/utils/__init__.py +7 -3
- ngio/utils/_datasets.py +112 -11
- {ngio-0.3.1.dist-info → ngio-0.3.3.dist-info}/METADATA +1 -1
- {ngio-0.3.1.dist-info → ngio-0.3.3.dist-info}/RECORD +17 -17
- {ngio-0.3.1.dist-info → ngio-0.3.3.dist-info}/WHEEL +0 -0
- {ngio-0.3.1.dist-info → ngio-0.3.3.dist-info}/licenses/LICENSE +0 -0
ngio/common/_roi.py
CHANGED
|
@@ -57,6 +57,7 @@ class Roi(BaseModel):
|
|
|
57
57
|
x_length=_to_raster(self.x_length, pixel_size.x, dim_x),
|
|
58
58
|
y_length=_to_raster(self.y_length, pixel_size.y, dim_y),
|
|
59
59
|
z_length=_to_raster(self.z_length, pixel_size.z, dim_z),
|
|
60
|
+
**self.model_extra,
|
|
60
61
|
)
|
|
61
62
|
|
|
62
63
|
def zoom(self, zoom_factor: float = 1) -> "Roi":
|
|
@@ -94,6 +95,7 @@ class RoiPixels(BaseModel):
|
|
|
94
95
|
y_length=_to_world(self.y_length, pixel_size.y),
|
|
95
96
|
z_length=_to_world(self.z_length, pixel_size.z),
|
|
96
97
|
unit=pixel_size.space_unit,
|
|
98
|
+
**self.model_extra,
|
|
97
99
|
)
|
|
98
100
|
|
|
99
101
|
def to_slices(self) -> dict[str, slice]:
|
ngio/hcs/_plate.py
CHANGED
|
@@ -27,6 +27,7 @@ from ngio.ome_zarr_meta import (
|
|
|
27
27
|
)
|
|
28
28
|
from ngio.tables import (
|
|
29
29
|
ConditionTable,
|
|
30
|
+
DefaultTableBackend,
|
|
30
31
|
FeatureTable,
|
|
31
32
|
GenericRoiTable,
|
|
32
33
|
MaskingRoiTable,
|
|
@@ -199,7 +200,7 @@ class OmeZarrWell:
|
|
|
199
200
|
)
|
|
200
201
|
|
|
201
202
|
|
|
202
|
-
def
|
|
203
|
+
def _build_extras(paths: Collection[str]) -> list[dict[str, str]]:
|
|
203
204
|
"""Build the extras for the images.
|
|
204
205
|
|
|
205
206
|
Args:
|
|
@@ -944,7 +945,7 @@ class OmeZarrPlate:
|
|
|
944
945
|
self,
|
|
945
946
|
name: str,
|
|
946
947
|
table: Table,
|
|
947
|
-
backend: TableBackend =
|
|
948
|
+
backend: TableBackend = DefaultTableBackend,
|
|
948
949
|
overwrite: bool = False,
|
|
949
950
|
) -> None:
|
|
950
951
|
"""Add a table to the image."""
|
|
@@ -1020,7 +1021,7 @@ class OmeZarrPlate:
|
|
|
1020
1021
|
if 'lazy', the table will be loaded as a lazy frame.
|
|
1021
1022
|
"""
|
|
1022
1023
|
images = self.get_images(acquisition=acquisition)
|
|
1023
|
-
extras =
|
|
1024
|
+
extras = _build_extras(images.keys())
|
|
1024
1025
|
return concatenate_image_tables(
|
|
1025
1026
|
images=images.values(),
|
|
1026
1027
|
extras=extras,
|
|
@@ -1054,7 +1055,7 @@ class OmeZarrPlate:
|
|
|
1054
1055
|
if 'lazy', the table will be loaded as a lazy frame.
|
|
1055
1056
|
"""
|
|
1056
1057
|
images = self.get_images(acquisition=acquisition)
|
|
1057
|
-
extras =
|
|
1058
|
+
extras = _build_extras(images.keys())
|
|
1058
1059
|
return concatenate_image_tables_as(
|
|
1059
1060
|
images=images.values(),
|
|
1060
1061
|
extras=extras,
|
|
@@ -1087,7 +1088,7 @@ class OmeZarrPlate:
|
|
|
1087
1088
|
if 'lazy', the table will be loaded as a lazy frame.
|
|
1088
1089
|
"""
|
|
1089
1090
|
images = await self.get_images_async(acquisition=acquisition)
|
|
1090
|
-
extras =
|
|
1091
|
+
extras = _build_extras(images.keys())
|
|
1091
1092
|
return await concatenate_image_tables_async(
|
|
1092
1093
|
images=images.values(),
|
|
1093
1094
|
extras=extras,
|
|
@@ -1121,7 +1122,7 @@ class OmeZarrPlate:
|
|
|
1121
1122
|
if 'lazy', the table will be loaded as a lazy frame.
|
|
1122
1123
|
"""
|
|
1123
1124
|
images = await self.get_images_async(acquisition=acquisition)
|
|
1124
|
-
extras =
|
|
1125
|
+
extras = _build_extras(images.keys())
|
|
1125
1126
|
return await concatenate_image_tables_as_async(
|
|
1126
1127
|
images=images.values(),
|
|
1127
1128
|
extras=extras,
|
|
@@ -23,6 +23,7 @@ from ngio.ome_zarr_meta.ngio_specs import (
|
|
|
23
23
|
)
|
|
24
24
|
from ngio.tables import (
|
|
25
25
|
ConditionTable,
|
|
26
|
+
DefaultTableBackend,
|
|
26
27
|
FeatureTable,
|
|
27
28
|
GenericRoiTable,
|
|
28
29
|
MaskingRoiTable,
|
|
@@ -501,7 +502,7 @@ class OmeZarrContainer:
|
|
|
501
502
|
self,
|
|
502
503
|
name: str,
|
|
503
504
|
table: Table,
|
|
504
|
-
backend: TableBackend =
|
|
505
|
+
backend: TableBackend = DefaultTableBackend,
|
|
505
506
|
overwrite: bool = False,
|
|
506
507
|
) -> None:
|
|
507
508
|
"""Add a table to the image."""
|
|
@@ -831,7 +832,7 @@ def create_ome_zarr_from_array(
|
|
|
831
832
|
axes_names=axes_names,
|
|
832
833
|
name=name,
|
|
833
834
|
chunks=chunks,
|
|
834
|
-
dtype=array.dtype,
|
|
835
|
+
dtype=str(array.dtype),
|
|
835
836
|
overwrite=overwrite,
|
|
836
837
|
version=version,
|
|
837
838
|
)
|
ngio/tables/__init__.py
CHANGED
|
@@ -15,6 +15,7 @@ from ngio.tables._tables_container import (
|
|
|
15
15
|
open_tables_container,
|
|
16
16
|
)
|
|
17
17
|
from ngio.tables.backends import (
|
|
18
|
+
DefaultTableBackend,
|
|
18
19
|
ImplementedTableBackends,
|
|
19
20
|
TableBackend,
|
|
20
21
|
TableBackendProtocol,
|
|
@@ -23,6 +24,7 @@ from ngio.tables.v1._generic_table import GenericTable
|
|
|
23
24
|
|
|
24
25
|
__all__ = [
|
|
25
26
|
"ConditionTable",
|
|
27
|
+
"DefaultTableBackend",
|
|
26
28
|
"FeatureTable",
|
|
27
29
|
"GenericRoiTable",
|
|
28
30
|
"GenericTable",
|
ngio/tables/_abstract_table.py
CHANGED
|
@@ -10,6 +10,7 @@ from anndata import AnnData
|
|
|
10
10
|
|
|
11
11
|
from ngio.tables.backends import (
|
|
12
12
|
BackendMeta,
|
|
13
|
+
DefaultTableBackend,
|
|
13
14
|
ImplementedTableBackends,
|
|
14
15
|
TableBackend,
|
|
15
16
|
TableBackendProtocol,
|
|
@@ -203,7 +204,7 @@ class AbstractBaseTable(ABC):
|
|
|
203
204
|
def set_backend(
|
|
204
205
|
self,
|
|
205
206
|
handler: ZarrGroupHandler | None = None,
|
|
206
|
-
backend: TableBackend =
|
|
207
|
+
backend: TableBackend = DefaultTableBackend,
|
|
207
208
|
) -> None:
|
|
208
209
|
"""Set the backend of the table."""
|
|
209
210
|
if handler is None:
|
ngio/tables/_tables_container.py
CHANGED
|
@@ -8,6 +8,7 @@ import polars as pl
|
|
|
8
8
|
|
|
9
9
|
from ngio.tables.backends import (
|
|
10
10
|
BackendMeta,
|
|
11
|
+
DefaultTableBackend,
|
|
11
12
|
TableBackend,
|
|
12
13
|
TabularData,
|
|
13
14
|
)
|
|
@@ -90,13 +91,13 @@ class Table(Protocol):
|
|
|
90
91
|
def set_backend(
|
|
91
92
|
self,
|
|
92
93
|
handler: ZarrGroupHandler | None = None,
|
|
93
|
-
backend: TableBackend =
|
|
94
|
+
backend: TableBackend = DefaultTableBackend,
|
|
94
95
|
) -> None:
|
|
95
96
|
"""Set the backend store and path for the table.
|
|
96
97
|
|
|
97
98
|
Either a handler or a backend must be provided.
|
|
98
99
|
|
|
99
|
-
If the
|
|
100
|
+
If the handler in none it will be inferred from the backend.
|
|
100
101
|
If the backend is none, it will be inferred from the group attrs
|
|
101
102
|
"""
|
|
102
103
|
...
|
|
@@ -314,7 +315,7 @@ class TablesContainer:
|
|
|
314
315
|
self,
|
|
315
316
|
name: str,
|
|
316
317
|
table: Table,
|
|
317
|
-
backend: TableBackend =
|
|
318
|
+
backend: TableBackend = DefaultTableBackend,
|
|
318
319
|
overwrite: bool = False,
|
|
319
320
|
) -> None:
|
|
320
321
|
"""Add a table to the group."""
|
|
@@ -406,7 +407,7 @@ def open_table_as(
|
|
|
406
407
|
def write_table(
|
|
407
408
|
store: StoreOrGroup,
|
|
408
409
|
table: Table,
|
|
409
|
-
backend: TableBackend =
|
|
410
|
+
backend: TableBackend = DefaultTableBackend,
|
|
410
411
|
cache: bool = False,
|
|
411
412
|
mode: AccessModeLiteral = "a",
|
|
412
413
|
parallel_safe: bool = False,
|
ngio/tables/backends/__init__.py
CHANGED
|
@@ -6,6 +6,7 @@ from ngio.tables.backends._csv import CsvTableBackend
|
|
|
6
6
|
from ngio.tables.backends._json import JsonTableBackend
|
|
7
7
|
from ngio.tables.backends._parquet import ParquetTableBackend
|
|
8
8
|
from ngio.tables.backends._table_backends import (
|
|
9
|
+
DefaultTableBackend,
|
|
9
10
|
ImplementedTableBackends,
|
|
10
11
|
TableBackend,
|
|
11
12
|
TableBackendProtocol,
|
|
@@ -32,6 +33,7 @@ __all__ = [
|
|
|
32
33
|
"AnnDataBackend",
|
|
33
34
|
"BackendMeta",
|
|
34
35
|
"CsvTableBackend",
|
|
36
|
+
"DefaultTableBackend",
|
|
35
37
|
"ImplementedTableBackends",
|
|
36
38
|
"JsonTableBackend",
|
|
37
39
|
"ParquetTableBackend",
|
|
@@ -19,7 +19,7 @@ from ngio.utils import NgioValueError, ZarrGroupHandler
|
|
|
19
19
|
class BackendMeta(BaseModel):
|
|
20
20
|
"""Metadata for the backend."""
|
|
21
21
|
|
|
22
|
-
backend: str = "
|
|
22
|
+
backend: str = "anndata_v1"
|
|
23
23
|
index_key: str | None = None
|
|
24
24
|
index_type: Literal["int", "str"] | None = None
|
|
25
25
|
|
|
@@ -23,7 +23,7 @@ class ConditionTableV1(AbstractBaseTable):
|
|
|
23
23
|
The condition table is a generic table that does not
|
|
24
24
|
have a specific definition.
|
|
25
25
|
|
|
26
|
-
It is used to store
|
|
26
|
+
It is used to store information about the particular conditions
|
|
27
27
|
used to generate the data.
|
|
28
28
|
- How much drug was used in the experiment
|
|
29
29
|
- What treatment was used
|
ngio/tables/v1/_roi_table.py
CHANGED
|
@@ -47,11 +47,20 @@ REQUIRED_COLUMNS = [
|
|
|
47
47
|
ORIGIN_COLUMNS = [
|
|
48
48
|
"x_micrometer_original",
|
|
49
49
|
"y_micrometer_original",
|
|
50
|
+
"z_micrometer_original",
|
|
50
51
|
]
|
|
51
52
|
|
|
52
53
|
TRANSLATION_COLUMNS = ["translation_x", "translation_y", "translation_z"]
|
|
53
54
|
|
|
54
|
-
PLATE_COLUMNS = [
|
|
55
|
+
PLATE_COLUMNS = [
|
|
56
|
+
"plate_name",
|
|
57
|
+
"row",
|
|
58
|
+
"column",
|
|
59
|
+
"path_in_well",
|
|
60
|
+
"path_in_plate",
|
|
61
|
+
"acquisition_id",
|
|
62
|
+
"acquisition_name",
|
|
63
|
+
]
|
|
55
64
|
|
|
56
65
|
INDEX_COLUMNS = [
|
|
57
66
|
"FieldIndex",
|
|
@@ -390,7 +399,8 @@ class MaskingRoiTableV1(GenericRoiTableV1):
|
|
|
390
399
|
meta = MaskingRoiTableV1Meta()
|
|
391
400
|
|
|
392
401
|
if reference_label is not None:
|
|
393
|
-
|
|
402
|
+
path = f"../labels/{reference_label}"
|
|
403
|
+
meta.region = RegionMeta(path=path)
|
|
394
404
|
|
|
395
405
|
if meta.index_key is None:
|
|
396
406
|
meta.index_key = "label"
|
ngio/utils/__init__.py
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
import os
|
|
4
4
|
|
|
5
5
|
from ngio.common._common_types import ArrayLike
|
|
6
|
-
from ngio.utils._datasets import
|
|
6
|
+
from ngio.utils._datasets import (
|
|
7
|
+
download_ome_zarr_dataset,
|
|
8
|
+
list_ome_zarr_datasets,
|
|
9
|
+
print_datasets_infos,
|
|
10
|
+
)
|
|
7
11
|
from ngio.utils._errors import (
|
|
8
12
|
NgioFileExistsError,
|
|
9
13
|
NgioFileNotFoundError,
|
|
@@ -34,13 +38,13 @@ __all__ = [
|
|
|
34
38
|
"NgioValueError",
|
|
35
39
|
"StoreOrGroup",
|
|
36
40
|
"ZarrGroupHandler",
|
|
37
|
-
#
|
|
41
|
+
# Other
|
|
38
42
|
"download_ome_zarr_dataset",
|
|
39
|
-
# Fractal
|
|
40
43
|
"fractal_fsspec_store",
|
|
41
44
|
"list_ome_zarr_datasets",
|
|
42
45
|
# Logger
|
|
43
46
|
"ngio_logger",
|
|
44
47
|
"open_group_wrapper",
|
|
48
|
+
"print_datasets_infos",
|
|
45
49
|
"set_logger_level",
|
|
46
50
|
]
|
ngio/utils/_datasets.py
CHANGED
|
@@ -1,35 +1,124 @@
|
|
|
1
1
|
"""Download testing OME-Zarr datasets."""
|
|
2
2
|
|
|
3
|
+
import shutil
|
|
3
4
|
from pathlib import Path
|
|
5
|
+
from typing import Literal
|
|
4
6
|
|
|
5
7
|
import pooch
|
|
6
8
|
|
|
7
9
|
from ngio.utils._errors import NgioValueError
|
|
8
10
|
|
|
11
|
+
|
|
12
|
+
class UnzipAndRename(pooch.Unzip):
|
|
13
|
+
"""Unzip and rename the extracted directory."""
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
extract_dir: str = "",
|
|
18
|
+
out_name: str = "ome-zarr.zarr",
|
|
19
|
+
re_unzip: bool = True,
|
|
20
|
+
**kwargs,
|
|
21
|
+
):
|
|
22
|
+
super().__init__(extract_dir=extract_dir, **kwargs)
|
|
23
|
+
self.out_name = out_name
|
|
24
|
+
self.re_unzip = re_unzip
|
|
25
|
+
|
|
26
|
+
def output_file(self) -> Path:
|
|
27
|
+
"""Return the output file path."""
|
|
28
|
+
if self.extract_dir is None:
|
|
29
|
+
raise NgioValueError("extract_dir must be set for UnzipAndRename.")
|
|
30
|
+
|
|
31
|
+
return Path(self.extract_dir) / self.out_name
|
|
32
|
+
|
|
33
|
+
def _extract_file(self, fname, extract_dir):
|
|
34
|
+
"""Extract the file and rename it."""
|
|
35
|
+
output_path = self.output_file()
|
|
36
|
+
if output_path.exists() and not self.re_unzip:
|
|
37
|
+
# Nothing to do, the file already exists and we are not re-unzipping
|
|
38
|
+
return None
|
|
39
|
+
|
|
40
|
+
tmp_dir = Path(extract_dir) / "tmp"
|
|
41
|
+
super()._extract_file(fname, tmp_dir)
|
|
42
|
+
|
|
43
|
+
list_extracted_dirs = tmp_dir.iterdir()
|
|
44
|
+
# Keep only if ends with .zarr
|
|
45
|
+
list_extracted_dirs = filter(
|
|
46
|
+
lambda x: x.name.endswith(".zarr"),
|
|
47
|
+
list_extracted_dirs,
|
|
48
|
+
)
|
|
49
|
+
list_extracted_dirs = list(list_extracted_dirs)
|
|
50
|
+
if len(list_extracted_dirs) != 1:
|
|
51
|
+
raise NgioValueError(
|
|
52
|
+
"Expected one directory to be extracted, "
|
|
53
|
+
f"got {len(list_extracted_dirs)}."
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
extracted_dir = list_extracted_dirs[0]
|
|
57
|
+
if output_path.exists():
|
|
58
|
+
shutil.rmtree(output_path, ignore_errors=True)
|
|
59
|
+
|
|
60
|
+
extracted_dir.rename(output_path)
|
|
61
|
+
# Clean up the temporary directory
|
|
62
|
+
shutil.rmtree(tmp_dir, ignore_errors=True)
|
|
63
|
+
|
|
64
|
+
|
|
9
65
|
_ome_zarr_zoo = {
|
|
10
66
|
"CardiomyocyteTiny": {
|
|
11
67
|
"url": "https://zenodo.org/records/13305156/files/20200812-CardiomyocyteDifferentiation14-Cycle1.zarr.zip",
|
|
12
68
|
"known_hash": "md5:efc21fe8d4ea3abab76226d8c166452c",
|
|
13
|
-
"fname": "20200812-CardiomyocyteDifferentiation14-Cycle1.zarr.zip",
|
|
14
|
-
"
|
|
69
|
+
"fname": "20200812-CardiomyocyteDifferentiation14-Cycle1-tiny.zarr.zip",
|
|
70
|
+
"description": "Tiny cardiomyocyte dataset 3D (32MB).",
|
|
71
|
+
},
|
|
72
|
+
"CardiomyocyteTinyMip": {
|
|
73
|
+
"url": "https://zenodo.org/records/13305156/files/20200812-CardiomyocyteDifferentiation14-Cycle1_mip.zarr.zip",
|
|
74
|
+
"known_hash": "md5:51809479777cafbe9ac0f9fa5636aa95",
|
|
75
|
+
"fname": "20200812-CardiomyocyteDifferentiation14-Cycle1-tiny-mip.zarr.zip",
|
|
76
|
+
"description": "Tiny cardiomyocyte dataset 2D MIP (16.4MB).",
|
|
77
|
+
},
|
|
78
|
+
"CardiomyocyteSmall": {
|
|
79
|
+
"url": "https://zenodo.org/records/13305316/files/20200812-CardiomyocyteDifferentiation14-Cycle1.zarr.zip",
|
|
80
|
+
"known_hash": "md5:d5752ed4b72a9092a0290b3c04c0b9c2",
|
|
81
|
+
"fname": "20200812-CardiomyocyteDifferentiation14-Cycle1-small.zarr.zip",
|
|
82
|
+
"description": "Small cardiomyocyte dataset 3D (750MB).",
|
|
15
83
|
},
|
|
16
84
|
"CardiomyocyteSmallMip": {
|
|
17
85
|
"url": "https://zenodo.org/records/13305316/files/20200812-CardiomyocyteDifferentiation14-Cycle1_mip.zarr.zip",
|
|
18
86
|
"known_hash": "md5:3ed3ea898e0ed42d397da2e1dbe40750",
|
|
87
|
+
"fname": "20200812-CardiomyocyteDifferentiation14-Cycle1-small-mip.zarr.zip",
|
|
88
|
+
"description": "Small cardiomyocyte dataset 2D MIP (106MB).",
|
|
89
|
+
},
|
|
90
|
+
"CardiomyocyteMediumMip": {
|
|
91
|
+
"url": "https://zenodo.org/records/14826000/files/20200812-CardiomyocyteDifferentiation14-Cycle1_mip.zarr.zip",
|
|
92
|
+
"known_hash": "md5:3f932bbf7fc0577f58b97471707816a1",
|
|
19
93
|
"fname": "20200812-CardiomyocyteDifferentiation14-Cycle1_mip.zarr.zip",
|
|
20
|
-
"
|
|
94
|
+
"description": "Medium cardiomyocyte dataset 2D MIP (30GB).",
|
|
21
95
|
},
|
|
22
96
|
}
|
|
23
97
|
|
|
98
|
+
AVAILABLE_DATASETS = Literal[
|
|
99
|
+
"CardiomyocyteTiny",
|
|
100
|
+
"CardiomyocyteTinyMip",
|
|
101
|
+
"CardiomyocyteSmall",
|
|
102
|
+
"CardiomyocyteSmallMip",
|
|
103
|
+
"CardiomyocyteMediumMip",
|
|
104
|
+
]
|
|
105
|
+
|
|
24
106
|
|
|
25
107
|
def list_ome_zarr_datasets() -> list[str]:
|
|
26
108
|
"""List available OME-Zarr datasets."""
|
|
27
109
|
return list(_ome_zarr_zoo.keys())
|
|
28
110
|
|
|
29
111
|
|
|
112
|
+
def print_datasets_infos() -> None:
|
|
113
|
+
for dataset_name, dataset_info in _ome_zarr_zoo.items():
|
|
114
|
+
print(f"{dataset_name} - Description: {dataset_info['description']}")
|
|
115
|
+
|
|
116
|
+
|
|
30
117
|
def download_ome_zarr_dataset(
|
|
31
|
-
dataset_name: str,
|
|
118
|
+
dataset_name: AVAILABLE_DATASETS | str,
|
|
32
119
|
download_dir: str | Path = "data",
|
|
120
|
+
re_unzip: bool = True,
|
|
121
|
+
progressbar: bool = False,
|
|
33
122
|
) -> Path:
|
|
34
123
|
"""Download an OME-Zarr dataset.
|
|
35
124
|
|
|
@@ -38,16 +127,28 @@ def download_ome_zarr_dataset(
|
|
|
38
127
|
Args:
|
|
39
128
|
dataset_name (str): The dataset name.
|
|
40
129
|
download_dir (str): The download directory. Defaults to "data".
|
|
130
|
+
re_unzip (bool): If True, it will unzip the dataset even if it already exists.
|
|
131
|
+
progressbar (bool): If True, show a progress bar during download.
|
|
41
132
|
"""
|
|
42
133
|
if dataset_name not in _ome_zarr_zoo:
|
|
43
134
|
raise NgioValueError(f"Dataset {dataset_name} not found in the OME-Zarr zoo.")
|
|
44
|
-
|
|
135
|
+
zenodo_infos = _ome_zarr_zoo[dataset_name]
|
|
136
|
+
|
|
137
|
+
fname = zenodo_infos["fname"]
|
|
138
|
+
zarrname = fname.replace(".zip", "")
|
|
139
|
+
|
|
140
|
+
processor = UnzipAndRename(
|
|
141
|
+
extract_dir="",
|
|
142
|
+
out_name=zarrname,
|
|
143
|
+
re_unzip=re_unzip,
|
|
144
|
+
)
|
|
145
|
+
|
|
45
146
|
pooch.retrieve(
|
|
147
|
+
url=zenodo_infos["url"],
|
|
148
|
+
known_hash=zenodo_infos["known_hash"],
|
|
149
|
+
fname=fname,
|
|
46
150
|
path=download_dir,
|
|
47
|
-
|
|
151
|
+
processor=processor,
|
|
152
|
+
progressbar=progressbar,
|
|
48
153
|
)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if isinstance(ome_zarr_url["processor"], pooch.Unzip):
|
|
52
|
-
path = path.with_suffix("")
|
|
53
|
-
return path
|
|
154
|
+
return processor.output_file()
|
|
@@ -6,19 +6,19 @@ ngio/common/_common_types.py,sha256=OkAYNSNjZkixL1MI-HPBVuXamheFBr862uJ4PvTxmhk,
|
|
|
6
6
|
ngio/common/_dimensions.py,sha256=UV2XulWaROb3Y2f4fv27ZkTIu-MoS53U26aDkrv-_lk,3900
|
|
7
7
|
ngio/common/_masking_roi.py,sha256=-o6meGP17iTXEbkO9aGh1VX2drkc2laIcRJvCy_pRRM,4919
|
|
8
8
|
ngio/common/_pyramid.py,sha256=SJzPauuduuqcm9B7nFCJhMTzIg6Knjsnp4CY4lN61Is,7411
|
|
9
|
-
ngio/common/_roi.py,sha256=
|
|
9
|
+
ngio/common/_roi.py,sha256=xJZ3vSusxhM1wXOizyjPbgzYhneva4IlhaWQc13Kuk4,5186
|
|
10
10
|
ngio/common/_slicer.py,sha256=AKpwXRncOmF9nhjKYma0C_41WqAgSv860beKGx-aw-0,3075
|
|
11
11
|
ngio/common/_table_ops.py,sha256=ToNR7F053l1dubVv-gvBD-523T10HnE2UzqeU2BuNy8,15494
|
|
12
12
|
ngio/common/_zoom.py,sha256=KsURa5VuixmpbAAY5-6obmuQV8vfiHKZqBxZDXvchpM,5473
|
|
13
13
|
ngio/hcs/__init__.py,sha256=G8j9vD-liLeB_UeGtKYIgshWvJnUA6ks9GwjvWBLdHs,357
|
|
14
|
-
ngio/hcs/_plate.py,sha256=
|
|
14
|
+
ngio/hcs/_plate.py,sha256=o-Myg1sPUT9mCfYjHOuUTIpm2Nl0siacmuztGoPcYc0,44265
|
|
15
15
|
ngio/images/__init__.py,sha256=PlYvbHOMvZLDgn_PeGrytOEU3e_-AO8GWpRjEqoX_Gw,536
|
|
16
16
|
ngio/images/_abstract_image.py,sha256=8PNQPZjiDz-pcTFXSJAVw7nUr4yL_iRwqDEUTKkAnp0,10266
|
|
17
17
|
ngio/images/_create.py,sha256=XYn30m_2OSZeHHASYHc3eK9u_gZIYy9wo6mGdRGaq5c,9473
|
|
18
18
|
ngio/images/_image.py,sha256=B9MTk3Cei-FBR4jbhSujTSNcKM_ySape28yXR_JlY0A,17980
|
|
19
19
|
ngio/images/_label.py,sha256=Q1vPrXDcjJ7Gdd0wDz6NCVYQLNe1Ae6YDI4iK0oq31s,10557
|
|
20
20
|
ngio/images/_masked_image.py,sha256=sd6aQetNVwtDkwUvKX-lssQyHzt5m-CYZL8ZFkwDSn8,8533
|
|
21
|
-
ngio/images/_ome_zarr_container.py,sha256=
|
|
21
|
+
ngio/images/_ome_zarr_container.py,sha256=CygzzFMYFT35ztLSPKe6iKLzCtgCnVWk8M9xOj6Tc5U,31221
|
|
22
22
|
ngio/ome_zarr_meta/__init__.py,sha256=oZ8PEsWM7U0KwzpsnvVfX9k4UfuTz5sZ8B6B9eY5hyY,1193
|
|
23
23
|
ngio/ome_zarr_meta/_meta_handlers.py,sha256=ctknNDT8jxwyvxQf9on5gW31H1tRRsnneO38GT2UXoE,25880
|
|
24
24
|
ngio/ome_zarr_meta/ngio_specs/__init__.py,sha256=05NQukZG0nNvjzf8AKWGu7PhjhQcImGSAOK3D3Bg-Js,1786
|
|
@@ -31,31 +31,31 @@ ngio/ome_zarr_meta/ngio_specs/_pixel_size.py,sha256=5TT8250XdCKUnk3OwZeyXIMNFKOg
|
|
|
31
31
|
ngio/ome_zarr_meta/v04/__init__.py,sha256=dJRzzxyYc81kf-0Hip_bqvbdManaM8XTdQX2meWyCSs,583
|
|
32
32
|
ngio/ome_zarr_meta/v04/_custom_models.py,sha256=5GxiDERvLuvq4QvApcA6EiKLS6hLFX1R0R_9rSaa85A,530
|
|
33
33
|
ngio/ome_zarr_meta/v04/_v04_spec_utils.py,sha256=05tEr2eEP_XVIfBMOAWLT7lzJV4KS5eYrpK8l94tn3w,15876
|
|
34
|
-
ngio/tables/__init__.py,sha256=
|
|
35
|
-
ngio/tables/_abstract_table.py,sha256=
|
|
36
|
-
ngio/tables/_tables_container.py,sha256=
|
|
37
|
-
ngio/tables/backends/__init__.py,sha256=
|
|
38
|
-
ngio/tables/backends/_abstract_backend.py,sha256=
|
|
34
|
+
ngio/tables/__init__.py,sha256=_BV3sclNMLITu_J8_3DkkUrCB6Kro0HzeWLDCD1ivKM,877
|
|
35
|
+
ngio/tables/_abstract_table.py,sha256=rwGa47TzbFmosucBWVfFq6JEXtgGvOdUVtU9DIelV88,8204
|
|
36
|
+
ngio/tables/_tables_container.py,sha256=3xmpREaN671l40MPprnl1BD-VoOb6xfjECb5mNoMW0w,12173
|
|
37
|
+
ngio/tables/backends/__init__.py,sha256=nQZVazwTL1IHU08gL-BZcFZd7Cehhbc_AsJ3t3XSps0,1577
|
|
38
|
+
ngio/tables/backends/_abstract_backend.py,sha256=tsbHzSPTX88fiCbVc8khXv5aN68ck6HKG8r5OHkY3S8,7457
|
|
39
39
|
ngio/tables/backends/_anndata.py,sha256=8RX2NO15CLxys3p6gw54Nd-_0WATU4WBlNndX06wvzI,2587
|
|
40
40
|
ngio/tables/backends/_anndata_utils.py,sha256=DBWIcR0btnH-DIvDvzlcnMXoYhhtXc9DstryiOP0Qsg,3122
|
|
41
41
|
ngio/tables/backends/_csv.py,sha256=Ev61D-AUKo4LIhXRmWPJgYbHI7eQdxiajQR574DevEM,932
|
|
42
42
|
ngio/tables/backends/_json.py,sha256=1ZsEuXDJm1rOZV_KjFm8CB0qhv7L1W7L2EGWPf4q_p0,3137
|
|
43
43
|
ngio/tables/backends/_non_zarr_backends.py,sha256=SvPPhT6n5TrKUOyV1mNcdHQK49huZ5lwR8EVe9MdydM,7254
|
|
44
44
|
ngio/tables/backends/_parquet.py,sha256=ic-p86h8lce8q9luBJGRzy6vxlWyJvA0-2l5cUD6OqY,1398
|
|
45
|
-
ngio/tables/backends/_table_backends.py,sha256=
|
|
45
|
+
ngio/tables/backends/_table_backends.py,sha256=QUS59VU395966AEul2SNJQAzklSitvISL0wnZTKWZa0,7267
|
|
46
46
|
ngio/tables/backends/_utils.py,sha256=tJBSWN6OhO_1ybxl4vT2l3ImB028Fb6h0vaitPRcr8A,19668
|
|
47
47
|
ngio/tables/v1/__init__.py,sha256=Wr1_9RZFpaN8FYMTnxT9Yjkw4AS7y9FMWailmB_uj5g,617
|
|
48
|
-
ngio/tables/v1/_condition_table.py,sha256=
|
|
48
|
+
ngio/tables/v1/_condition_table.py,sha256=T0Uq5BKkmMoEspt_Rx0U99Ow6S9GAMZDHqvUO5obCAM,1780
|
|
49
49
|
ngio/tables/v1/_feature_table.py,sha256=n9uMHwoBh-_dlOhUXCFbmAjXFVXncNCR3SjE2qzXI68,3821
|
|
50
50
|
ngio/tables/v1/_generic_table.py,sha256=1ktJHeuv7U1g5Z8PFUuTkCjOzcYMQd8xegKHKUedJB8,1240
|
|
51
|
-
ngio/tables/v1/_roi_table.py,sha256=
|
|
52
|
-
ngio/utils/__init__.py,sha256=
|
|
53
|
-
ngio/utils/_datasets.py,sha256=
|
|
51
|
+
ngio/tables/v1/_roi_table.py,sha256=DgXhp-DHTeEJwzSsSRSlnPghjMhYGa3IGSpwTt5LKZU,13603
|
|
52
|
+
ngio/utils/__init__.py,sha256=VxPVDKF0QF9HtG8wY0J6PXESNcWLaMXQNZiw5dHflBU,1179
|
|
53
|
+
ngio/utils/_datasets.py,sha256=2g-Neg78dNcqyDz39QQw-Ifp9GITHjVHisdqgvvDNDE,5475
|
|
54
54
|
ngio/utils/_errors.py,sha256=pKQ12LUjQLYE1nUawemA5h7HsgznjaSvV1n2PQU33N0,759
|
|
55
55
|
ngio/utils/_fractal_fsspec_store.py,sha256=RdcCFOgHexRKX9zZvJV5RI-5OPc7VOPS6q_IeRxm24I,1548
|
|
56
56
|
ngio/utils/_logger.py,sha256=HIuqD_2ShfFGDswBddcouStbKfL0Vz_ah8cAIFGhbS8,888
|
|
57
57
|
ngio/utils/_zarr_utils.py,sha256=qOI-HL2HsfFLCj_yxsTR-aq4oHpSqS9KR13aEIvhGDY,13593
|
|
58
|
-
ngio-0.3.
|
|
59
|
-
ngio-0.3.
|
|
60
|
-
ngio-0.3.
|
|
61
|
-
ngio-0.3.
|
|
58
|
+
ngio-0.3.3.dist-info/METADATA,sha256=R88An5Xll3DjctQyVOwJKH7Z0DaNpefeehYOqH79FoE,5868
|
|
59
|
+
ngio-0.3.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
60
|
+
ngio-0.3.3.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
|
|
61
|
+
ngio-0.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|