[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge branch 'main' into visium/raw_matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaMarconato committed Mar 8, 2024
2 parents 1fdebdd + 6fff710 commit d9bc12e
Show file tree
Hide file tree
Showing 10 changed files with 407 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ __pycache__/
# IDEs
/.idea/
/.vscode/
/.spyproject/

# docs
/docs/generated/
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_stages:
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
Expand Down Expand Up @@ -50,7 +50,7 @@ repos:
- id: trailing-whitespace
- id: check-case-conflict
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
rev: v2.3.0
hooks:
- id: autoflake
args:
Expand All @@ -70,7 +70,7 @@ repos:
- flake8-bugbear
- flake8-blind-except
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py3-plus, --py39-plus, --keep-runtime-typing]
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning][].

- (MCMICRO) support for TMAs (such as the data of exemplar-002)
- (Xenium) support for post-xenium aligned images (IF, HE)
- (Xenium) reader for the selection coordinates file from the Xenium Explorer
- DBiT-seq reader
- (Visium) support for raw reads (capture locations not under tissue)

### Fixed
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ This package contains reader functions to load common spatial omics formats into
- Curio Seeker
- Akoya PhenoCycler (formerly CODEX)
- Vizgen MERSCOPE (MERFISH)
- DBiT-seq

## Getting started

Expand Down Expand Up @@ -51,6 +52,15 @@ pip install git+https://github.com/scverse/spatialdata-io.git@main
For questions and help requests, you can reach out in the [scverse discourse][scverse-discourse].
If you found a bug, please use the [issue tracker][issue-tracker].

## Readers from third-party libraries

Technologies that can be read into `SpatialData` objects using third-party libraries:

- METASPACE (MALDI, ...): [metaspace-converter](https://github.com/metaspace2020/metaspace-converter)
- PhenoCycler: [SOPA](https://github.com/gustaveroussy/sopa)
- MACSima: [SOPA](https://github.com/gustaveroussy/sopa)
- Hyperion (Imaging Mass Cytometry): [SOPA](https://github.com/gustaveroussy/sopa)

## Citation

[L Marconato*, G Palla*, KA Yamauchi*, I Virshup*, E Heidari, T Treis, M Toth, R Shrestha, H Vöhringer, W Huber, M Gerstung, J Moore, FJ Theis, O Stegle, bioRxiv, 2023](https://www.biorxiv.org/content/10.1101/2023.05.05.539647v1). \* = equal contribution
Expand Down
13 changes: 13 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

I/O for the `spatialdata` project.

### Readers

```{eval-rst}
.. autosummary::
:toctree: generated
Expand All @@ -20,4 +22,15 @@ I/O for the `spatialdata` project.
steinbock
merscope
mcmicro
dbit
```

### Utility functions

```{eval-rst}
.. autosummary::
:toctree: generated
xenium_aligned_image
xenium_explorer_selection
```
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"geopandas": ("https://geopandas.org/en/stable/", None),
"xarray": ("https://docs.xarray.dev/en/stable/", None),
"datatree": ("https://datatree.readthedocs.io/en/latest/", None),
"shapely": ("https://shapely.readthedocs.io/en/stable/", None),
}

# List of patterns, relative to source directory, that match files and
Expand Down
10 changes: 9 additions & 1 deletion src/spatialdata_io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
from spatialdata_io.readers.codex import codex
from spatialdata_io.readers.cosmx import cosmx
from spatialdata_io.readers.curio import curio
from spatialdata_io.readers.dbit import dbit
from spatialdata_io.readers.mcmicro import mcmicro
from spatialdata_io.readers.merscope import merscope
from spatialdata_io.readers.steinbock import steinbock
from spatialdata_io.readers.visium import visium
from spatialdata_io.readers.xenium import xenium
from spatialdata_io.readers.xenium import (
xenium,
xenium_aligned_image,
xenium_explorer_selection,
)

__all__ = [
"curio",
Expand All @@ -18,6 +23,9 @@
"mcmicro",
"steinbock",
"merscope",
"xenium_aligned_image",
"xenium_explorer_selection",
"dbit",
]

__version__ = version("spatialdata-io")
12 changes: 12 additions & 0 deletions src/spatialdata_io/_constants/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,15 @@ class MerscopeKeys(ModeEnum):
GLOBAL_Z = "global_z"
Z_INDEX = "ZIndex"
REGION_KEY = "cells_region"


@unique
class DbitKeys(ModeEnum):
"""Keys for DBiT formatted dataset."""

# files and directories
COUNTS_FILE = ".h5ad"
# barcodes_file
BARCODE_POSITION = "barcode_list"
# image
IMAGE_LOWRES_FILE = "tissue_lowres_image.png"
Loading

0 comments on commit d9bc12e

Please sign in to comment.