Skip to content
Open
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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ Marconato, L., Palla, G., Yamauchi, K.A. et al. SpatialData: an open and univers
[link-docs]: https://spatialdata.scverse.org/projects/io/en/latest/
[link-api]: https://spatialdata.scverse.org/projects/io/en/latest/api.html
[link-cli]: https://spatialdata.scverse.org/projects/io/en/latest/cli.html

[//]: # (numfocus-fiscal-sponsor-attribution)
[//]: # "numfocus-fiscal-sponsor-attribution"

spatialdata-io is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
If you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
Expand Down
137 changes: 0 additions & 137 deletions src/spatialdata_io/readers/_utils/_read_10x_h5.py

This file was deleted.

5 changes: 2 additions & 3 deletions src/spatialdata_io/readers/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
from pathlib import Path
from typing import Any, Union

import scanpy as sc
from anndata import AnnData, read_text
from h5py import File
from ome_types import from_tiff
from ome_types.model import Pixels, UnitsLength
from spatialdata._logging import logger

from spatialdata_io.readers._utils._read_10x_h5 import _read_10x_h5

PathLike = Union[os.PathLike, str] # type:ignore[type-arg]


Expand All @@ -24,7 +23,7 @@ def _read_counts(
) -> tuple[AnnData, str]:
path = Path(path)
if counts_file.endswith(".h5"):
adata: AnnData = _read_10x_h5(path / counts_file, **kwargs)
adata: AnnData = sc.read_10x_h5(path / counts_file, **kwargs)
with File(path / counts_file, mode="r") as f:
attrs = dict(f.attrs)
if library_id is None:
Expand Down
4 changes: 2 additions & 2 deletions src/spatialdata_io/readers/xenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import packaging.version
import pandas as pd
import pyarrow.parquet as pq
import scanpy as sc
import tifffile
import zarr
from anndata import AnnData
Expand All @@ -42,7 +43,6 @@
from spatialdata_io._constants._constants import XeniumKeys
from spatialdata_io._docs import inject_docs
from spatialdata_io._utils import deprecation_alias
from spatialdata_io.readers._utils._read_10x_h5 import _read_10x_h5
from spatialdata_io.readers._utils._utils import _initialize_raster_models_kwargs

__all__ = ["xenium", "xenium_aligned_image", "xenium_explorer_selection"]
Expand Down Expand Up @@ -520,7 +520,7 @@ def _get_points(path: Path, specs: dict[str, Any]) -> Table:
def _get_tables_and_circles(
path: Path, cells_as_circles: bool, specs: dict[str, Any]
) -> AnnData | tuple[AnnData, AnnData]:
adata = _read_10x_h5(path / XeniumKeys.CELL_FEATURE_MATRIX_FILE)
adata = sc.read_10x_h5(path / XeniumKeys.CELL_FEATURE_MATRIX_FILE)
metadata = pd.read_parquet(path / XeniumKeys.CELL_METADATA_FILE)
np.testing.assert_array_equal(metadata.cell_id.astype(str), adata.obs_names.values)
circ = metadata[[XeniumKeys.CELL_X, XeniumKeys.CELL_Y]].to_numpy()
Expand Down
Loading