Skip to content

Commit 48b31f8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8b60187 commit 48b31f8

File tree

254 files changed

+1628
-1326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+1628
-1326
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ __pycache__/
3030

3131
Sandbox.ipynb
3232
test.ipynb
33-
*.zarr
33+
*.zarr

.readthedocs.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
version: 2
22
build:
3-
os: ubuntu-24.04
4-
tools:
5-
python: "3.12"
6-
commands:
7-
- asdf plugin add uv
8-
- asdf install uv latest
9-
- asdf global uv latest
10-
- uv venv
11-
- uv pip install .[doc]
12-
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
3+
os: ubuntu-24.04
4+
tools:
5+
python: "3.12"
6+
commands:
7+
- asdf plugin add uv
8+
- asdf install uv latest
9+
- asdf global uv latest
10+
- uv venv
11+
- uv pip install .[doc]
12+
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
1313
sphinx:
14-
configuration: docs/conf.py
15-
fail_on_warning: false
14+
configuration: docs/conf.py
15+
fail_on_warning: false
1616

1717
submodules:
18-
include: all
18+
include: all

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ and this project adheres to [Semantic Versioning][].
1212

1313
### Added
1414

15-
- Basic tool, preprocessing and plotting functions
15+
- Basic tool, preprocessing and plotting functions

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Currently focusing on the following datasets for diversity in testing:
99
- `jqmx8`: VisiumHD, Mouse, Intestine
1010

1111
## Setup vitessce
12+
1213
Currently, the `SpatialDataWrapper` is not yet merged and released. Therefore, we have to install it via
1314

