Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit 2c2c20a

Browse files
version 0.1.0
1 parent f6fb49f commit 2c2c20a

32 files changed

Lines changed: 3768 additions & 1414 deletions
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[Bug]"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Description
11+
A clear and concise description of what the bug is.
12+
13+
## Reproducing the issue
14+
Steps to reproduce the behavior.
15+
16+
## Expected behavior
17+
A clear and concise description of what you expected to happen.
18+
19+
## System
20+
- OS: [e.g. Linux]
21+
- Python version [e.g. 3.9.7]
22+
<details>
23+
<summary>Dependencies versions</summary>
24+
<br>
25+
Paste here what 'pip list' gives you.
26+
</details>

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[Feature]"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: ci
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
#----------------------------------------------
11+
# check-out repo and set-up python
12+
#----------------------------------------------
13+
- name: Check out repository
14+
uses: actions/checkout@v3
15+
- name: Set up python
16+
id: setup-python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: 3.9
20+
#----------------------------------------------
21+
# install & configure poetry
22+
#----------------------------------------------
23+
- name: Install Poetry
24+
uses: snok/install-poetry@v1
25+
#----------------------------------------------
26+
# load cached venv if cache exists
27+
#----------------------------------------------
28+
- name: Load cached venv
29+
id: cached-poetry-dependencies
30+
uses: actions/cache@v3
31+
with:
32+
path: .venv
33+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
34+
#----------------------------------------------
35+
# install dependencies if cache does not exist
36+
#----------------------------------------------
37+
- name: Install dependencies
38+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
39+
run: poetry install
40+
#----------------------------------------------
41+
# run test suite
42+
#----------------------------------------------
43+
- name: Tests
44+
run: poetry run pytest
45+
- name: Deploy doc
46+
run: poetry run mkdocs gh-deploy --force

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
# SpatialData to Xenium Explorer
2+
23
Converting any [`SpatialData`](https://github.com/scverse/spatialdata) object into files that can be open by the [Xenium Explorer](https://www.10xgenomics.com/support/software/xenium-explorer).
34

45
> *Xenium Explorer* is a registered trademark of 10x Genomics
56
67
## Installation
78

8-
This package is currently in development. You can test it out, but you may experience some issues.
9-
10-
`pip install git+https://github.com/quentinblampey/spatialdata_xenium_explorer.git`
9+
```sh
10+
pip install spatialdata_xenium_explorer
11+
```
1112

1213
## Usage
1314

15+
You can use our [CLI](TODO) or [API](TODO), see examples below. It will create up to 6 files, among which a file called `experiment.xenium`. Double-click on this file to open it on the [Xenium Explorer](https://www.10xgenomics.com/support/software/xenium-explorer/downloads) (make sure you have the latest version of the software).
16+
17+
### CLI
18+
19+
```sh
20+
spatialdata_xenium_explorer write /path/to/sdata.zarr
21+
```
22+
23+
### API
24+
1425
```python
1526
import spatialdata
1627
import spatialdata_xenium_explorer
@@ -20,15 +31,6 @@ sdata = spatialdata.read_zarr("...")
2031
spatialdata_xenium_explorer.write("/path/to/directory", sdata, image_key, shapes_key, points_key, gene_column)
2132
```
2233

23-
For more details about the arguments, see the [function docstrings](https://github.com/quentinblampey/spatialdata_xenium_explorer/blob/master/spatialdata_xenium_explorer/converter.py#L29).
24-
25-
This will create up to 6 files, among which a file called `experiment.xenium`. Double-click on this file to open it on the [Xenium Explorer](https://www.10xgenomics.com/support/software/xenium-explorer/downloads) (make sure you have the latest version of the software).
26-
2734
## Future improvements and contributions
2835

29-
Contributions are welcome. Some of the most urgent features to be added:
30-
31-
- Support all types of images (not just `MultiscaleSpatialImage`)
32-
- Better user experience (less arguments)
33-
- Write `.tif` image without loading the spatial image in memory
34-
- Write transcripts without computing the whole coordinates
36+
This package is still in early development. Contributions are welcome (new issues, pull requests, ...).

docs/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# `spatialdata_xenium_explorer` documentation
2+
3+
The documentation is generated by [Mkdocs material](https://squidfunk.github.io/mkdocs-material/) and deployed when pushing a new tag on Github.
4+
5+
## Serve locally
6+
7+
Clone the repository, and install all the dependencies:
8+
9+
```
10+
poetry install --all-extras
11+
```
12+
13+
Then, run:
14+
```sh
15+
mkdocs serve
16+
```
17+
18+
You can also update the CLI docs (if you install `typer-cli`) with the following command line:
19+
20+
```sh
21+
typer spatialdata_xenium_explorer.main utils docs --output tmpfile --name spatialdata_xenium_explorer && sed '1,2d; s/## /### /g; s/Usage:/!!! note '\"'Usage'\"'/g' tmpfile >> docs/cli.md && rm tmpfile
22+
```

docs/api.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
::: spatialdata_xenium_explorer.write
2+
options:
3+
show_root_heading: true
4+
5+
::: spatialdata_xenium_explorer.write_image
6+
options:
7+
show_root_heading: true
8+
9+
::: spatialdata_xenium_explorer.write_cell_categories
10+
options:
11+
show_root_heading: true
12+
13+
::: spatialdata_xenium_explorer.write_transcripts
14+
options:
15+
show_root_heading: true
16+
17+
::: spatialdata_xenium_explorer.write_gene_counts
18+
options:
19+
show_root_heading: true
20+
21+
::: spatialdata_xenium_explorer.write_polygons
22+
options:
23+
show_root_heading: true
24+
25+
::: spatialdata_xenium_explorer.write_metadata
26+
options:
27+
show_root_heading: true
28+
29+
::: spatialdata_xenium_explorer.int_cell_id
30+
options:
31+
show_root_heading: true
32+
33+
::: spatialdata_xenium_explorer.str_cell_id
34+
options:
35+
show_root_heading: true
36+
37+
::: spatialdata_xenium_explorer.align
38+
options:
39+
show_root_heading: true
40+
41+
::: spatialdata_xenium_explorer.save_column_csv
42+
options:
43+
show_root_heading: true

0 commit comments

Comments
 (0)