spatialdata-io 0.1.6__tar.gz → 0.1.7__tar.gz
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.
- spatialdata_io-0.1.7/.github/release.yml +22 -0
- spatialdata_io-0.1.7/.github/workflows/prepare_test_data.yaml +50 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.github/workflows/release.yaml +12 -12
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.pre-commit-config.yaml +9 -9
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/PKG-INFO +55 -19
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/README.md +49 -17
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/_version.py +2 -2
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/api.md +11 -16
- spatialdata_io-0.1.7/docs/changelog.md +4 -0
- spatialdata_io-0.1.7/docs/cli.md +9 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/conf.py +1 -0
- spatialdata_io-0.1.7/docs/contributing.md +3 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/index.md +1 -1
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/pyproject.toml +3 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/__init__.py +33 -9
- spatialdata_io-0.1.7/src/spatialdata_io/__main__.py +645 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/_constants/_constants.py +8 -5
- spatialdata_io-0.1.7/src/spatialdata_io/converters/generic_to_zarr.py +84 -0
- spatialdata_io-0.1.7/src/spatialdata_io/experimental/__init__.py +18 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/_utils/_utils.py +48 -0
- spatialdata_io-0.1.7/src/spatialdata_io/readers/generic.py +78 -0
- spatialdata_io-0.1.7/src/spatialdata_io/readers/macsima.py +488 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/merscope.py +4 -2
- spatialdata_io-0.1.7/src/spatialdata_io/readers/seqfish.py +251 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/steinbock.py +11 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/visium.py +2 -2
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/visium_hd.py +54 -17
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/xenium.py +2 -2
- spatialdata_io-0.1.7/tests/_utils.py +31 -0
- spatialdata_io-0.1.7/tests/conftest.py +7 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/tests/converters/test_legacy_anndata.py +4 -1
- spatialdata_io-0.1.7/tests/test_generic.py +116 -0
- spatialdata_io-0.1.7/tests/test_macsima.py +231 -0
- spatialdata_io-0.1.7/tests/test_seqfish.py +53 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/tests/test_xenium.py +30 -8
- spatialdata_io-0.1.6/.github/workflows/build.yaml +0 -23
- spatialdata_io-0.1.6/.github/workflows/prepare_test_data.yaml +0 -35
- spatialdata_io-0.1.6/CHANGELOG.md +0 -142
- spatialdata_io-0.1.6/docs/changelog.md +0 -3
- spatialdata_io-0.1.6/docs/contributing.md +0 -197
- spatialdata_io-0.1.6/docs/template_usage.md +0 -322
- spatialdata_io-0.1.6/src/spatialdata_io/experimental/__init__.py +0 -7
- spatialdata_io-0.1.6/src/spatialdata_io/readers/seqfish.py +0 -190
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.bumpversion.cfg +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.codecov.yaml +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.editorconfig +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.flake8 +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.github/codecov.yml +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.github/workflows/test.yaml +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.gitignore +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.mypy.ini +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/.readthedocs.yaml +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/LICENSE +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/Makefile +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/_static/.gitkeep +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/_templates/.gitkeep +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/_templates/autosummary/class.rst +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/extensions/.gitkeep +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/extensions/typed_returns.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/make.bat +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/references.bib +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/docs/references.md +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/_constants/__init__.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/_constants/_enum.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/_docs.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/_utils.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/converters/__init__.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/converters/legacy_anndata.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/__init__.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/_utils/__init__.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/_utils/_read_10x_h5.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/codex.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/cosmx.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/curio.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/dbit.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/iss.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/mcmicro.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/src/spatialdata_io/readers/stereoseq.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/tests/__init__.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/tests/converters/__init__.py +0 -0
- {spatialdata_io-0.1.6 → spatialdata_io-0.1.7}/tests/test_basic.py +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
changelog:
|
|
2
|
+
exclude:
|
|
3
|
+
labels:
|
|
4
|
+
- release-ignore
|
|
5
|
+
authors:
|
|
6
|
+
- pre-commit-ci
|
|
7
|
+
categories:
|
|
8
|
+
- title: Major
|
|
9
|
+
labels:
|
|
10
|
+
- "release-major"
|
|
11
|
+
- title: Minor
|
|
12
|
+
labels:
|
|
13
|
+
- "release-minor"
|
|
14
|
+
- title: Changed
|
|
15
|
+
labels:
|
|
16
|
+
- "release-changed"
|
|
17
|
+
- title: Fixed
|
|
18
|
+
labels:
|
|
19
|
+
- "release-fixed"
|
|
20
|
+
- title: Other Changes
|
|
21
|
+
labels:
|
|
22
|
+
- "*"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Prepare test data
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
# uncomment and adjust the branch name if you need to add new datasets to the artifact
|
|
6
|
+
# push:
|
|
7
|
+
# branches:
|
|
8
|
+
# - main
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
prepare-data:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
|
|
17
|
+
- name: Download test datasets
|
|
18
|
+
run: |
|
|
19
|
+
mkdir -p ./data
|
|
20
|
+
cd ./data
|
|
21
|
+
|
|
22
|
+
# 10x Genomics Xenium 2.0.0
|
|
23
|
+
curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Breast_2fov/Xenium_V1_human_Breast_2fov_outs.zip
|
|
24
|
+
curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Lung_2fov/Xenium_V1_human_Lung_2fov_outs.zip
|
|
25
|
+
|
|
26
|
+
# 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, multimodal cell segmentation
|
|
27
|
+
# this file seems to be corrupted; skipping it for now
|
|
28
|
+
# curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny.zip
|
|
29
|
+
|
|
30
|
+
# 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, nuclear expansion
|
|
31
|
+
curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_Mouse_Ileum_tiny/Xenium_Prime_Mouse_Ileum_tiny_outs.zip
|
|
32
|
+
|
|
33
|
+
# Spatial Genomics seqFISH v2
|
|
34
|
+
curl -O https://s3.embl.de/spatialdata/raw_data/seqfish-2-test-dataset.zip
|
|
35
|
+
|
|
36
|
+
- name: Unzip files
|
|
37
|
+
run: |
|
|
38
|
+
cd ./data
|
|
39
|
+
for file in *.zip; do
|
|
40
|
+
dir="${file%.zip}"
|
|
41
|
+
mkdir -p "$dir"
|
|
42
|
+
unzip "$file" -d "$dir"
|
|
43
|
+
rm "$file"
|
|
44
|
+
done
|
|
45
|
+
|
|
46
|
+
- name: Upload artifacts
|
|
47
|
+
uses: actions/upload-artifact@v3
|
|
48
|
+
with:
|
|
49
|
+
name: data
|
|
50
|
+
path: ./data
|
|
@@ -5,26 +5,26 @@ on:
|
|
|
5
5
|
types: [published]
|
|
6
6
|
|
|
7
7
|
jobs:
|
|
8
|
-
|
|
9
|
-
# requires that you have put your twine API key in your
|
|
10
|
-
# github secrets (see readme for details)
|
|
8
|
+
package_and_release:
|
|
11
9
|
runs-on: ubuntu-latest
|
|
12
|
-
if:
|
|
10
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
13
11
|
steps:
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- name: Set up Python 3.10
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
- name: Set up Python 3.12
|
|
18
14
|
uses: actions/setup-python@v4
|
|
19
15
|
with:
|
|
20
|
-
python-version: "3.
|
|
21
|
-
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
cache: pip
|
|
18
|
+
- name: Install build dependencies
|
|
19
|
+
run: python -m pip install --upgrade pip wheel twine build
|
|
20
|
+
- name: Build package
|
|
21
|
+
run: python -m build
|
|
22
|
+
- name: Check package
|
|
23
|
+
run: twine check --strict dist/*.whl
|
|
22
24
|
- name: Install hatch
|
|
23
25
|
run: pip install hatch
|
|
24
|
-
|
|
25
26
|
- name: Build project for distribution
|
|
26
27
|
run: hatch build
|
|
27
|
-
|
|
28
28
|
- name: Publish a Python distribution to PyPI
|
|
29
29
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
30
30
|
with:
|
|
@@ -7,15 +7,15 @@ default_stages:
|
|
|
7
7
|
minimum_pre_commit_version: 2.16.0
|
|
8
8
|
repos:
|
|
9
9
|
- repo: https://github.com/psf/black
|
|
10
|
-
rev: 24.
|
|
10
|
+
rev: 24.10.0
|
|
11
11
|
hooks:
|
|
12
12
|
- id: black
|
|
13
|
-
- repo: https://github.com/
|
|
14
|
-
rev:
|
|
13
|
+
- repo: https://github.com/rbubley/mirrors-prettier
|
|
14
|
+
rev: v3.4.2
|
|
15
15
|
hooks:
|
|
16
16
|
- id: prettier
|
|
17
17
|
- repo: https://github.com/asottile/blacken-docs
|
|
18
|
-
rev: 1.
|
|
18
|
+
rev: 1.19.1
|
|
19
19
|
hooks:
|
|
20
20
|
- id: blacken-docs
|
|
21
21
|
- repo: https://github.com/PyCQA/isort
|
|
@@ -23,7 +23,7 @@ repos:
|
|
|
23
23
|
hooks:
|
|
24
24
|
- id: isort
|
|
25
25
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
26
|
-
rev: v1.
|
|
26
|
+
rev: v1.14.1
|
|
27
27
|
hooks:
|
|
28
28
|
- id: mypy
|
|
29
29
|
additional_dependencies: [numpy, types-PyYAML]
|
|
@@ -40,7 +40,7 @@ repos:
|
|
|
40
40
|
- flake8-bugbear
|
|
41
41
|
- flake8-blind-except
|
|
42
42
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
43
|
-
rev:
|
|
43
|
+
rev: v5.0.0
|
|
44
44
|
hooks:
|
|
45
45
|
- id: detect-private-key
|
|
46
46
|
- id: check-ast
|
|
@@ -59,7 +59,7 @@ repos:
|
|
|
59
59
|
- --remove-unused-variable
|
|
60
60
|
- --ignore-init-module-imports
|
|
61
61
|
- repo: https://github.com/PyCQA/flake8
|
|
62
|
-
rev: 7.1.
|
|
62
|
+
rev: 7.1.1
|
|
63
63
|
hooks:
|
|
64
64
|
- id: flake8
|
|
65
65
|
additional_dependencies:
|
|
@@ -70,7 +70,7 @@ repos:
|
|
|
70
70
|
- flake8-bugbear
|
|
71
71
|
- flake8-blind-except
|
|
72
72
|
- repo: https://github.com/asottile/pyupgrade
|
|
73
|
-
rev: v3.
|
|
73
|
+
rev: v3.19.1
|
|
74
74
|
hooks:
|
|
75
75
|
- id: pyupgrade
|
|
76
76
|
args: [--py3-plus, --py310-plus, --keep-runtime-typing]
|
|
@@ -84,6 +84,6 @@ repos:
|
|
|
84
84
|
language: fail
|
|
85
85
|
files: '.*\.rej$'
|
|
86
86
|
- repo: https://github.com/PyCQA/doc8
|
|
87
|
-
rev: v1.1.
|
|
87
|
+
rev: v1.1.2
|
|
88
88
|
hooks:
|
|
89
89
|
- id: doc8
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: spatialdata-io
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
4
4
|
Summary: SpatialData IO for common techs
|
|
5
5
|
Project-URL: Documentation, https://spatialdata-io.readthedocs.io/
|
|
6
6
|
Project-URL: Source, https://github.com/scverse/spatialdata-io
|
|
@@ -36,13 +36,16 @@ License: BSD 3-Clause License
|
|
|
36
36
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
37
37
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
38
38
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
39
|
+
License-File: LICENSE
|
|
39
40
|
Requires-Python: >=3.10
|
|
40
41
|
Requires-Dist: anndata
|
|
42
|
+
Requires-Dist: click
|
|
41
43
|
Requires-Dist: dask-image
|
|
42
44
|
Requires-Dist: h5py
|
|
43
45
|
Requires-Dist: imagecodecs
|
|
44
46
|
Requires-Dist: joblib
|
|
45
47
|
Requires-Dist: numpy
|
|
48
|
+
Requires-Dist: ome-types
|
|
46
49
|
Requires-Dist: pyarrow
|
|
47
50
|
Requires-Dist: readfcs
|
|
48
51
|
Requires-Dist: scanpy
|
|
@@ -57,6 +60,7 @@ Requires-Dist: ipython>=8.6.0; extra == 'doc'
|
|
|
57
60
|
Requires-Dist: myst-nb; extra == 'doc'
|
|
58
61
|
Requires-Dist: sphinx-autodoc-typehints; extra == 'doc'
|
|
59
62
|
Requires-Dist: sphinx-book-theme>=1.0.0; extra == 'doc'
|
|
63
|
+
Requires-Dist: sphinx-click; extra == 'doc'
|
|
60
64
|
Requires-Dist: sphinx-copybutton; extra == 'doc'
|
|
61
65
|
Requires-Dist: sphinx-design; extra == 'doc'
|
|
62
66
|
Requires-Dist: sphinx>=4.5; extra == 'doc'
|
|
@@ -82,26 +86,42 @@ Description-Content-Type: text/markdown
|
|
|
82
86
|
|
|
83
87
|
This package contains reader functions to load common spatial omics formats into SpatialData. Currently, we provide support for:
|
|
84
88
|
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
89
|
+
- 10x Genomics Visium®
|
|
90
|
+
- 10x Genomics Visium HD®
|
|
91
|
+
- 10x Genomics Xenium®
|
|
92
|
+
- Akoya PhenoCycler® (formerly CODEX®)
|
|
93
|
+
- Curio Seeker®
|
|
94
|
+
- DBiT-seq
|
|
95
|
+
- MCMICRO (output data)
|
|
96
|
+
- NanoString CosMx®
|
|
97
|
+
- Spatial Genomics GenePS® (seqFISH)
|
|
98
|
+
- Steinbock (output data)
|
|
99
|
+
- STOmics Stereo-seq®
|
|
100
|
+
- Vizgen MERSCOPE® (MERFISH)
|
|
101
|
+
- MACSima® (MACS® iQ View output)
|
|
97
102
|
|
|
98
103
|
Note: all mentioned technologies are registered trademarks of their respective companies.
|
|
99
104
|
|
|
105
|
+
## Known limitations
|
|
106
|
+
|
|
107
|
+
Contributions for addressing the below limitations are very welcomed.
|
|
108
|
+
|
|
109
|
+
- Only Stereo-seq 7.x is supported, 8.x is not currently supported. https://github.com/scverse/spatialdata-io/issues/161
|
|
110
|
+
|
|
111
|
+
### How to Contribute
|
|
112
|
+
|
|
113
|
+
1. **Open a GitHub Issue**: Start by opening a new issue or commenting on an existing one in the repository. Clearly describe the problem and your proposed changes to avoid overlapping efforts with others.
|
|
114
|
+
|
|
115
|
+
2. **Submit a Pull Request (PR)**: Once the issue is discussed, submit a PR to the `spatialdata-io` repository. Ensure your PR includes information about a suitable dataset for testing the reader, ideally no larger than 10 GB. Include clear instructions for accessing the data, preferably with a `curl` or `wget` command for easy downloading.
|
|
116
|
+
|
|
117
|
+
3. **Optional Enhancements**: To facilitate reproducibility and ease of data access, consider adding a folder in the [spatialdata-sandbox](https://github.com/giovp/spatialdata-sandbox) repository. Include a `download.py` and `to_zarr.py` script (refer to examples in the repository) to enable others to reproduce your reader by simply running these scripts sequentially.
|
|
118
|
+
|
|
100
119
|
## Getting started
|
|
101
120
|
|
|
102
121
|
Please refer to the [documentation][link-docs]. In particular, the
|
|
103
122
|
|
|
104
|
-
-
|
|
123
|
+
- [API documentation][link-api].
|
|
124
|
+
- [CLI documentation][link-cli].
|
|
105
125
|
|
|
106
126
|
## Installation
|
|
107
127
|
|
|
@@ -131,15 +151,30 @@ If you found a bug, please use the [issue tracker][issue-tracker].
|
|
|
131
151
|
|
|
132
152
|
Technologies that can be read into `SpatialData` objects using third-party libraries:
|
|
133
153
|
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
154
|
+
- METASPACE (MALDI, ...): [metaspace-converter](https://github.com/metaspace2020/metaspace-converter)
|
|
155
|
+
- PhenoCycler®: [SOPA](https://github.com/gustaveroussy/sopa)
|
|
156
|
+
- MACSima®: [SOPA](https://github.com/gustaveroussy/sopa)
|
|
157
|
+
- Hyperion® (Imaging Mass Cytometry): [SOPA](https://github.com/gustaveroussy/sopa)
|
|
138
158
|
|
|
139
159
|
## Disclaimer
|
|
140
160
|
|
|
141
161
|
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.
|
|
142
162
|
|
|
163
|
+
## Solutions to common problems
|
|
164
|
+
|
|
165
|
+
### Problem: I cannot visualize the data, everything is slow
|
|
166
|
+
|
|
167
|
+
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.
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
from spatialdata_io import xenium
|
|
171
|
+
from spatialdata import read_zarr
|
|
172
|
+
|
|
173
|
+
sdata = xenium("raw_data")
|
|
174
|
+
sdata.write("data.zarr")
|
|
175
|
+
sdata = read_zarr("sdata.zarr")
|
|
176
|
+
```
|
|
177
|
+
|
|
143
178
|
## Citation
|
|
144
179
|
|
|
145
180
|
Marconato, L., Palla, G., Yamauchi, K.A. et al. SpatialData: an open and universal data framework for spatial omics. Nat Methods (2024). https://doi.org/10.1038/s41592-024-02212-x
|
|
@@ -149,3 +184,4 @@ Marconato, L., Palla, G., Yamauchi, K.A. et al. SpatialData: an open and univers
|
|
|
149
184
|
[changelog]: https://spatialdata.scverse.org/projects/io/en/latest/changelog.html
|
|
150
185
|
[link-docs]: https://spatialdata.scverse.org/projects/io/en/latest/
|
|
151
186
|
[link-api]: https://spatialdata.scverse.org/projects/io/en/latest/api.html
|
|
187
|
+
[link-cli]: https://spatialdata.scverse.org/projects/io/en/latest/cli.html
|
|
@@ -12,26 +12,42 @@
|
|
|
12
12
|
|
|
13
13
|
This package contains reader functions to load common spatial omics formats into SpatialData. Currently, we provide support for:
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
15
|
+
- 10x Genomics Visium®
|
|
16
|
+
- 10x Genomics Visium HD®
|
|
17
|
+
- 10x Genomics Xenium®
|
|
18
|
+
- Akoya PhenoCycler® (formerly CODEX®)
|
|
19
|
+
- Curio Seeker®
|
|
20
|
+
- DBiT-seq
|
|
21
|
+
- MCMICRO (output data)
|
|
22
|
+
- NanoString CosMx®
|
|
23
|
+
- Spatial Genomics GenePS® (seqFISH)
|
|
24
|
+
- Steinbock (output data)
|
|
25
|
+
- STOmics Stereo-seq®
|
|
26
|
+
- Vizgen MERSCOPE® (MERFISH)
|
|
27
|
+
- MACSima® (MACS® iQ View output)
|
|
27
28
|
|
|
28
29
|
Note: all mentioned technologies are registered trademarks of their respective companies.
|
|
29
30
|
|
|
31
|
+
## Known limitations
|
|
32
|
+
|
|
33
|
+
Contributions for addressing the below limitations are very welcomed.
|
|
34
|
+
|
|
35
|
+
- Only Stereo-seq 7.x is supported, 8.x is not currently supported. https://github.com/scverse/spatialdata-io/issues/161
|
|
36
|
+
|
|
37
|
+
### How to Contribute
|
|
38
|
+
|
|
39
|
+
1. **Open a GitHub Issue**: Start by opening a new issue or commenting on an existing one in the repository. Clearly describe the problem and your proposed changes to avoid overlapping efforts with others.
|
|
40
|
+
|
|
41
|
+
2. **Submit a Pull Request (PR)**: Once the issue is discussed, submit a PR to the `spatialdata-io` repository. Ensure your PR includes information about a suitable dataset for testing the reader, ideally no larger than 10 GB. Include clear instructions for accessing the data, preferably with a `curl` or `wget` command for easy downloading.
|
|
42
|
+
|
|
43
|
+
3. **Optional Enhancements**: To facilitate reproducibility and ease of data access, consider adding a folder in the [spatialdata-sandbox](https://github.com/giovp/spatialdata-sandbox) repository. Include a `download.py` and `to_zarr.py` script (refer to examples in the repository) to enable others to reproduce your reader by simply running these scripts sequentially.
|
|
44
|
+
|
|
30
45
|
## Getting started
|
|
31
46
|
|
|
32
47
|
Please refer to the [documentation][link-docs]. In particular, the
|
|
33
48
|
|
|
34
|
-
-
|
|
49
|
+
- [API documentation][link-api].
|
|
50
|
+
- [CLI documentation][link-cli].
|
|
35
51
|
|
|
36
52
|
## Installation
|
|
37
53
|
|
|
@@ -61,15 +77,30 @@ If you found a bug, please use the [issue tracker][issue-tracker].
|
|
|
61
77
|
|
|
62
78
|
Technologies that can be read into `SpatialData` objects using third-party libraries:
|
|
63
79
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
80
|
+
- METASPACE (MALDI, ...): [metaspace-converter](https://github.com/metaspace2020/metaspace-converter)
|
|
81
|
+
- PhenoCycler®: [SOPA](https://github.com/gustaveroussy/sopa)
|
|
82
|
+
- MACSima®: [SOPA](https://github.com/gustaveroussy/sopa)
|
|
83
|
+
- Hyperion® (Imaging Mass Cytometry): [SOPA](https://github.com/gustaveroussy/sopa)
|
|
68
84
|
|
|
69
85
|
## Disclaimer
|
|
70
86
|
|
|
71
87
|
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.
|
|
72
88
|
|
|
89
|
+
## Solutions to common problems
|
|
90
|
+
|
|
91
|
+
### Problem: I cannot visualize the data, everything is slow
|
|
92
|
+
|
|
93
|
+
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.
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
from spatialdata_io import xenium
|
|
97
|
+
from spatialdata import read_zarr
|
|
98
|
+
|
|
99
|
+
sdata = xenium("raw_data")
|
|
100
|
+
sdata.write("data.zarr")
|
|
101
|
+
sdata = read_zarr("sdata.zarr")
|
|
102
|
+
```
|
|
103
|
+
|
|
73
104
|
## Citation
|
|
74
105
|
|
|
75
106
|
Marconato, L., Palla, G., Yamauchi, K.A. et al. SpatialData: an open and universal data framework for spatial omics. Nat Methods (2024). https://doi.org/10.1038/s41592-024-02212-x
|
|
@@ -79,3 +110,4 @@ Marconato, L., Palla, G., Yamauchi, K.A. et al. SpatialData: an open and univers
|
|
|
79
110
|
[changelog]: https://spatialdata.scverse.org/projects/io/en/latest/changelog.html
|
|
80
111
|
[link-docs]: https://spatialdata.scverse.org/projects/io/en/latest/
|
|
81
112
|
[link-api]: https://spatialdata.scverse.org/projects/io/en/latest/api.html
|
|
113
|
+
[link-cli]: https://spatialdata.scverse.org/projects/io/en/latest/cli.html
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# API
|
|
2
2
|
|
|
3
|
+
This section documents the Application Programming Interface (API) for the `spatialdata_io` package.
|
|
4
|
+
|
|
3
5
|
```{eval-rst}
|
|
4
6
|
.. module:: spatialdata_io
|
|
5
7
|
```
|
|
@@ -10,6 +12,8 @@ I/O for the `spatialdata` project.
|
|
|
10
12
|
|
|
11
13
|
### Readers
|
|
12
14
|
|
|
15
|
+
#### Spatial technologies
|
|
16
|
+
|
|
13
17
|
```{eval-rst}
|
|
14
18
|
.. autosummary::
|
|
15
19
|
:toctree: generated
|
|
@@ -18,6 +22,7 @@ I/O for the `spatialdata` project.
|
|
|
18
22
|
cosmx
|
|
19
23
|
curio
|
|
20
24
|
dbit
|
|
25
|
+
experimental.iss
|
|
21
26
|
mcmicro
|
|
22
27
|
merscope
|
|
23
28
|
seqfish
|
|
@@ -28,15 +33,15 @@ I/O for the `spatialdata` project.
|
|
|
28
33
|
xenium
|
|
29
34
|
```
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
#### Data types
|
|
32
37
|
|
|
33
38
|
```{eval-rst}
|
|
34
|
-
.. currentmodule:: spatialdata_io.experimental
|
|
35
|
-
|
|
36
39
|
.. autosummary::
|
|
37
40
|
:toctree: generated
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
generic
|
|
43
|
+
image
|
|
44
|
+
geojson
|
|
40
45
|
```
|
|
41
46
|
|
|
42
47
|
### Conversion functions
|
|
@@ -47,18 +52,8 @@ I/O for the `spatialdata` project.
|
|
|
47
52
|
.. autosummary::
|
|
48
53
|
:toctree: generated
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### Experimental conversion functions
|
|
53
|
-
|
|
54
|
-
```{eval-rst}
|
|
55
|
-
.. currentmodule:: spatialdata_io.experimental
|
|
56
|
-
|
|
57
|
-
.. autosummary::
|
|
58
|
-
:toctree: generated
|
|
59
|
-
|
|
60
|
-
from_legacy_anndata
|
|
61
|
-
to_legacy_anndata
|
|
55
|
+
experimental.from_legacy_anndata
|
|
56
|
+
experimental.to_legacy_anndata
|
|
62
57
|
```
|
|
63
58
|
|
|
64
59
|
### Utility functions
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Please refer directly to the [Releases](https://github.com/scverse/spatialdata-io/releases) section on GitHub, where you can find curated release notes for each release.
|
|
4
|
+
For developers, please consult the [contributing guide](https://github.com/scverse/spatialdata/blob/main/docs/contributing.md), which explains how to keep release notes are up-to-date at each release.
|
|
@@ -23,6 +23,7 @@ urls.Source = "https://github.com/scverse/spatialdata-io"
|
|
|
23
23
|
urls.Home-page = "https://github.com/scverse/spatialdata-io"
|
|
24
24
|
dependencies = [
|
|
25
25
|
"anndata",
|
|
26
|
+
"click",
|
|
26
27
|
"numpy",
|
|
27
28
|
"scanpy",
|
|
28
29
|
"spatialdata>=0.2.6",
|
|
@@ -34,6 +35,7 @@ dependencies = [
|
|
|
34
35
|
"pyarrow",
|
|
35
36
|
"readfcs",
|
|
36
37
|
"tifffile>=2023.8.12",
|
|
38
|
+
"ome-types",
|
|
37
39
|
]
|
|
38
40
|
|
|
39
41
|
[project.optional-dependencies]
|
|
@@ -49,6 +51,7 @@ doc = [
|
|
|
49
51
|
"sphinxcontrib-bibtex>=1.0.0",
|
|
50
52
|
"sphinx-autodoc-typehints",
|
|
51
53
|
"sphinx-design",
|
|
54
|
+
"sphinx-click",
|
|
52
55
|
# For notebooks
|
|
53
56
|
"ipython>=8.6.0",
|
|
54
57
|
"sphinx-copybutton",
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
from importlib.metadata import version
|
|
2
2
|
|
|
3
|
+
from spatialdata_io.converters.generic_to_zarr import generic_to_zarr
|
|
3
4
|
from spatialdata_io.readers.codex import codex
|
|
4
5
|
from spatialdata_io.readers.cosmx import cosmx
|
|
5
6
|
from spatialdata_io.readers.curio import curio
|
|
6
7
|
from spatialdata_io.readers.dbit import dbit
|
|
8
|
+
from spatialdata_io.readers.generic import generic, geojson, image
|
|
9
|
+
from spatialdata_io.readers.macsima import macsima
|
|
7
10
|
from spatialdata_io.readers.mcmicro import mcmicro
|
|
8
11
|
from spatialdata_io.readers.merscope import merscope
|
|
9
12
|
from spatialdata_io.readers.seqfish import seqfish
|
|
@@ -17,21 +20,42 @@ from spatialdata_io.readers.xenium import (
|
|
|
17
20
|
xenium_explorer_selection,
|
|
18
21
|
)
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
"curio",
|
|
22
|
-
"seqfish",
|
|
23
|
-
"visium",
|
|
24
|
-
"xenium",
|
|
23
|
+
_readers_technologies = [
|
|
25
24
|
"codex",
|
|
26
25
|
"cosmx",
|
|
26
|
+
"curio",
|
|
27
|
+
"dbit",
|
|
28
|
+
"macsima",
|
|
27
29
|
"mcmicro",
|
|
30
|
+
"merscope",
|
|
31
|
+
"seqfish",
|
|
28
32
|
"steinbock",
|
|
29
33
|
"stereoseq",
|
|
30
|
-
"
|
|
31
|
-
"xenium_aligned_image",
|
|
32
|
-
"xenium_explorer_selection",
|
|
33
|
-
"dbit",
|
|
34
|
+
"visium",
|
|
34
35
|
"visium_hd",
|
|
36
|
+
"xenium",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
_readers_file_types = [
|
|
40
|
+
"generic",
|
|
41
|
+
"image",
|
|
42
|
+
"geojson",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
_converters = [
|
|
46
|
+
"generic_to_zarr",
|
|
35
47
|
]
|
|
36
48
|
|
|
49
|
+
|
|
50
|
+
__all__ = (
|
|
51
|
+
[
|
|
52
|
+
"xenium_aligned_image",
|
|
53
|
+
"xenium_explorer_selection",
|
|
54
|
+
]
|
|
55
|
+
+ _readers_technologies
|
|
56
|
+
+ _readers_file_types
|
|
57
|
+
+ _converters
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
37
61
|
__version__ = version("spatialdata-io")
|