1415
```bash
@@ -19,10 +20,11 @@ pip install git+https://github.com/vitessce/vitessce-python.git@ig/spatial_data
1920
from Ilan's PR: https://github.com/vitessce/vitessce-python/pull/333
2021

2122
## UID logic
23+
2224
- Absolute ID will be a 5 char string of lowercase letters and digits -> 60466176 IDs
2325
- Leaving out the letters [l, b, o, g, q] due to their similarity to [1, 6, 0, 9, 9] -> 28629151 IDs
2426
- Reserve ID spaces for technology providers
25-
- 10 _ _ _ -> 29791 IDs for 10X Genomics
26-
- vg _ _ _ -> 29791 IDs for Vizgen
27-
- ns _ _ _ -> 29791 IDs for Nanostring
28-
- xx _ _ _ -> 29791 IDs for miscellaneous, such as publication
27+
- 10 \_ \_ \_ -> 29791 IDs for 10X Genomics
28+
- vg \_ \_ \_ -> 29791 IDs for Vizgen
29+
- ns \_ \_ \_ -> 29791 IDs for Nanostring
30+
- xx \_ \_ \_ -> 29791 IDs for miscellaneous, such as publication

data/1000j__10X__Visium__Human__large_intestine__20220328__v1.3.0/1000j_to_zarr.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
uid = "1000j_"
22

33
# CONSTANT
4-
from spatialdata_io import visium
5-
import spatialdata as sd
6-
from pathlib import Path
74
import shutil
5+
from pathlib import Path
6+
7+
import spatialdata as sd
8+
from spatialdata_io import visium
89

910
DATA_DIR = Path("/lustre/groups/ml01/projects/2024_spatialdata_db/data")
1011
datasets_with_uid = [DATA_DIR / d.name for d in DATA_DIR.iterdir() if d.is_dir() and uid in str(d.name)]
@@ -23,7 +24,7 @@
2324
path=str(path_read),
2425
dataset_id="Visium_FFPE_Human_Intestinal_Cancer",
2526
counts_file=str(path_read / "Visium_FFPE_Human_Intestinal_Cancer_filtered_feature_bc_matrix.h5"),
26-
fullres_image_file=str(path_read / "spatial" /"tissue_hires_image.png"),
27+
fullres_image_file=str(path_read / "spatial" / "tissue_hires_image.png"),
2728
tissue_positions_file=str(path_read / "spatial" / "tissue_positions_list.csv"),
2829
scalefactors_file=str(path_read / "spatial" / "scalefactors_json.json"),
2930
)
@@ -39,7 +40,7 @@
3940
##
4041
sdata = sd.SpatialData.read(path_write)
4142

42-
with open(dataset_path / f"{dataset_name}.contents", 'w') as file:
43+
with open(dataset_path / f"{dataset_name}.contents", "w") as file:
4344
print(sdata, file=file)
4445

4546
print(sdata)

data/1001e__10X__Visium__Mouse__embryo__20230608__v2.1.0/1001e_to_zarr.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
uid = "1001e_"
22

33
# CONSTANT
4-
from spatialdata_io import visium
5-
import spatialdata as sd
6-
from pathlib import Path
74
import shutil
5+
from pathlib import Path
6+
7+
import spatialdata as sd
8+
from spatialdata_io import visium
89

910
DATA_DIR = Path("/lustre/groups/ml01/projects/2024_spatialdata_db/data")
1011
datasets_with_uid = [DATA_DIR / d.name for d in DATA_DIR.iterdir() if d.is_dir() and uid in str(d.name)]
@@ -23,7 +24,7 @@
2324
path=str(path_read),
2425
dataset_id="CytAssist_11mm_FFPE_Mouse_Embryo",
2526
counts_file=str(path_read / "CytAssist_11mm_FFPE_Mouse_Embryo_filtered_feature_bc_matrix.h5"),
26-
fullres_image_file=str(path_read / "spatial" /"tissue_hires_image.png"),
27+
fullres_image_file=str(path_read / "spatial" / "tissue_hires_image.png"),
2728
tissue_positions_file=str(path_read / "spatial" / "tissue_positions.csv"),
2829
scalefactors_file=str(path_read / "spatial" / "scalefactors_json.json"),
2930
)
@@ -39,7 +40,7 @@
3940
##
4041
sdata = sd.SpatialData.read(path_write)
4142

42-
with open(dataset_path / f"{dataset_name}.contents", 'w') as file:
43+
with open(dataset_path / f"{dataset_name}.contents", "w") as file:
4344
print(sdata, file=file)
4445

4546
print(sdata)

data/10040__10X__Xenium__Human__bone_bone_marrow__20240403__v1.9.0__Non-diseasedBoneMarrow/10040_to_zarr.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
uid = "10040_"
22

33
# CONSTANT
4-
from spatialdata_io import xenium
5-
import spatialdata as sd
6-
from pathlib import Path
74
import shutil
5+
from pathlib import Path
6+
7+
import spatialdata as sd
8+
from spatialdata_io import xenium
89

910
DATA_DIR = Path("/lustre/groups/ml01/projects/2024_spatialdata_db/data")
1011
datasets_with_uid = [DATA_DIR / d.name for d in DATA_DIR.iterdir() if d.is_dir() and uid in str(d.name)]
@@ -38,7 +39,7 @@
3839
##
3940
sdata = sd.SpatialData.read(path_write)
4041

41-
with open(dataset_path / f"{dataset_name}.contents", 'w') as file:
42+
with open(dataset_path / f"{dataset_name}.contents", "w") as file:
4243
print(sdata, file=file)
4344

4445
print(sdata)

data/10053__10X__Visium__Mouse__brain__20220329__v1.3.0/10053_to_zarr.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
uid = "10053_"
22

33
# CONSTANT
4-
from spatialdata_io import visium
5-
import spatialdata as sd
6-
from pathlib import Path
74
import shutil
5+
from pathlib import Path
6+
7+
import spatialdata as sd
8+
from spatialdata_io import visium
89

910
DATA_DIR = Path("/lustre/groups/ml01/projects/2024_spatialdata_db/data")
1011
datasets_with_uid = [DATA_DIR / d.name for d in DATA_DIR.iterdir() if d.is_dir() and uid in str(d.name)]
@@ -23,7 +24,7 @@
2324
path=str(path_read),
2425
dataset_id="V1_Adult_Mouse_Brain",
2526
counts_file=str(path_read / "V1_Adult_Mouse_Brain_filtered_feature_bc_matrix.h5"),
26-
fullres_image_file=str(path_read / "spatial" /"tissue_hires_image.png"),
27+
fullres_image_file=str(path_read / "spatial" / "tissue_hires_image.png"),
2728
tissue_positions_file=str(path_read / "spatial" / "tissue_positions_list.csv"),
2829
scalefactors_file=str(path_read / "spatial" / "scalefactors_json.json"),
2930
)
@@ -39,7 +40,7 @@
3940
##
4041
sdata = sd.SpatialData.read(path_write)
4142

42-
with open(dataset_path / f"{dataset_name}.contents", 'w') as file:
43+
with open(dataset_path / f"{dataset_name}.contents", "w") as file:
4344
print(sdata, file=file)
4445

4546
print(sdata)

data/10056__10X__Visium__Mouse__brain__20230417__v2.0.1/10056_to_zarr.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
uid = "10056_"
22

33
# CONSTANT
4-
from spatialdata_io import visium
5-
import spatialdata as sd
6-
from pathlib import Path
74
import shutil
5+
from pathlib import Path
6+
7+
import spatialdata as sd
8+
from spatialdata_io import visium
89

910
DATA_DIR = Path("/lustre/groups/ml01/projects/2024_spatialdata_db/data")
1011
datasets_with_uid = [DATA_DIR / d.name for d in DATA_DIR.iterdir() if d.is_dir() and uid in str(d.name)]
@@ -23,7 +24,7 @@
2324
path=str(path_read),
2425
dataset_id="CytAssist_Fresh_Frozen_Sagittal_Mouse_Brain",
2526
counts_file=str(path_read / "CytAssist_Fresh_Frozen_Sagittal_Mouse_Brain_filtered_feature_bc_matrix.h5"),
26-
fullres_image_file=str(path_read / "spatial" /"tissue_hires_image.png"),
27+
fullres_image_file=str(path_read / "spatial" / "tissue_hires_image.png"),
2728
tissue_positions_file=str(path_read / "spatial" / "tissue_positions.csv"),
2829
scalefactors_file=str(path_read / "spatial" / "scalefactors_json.json"),
2930
)
@@ -39,7 +40,7 @@
3940
##
4041
sdata = sd.SpatialData.read(path_write)
4142

42-
with open(dataset_path / f"{dataset_name}.contents", 'w') as file:
43+
with open(dataset_path / f"{dataset_name}.contents", "w") as file:
4344
print(sdata, file=file)
4445

4546
print(sdata)

data/1005m__10X__Visium__Human__prostate__20210609__v1.3.0/1005m_to_zarr.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
uid = "1005m_"
22

33
# CONSTANT
4-
from spatialdata_io import visium
5-
import spatialdata as sd
6-
from pathlib import Path
74
import shutil
5+
from pathlib import Path
6+
7+
import spatialdata as sd
8+
from spatialdata_io import visium
89

910
DATA_DIR = Path("/lustre/groups/ml01/projects/2024_spatialdata_db/data")
1011
datasets_with_uid = [DATA_DIR / d.name for d in DATA_DIR.iterdir() if d.is_dir() and uid in str(d.name)]
@@ -23,7 +24,7 @@
2324
path=str(path_read),
2425
dataset_id="Visium_FFPE_Human_Normal_Prostate",
2526
counts_file=str(path_read / "Visium_FFPE_Human_Normal_Prostate_filtered_feature_bc_matrix.h5"),
26-
fullres_image_file=str(path_read / "spatial" /"tissue_hires_image.png"),
27+
fullres_image_file=str(path_read / "spatial" / "tissue_hires_image.png"),
2728
tissue_positions_file=str(path_read / "spatial" / "tissue_positions_list.csv"),
2829
scalefactors_file=str(path_read / "spatial" / "scalefactors_json.json"),
2930
)
@@ -39,7 +40,7 @@
3940
##
4041
sdata = sd.SpatialData.read(path_write)
4142

42-
with open(dataset_path / f"{dataset_name}.contents", 'w') as file:
43+
with open(dataset_path / f"{dataset_name}.contents", "w") as file:
4344
print(sdata, file=file)
4445

4546
print(sdata)

0 commit comments

Comments
 (0)