Skip to content

Commit

Permalink
Merge pull request #16 from fractal-analytics-platform/fix_streaming
Browse files Browse the repository at this point in the history
minor fix for streaming correcly streaming anndata
  • Loading branch information
lorenzocerrone authored Dec 4, 2024
2 parents 0ca1821 + 9fded67 commit 323e662
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To get started, check out the [Getting Started](https://fractal-analytics-platfo
| Basic Iterators | Ongoing | End-September | Read and Write Iterators for common access patterns |
| Base Documentation || End-September | API Documentation and Examples |
| Beta Ready Testing || End-September | Beta Testing; Library is ready for testing, but the API is not stable |
| Streaming from Fractal | ONGOING | December | Ngio can stream ome-zarr from fractal |
| Streaming from Fractal | Ongoing | December | Ngio can stream ome-zarr from fractal |
| Mask Iterators | Ongoing | Early 2025 | Iterators over Masked Tables |
| Advanced Iterators | Not started | mid-2025 | Iterators for advanced access patterns |
| Parallel Iterators | Not started | mid-2025 | Concurrent Iterators for parallel read and write |
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To get started, check out the [Getting Started](getting-started.md) guide.
| Basic Iterators | Ongoing | End-September | Read and Write Iterators for common access patterns |
| Base Documentation || End-September | API Documentation and Examples |
| Beta Ready Testing || End-September | Beta Testing; Library is ready for testing, but the API is not stable |
| Streaming from Fractal | ONGOING | December | Ngio can stream ome-zarr from fractal |
| Streaming from Fractal | Ongoing | December | Ngio can stream ome-zarr from fractal |
| Mask Iterators | Ongoing | Early 2025 | Iterators over Masked Tables |
| Advanced Iterators | Not started | mid-2025 | Iterators for advanced access patterns |
| Parallel Iterators | Not started | mid-2025 | Concurrent Iterators for parallel read and write |
Expand Down
9 changes: 1 addition & 8 deletions docs/notebooks/image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# Images/Labels/Tables\n",
"\n",
"In this notebook we will show how to use the `Image`, `Label` and `Table` objects."
"In this notebook we will show how to use the `Image`, `Label` and `Table` objects to do image processing."
]
},
{
Expand Down Expand Up @@ -305,13 +305,6 @@
"\n",
"feat_table.table"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ classifiers = [
# add your package dependencies here
dependencies = [
"numpy",
"anndata",
"anndata>=0.8.0,<0.11.0",
"pydantic",
"pandas>=1.2.0",
"requests",
Expand All @@ -52,6 +52,7 @@ test = ["zarr<3", "pytest", "pytest-cov"]

dev2 = [
"zarr<3",
"plotly",
"dask[distributed]",
"dask-image",
"napari",
Expand Down
20 changes: 11 additions & 9 deletions src/ngio/tables/_ad_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,22 @@ def custom_read_zarr(store: StoreOrGroup) -> AnnData:
def callback(func: Callable, elem_name: str, elem: Any, iospec: Any) -> Any:
if iospec.encoding_type == "anndata" or elem_name.endswith("/"):
ad_kwargs = {}
# Some of these elem fail on https
# So we only include the ones that are strictly necessary
# for fractal tables
base_elem = [
"X",
"layers",
# "layers",
"obs",
"obsm",
"obsp",
"uns",
# "obsm",
# "obsp",
# "uns",
"var",
"varm",
"varp",
# "varm",
# "varp",
]
# This should make sure that the function behaves the same as the original
# implementation.
base_elem += list(elem.keys())
# This fails on some https
# base_elem += list(elem.keys())
for k in set(base_elem):
v = elem.get(k)
if v is not None and not k.startswith("raw."):
Expand Down

0 comments on commit 323e662

Please sign in to comment.