From 99e460e6b39a5505f2a191ab3d19185fad06befa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20S=2E=20L=2E=20Sch=C3=A4fer?= <62442385+psl-schaefer@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:53:47 +0100 Subject: [PATCH 1/2] Update xenium.py, fix problem with hidden files in morphology_foucs direcgory In one Xenium output directory I found these files, I guess one can safely ignore the hidden files starting with `._`? {'morphology_focus_0000.ome.tif', '._morphology_focus_0001.ome.tif', 'morphology_focus_0003.ome.tif', 'morphology_focus_0002.ome.tif', 'morphology_focus_0001.ome.tif', '._morphology_focus_0003.ome.tif', '._morphology_focus_0002.ome.tif', '._morphology_focus_0000.ome.tif'} --- src/spatialdata_io/readers/xenium.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spatialdata_io/readers/xenium.py b/src/spatialdata_io/readers/xenium.py index 2a5d6165..fd6e3998 100644 --- a/src/spatialdata_io/readers/xenium.py +++ b/src/spatialdata_io/readers/xenium.py @@ -286,7 +286,7 @@ def xenium( else: if morphology_focus: morphology_focus_dir = path / XeniumKeys.MORPHOLOGY_FOCUS_DIR - files = {f for f in os.listdir(morphology_focus_dir) if f.endswith(".ome.tif")} + files = {f for f in os.listdir(morphology_focus_dir) if f.endswith(".ome.tif") and not f.startswith("._")} if len(files) not in [1, 4]: raise ValueError( "Expected 1 (no segmentation kit) or 4 (segmentation kit) files in the morphology focus directory, " From efc412907bd7be4374c0b47fc186feee155ca3d2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:02:26 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f3dd6fca..41beda62 100644 --- a/README.md +++ b/README.md @@ -86,15 +86,18 @@ Technologies that can be read into `SpatialData` objects using third-party libra This library is community maintained and is not officially endorsed by the aforementioned spatial technology companies. As such, we cannot offer any warranty of the correctness of the representation. Furthermore, we cannot ensure the correctness of the readers for every data version as the technologies evolve and update their formats. If you find a bug or notice a misrepresentation of the data please report it via our [Bug Tracking System](https://github.com/scverse/spatialdata-io/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen) so that it can be addressed either by the maintainers of this library or by the community. ## Solutions to common problems + ### Problem: I cannot visualize the data, everything is slow -Solution: after parsing the data with `spatialdata-io` readers, you need to write it to Zarr and read it again. Otherwise the performance advantage given by the SpatialData Zarr format will not available. + +Solution: after parsing the data with `spatialdata-io` readers, you need to write it to Zarr and read it again. Otherwise the performance advantage given by the SpatialData Zarr format will not available. + ```python from spatialdata_io import xenium from spatialdata import read_zarr -sdata = xenium('raw_data') -sdata.write('data.zarr') -sdata = read_zarr('sdata.zarr') +sdata = xenium("raw_data") +sdata.write("data.zarr") +sdata = read_zarr("sdata.zarr") ``` ## Citation