Skip to content

Commit 27905b1

Browse files
committed
improve comments; remove old unused param in 10x reader
1 parent 9fd303b commit 27905b1

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/spatialdata_io/readers/_utils/_read_10x_h5.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def _read_10x_h5(
6969
- `['gene_ids']`: Gene IDs
7070
- `['feature_types']`: Feature types
7171
"""
72-
start = logger.info(f"reading {filename}")
7372
filename = Path(filename) if isinstance(filename, str) else filename
7473
is_present = filename.is_file()
7574
if not is_present:
@@ -78,7 +77,7 @@ def _read_10x_h5(
7877
v3 = "/matrix" in f
7978

8079
if v3:
81-
adata = _read_v3_10x_h5(filename, start=start)
80+
adata = _read_v3_10x_h5(filename)
8281
if genome:
8382
if genome not in adata.var["genome"].values:
8483
raise ValueError(
@@ -95,7 +94,7 @@ def _read_10x_h5(
9594
return adata
9695

9796

98-
def _read_v3_10x_h5(filename: str | Path, *, start: Any | None = None) -> AnnData:
97+
def _read_v3_10x_h5(filename: str | Path) -> AnnData:
9998
"""Read hdf5 file from Cell Ranger v3 or later versions."""
10099
with h5py.File(str(filename), "r") as f:
101100
try:

src/spatialdata_io/readers/xenium.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def xenium(
7272
image_models_kwargs: Mapping[str, Any] = MappingProxyType({}),
7373
labels_models_kwargs: Mapping[str, Any] = MappingProxyType({}),
7474
) -> SpatialData:
75-
"""Read a *10X Genomics Xenium* dataset into a SpatialData object.
75+
"""Read a *10x Genomics Xenium* dataset into a SpatialData object.
7676
7777
This function reads the following files:
7878
@@ -87,7 +87,8 @@ def xenium(
8787
8888
.. seealso::
8989
90-
- `10X Genomics Xenium file format <https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/analysis/xoa-output-at-a-glance>`_.
90+
- `10x Genomics Xenium file format <https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/analysis/xoa-output-at-a-glance>`_.
91+
- `Release notes for the Xenium format <https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/release-notes/release-notes-for-xoa>`_.
9192
9293
Parameters
9394
----------
@@ -490,7 +491,7 @@ def _get_labels_and_indices_mapping(
490491
f"{expected_label_index}."
491492
)
492493
else:
493-
labels_positional_indices = z["polygon_sets"][mask_index]["cell_index"][...]
494+
labels_positional_indices = z["polygon_sets"][f"{mask_index}"]["cell_index"][...]
494495
if not np.array_equal(labels_positional_indices, np.arange(len(labels_positional_indices))):
495496
raise ValueError(
496497
"The positional indices of the labels do not match the expected range. Please report this "

0 commit comments

Comments
 (0)