Converting any SpatialData object into files that can be open by the Xenium Explorer
Project description
SpatialData to Xenium Explorer
Converting any SpatialData
object into files that can be open by the Xenium Explorer.
Xenium Explorer is a registered trademark of 10x Genomics
You may also be interested in a pipeline for spatial-omics that uses this conversion to Xenium Explorer: see Sopa.
Installation
Requirement: python>=3.9
pip install spatialdata_xenium_explorer
Features
- Conversion of the following data: images, cell boundaries (polygons), transcripts, cell-by-gene table, and cell categories (or observations).
- Image alignment can be made on the Xenium Explorer, and then the
SpatialData
object can be updated - When working on the
SpatialData
orAnnData
object, new cell categories can be easily and quickly added to the Explorer - When selecting cells with the "lasso tool" on the Explorer, it's easy to select back these cells on the
SpatialData
orAnnData
object
Usage
You can use our CLI or API, 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 (make sure you have the latest version of the software).
CLI
spatialdata_xenium_explorer write /path/to/sdata.zarr
Check our documentation for more details.
API
import spatialdata
import spatialdata_xenium_explorer
sdata = spatialdata.read_zarr("...")
spatialdata_xenium_explorer.write("/path/to/directory", sdata, image_key, shapes_key, points_key, gene_column)
Check our documentation for more details.
Contributing
This package is still in early development. Contributions are welcome (new issues, pull requests, ...).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for spatialdata_xenium_explorer-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1196a7ffb5d74176cf21c3fd949c3f7df5600b46e1dea169c904f439ead06e81 |
|
MD5 | a82f0cc9ad5e5699ee2d07e9d580e56c |
|
BLAKE2b-256 | 5e2574d274b6633e33eab5b1129e4dfaafc4cab448b50fbe7d8d0c1b87b01467 |
Hashes for spatialdata_xenium_explorer-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cedc885c62c8822ba963072329cea1591cad0d69d18e3cdd1bd34d5a412bc97 |
|
MD5 | 2923ba3c6c303c3c3f85508b6456d2cc |
|
BLAKE2b-256 | d4ae14512db47027e3ca07c9d9f4264de4f3967eda9b9995967ec468b832fe1b |