Albis: simulation of multi-resolution and multi-dimensional spatial transcriptomics data
Albis is a Python package for simulating spatial-transcriptomics data at cell, bin, and spot resolutions. It builds a three-dimensional tissue model, generates gene-expression counts and transcript locations, and aggregates them into observations across tissue sections.
The resulting datasets include spatial coordinates and known simulation
ground truth, making them useful for developing and evaluating methods
such as spatial clustering, cell-type composition estimation,
and slice alignment. Outputs are returned as
AnnData objects for use in Python analysis
workflows and can be saved as .h5ad files.
Features
- Multiple resolutions: generate cell-level observations, regular bins, or spatial spots with configurable sizes and spacing.
- Multiple sectioning directions: slice a 3D tissue model along the X, Y, or Z axis, retaining both 2D and 3D spatial coordinates.
- Configurable tissue composition: control spatial domains, cell types, and cell-type mixtures within domains.
- Technical variation: introduce slice-specific batch effects and coordinate rotations and translations for alignment experiments.
- Ground-truth annotations: retain domain and cell-type labels and composition information for evaluating downstream analyses.
- Reproducible workflows: set random seeds, inspect simulation summaries, and visualize results with built-in plotting functions.
The current simulator uses spherical tissue geometry with a central domain and surrounding wedge-shaped domains. See the GitHub documentation for the supported parameters and their interpretation.
Installation
pip install albis
Requires Python 3.10 or newer. Plotting dependencies are included in the standard installation.
Quick start
Generate a small example, inspect it, plot its spatial domains, and save it:
import albis as ab
adata = ab.example_data(seed=2025)
print(ab.describe(adata))
figure = ab.plot(adata, view="2d", color="domain_true", slice_id=1)
figure.savefig("albis_example.png", dpi=150, bbox_inches="tight")
ab.save(adata, "albis_example.h5ad")
Use ab.generate_data() to configure a simulation, including its output
resolution ("cell", "bin", or "spot"), sectioning axis, number of
slices, and tissue composition. Lower-level functions provide access to
the tissue-generation and sectioning steps.
Documentation and tutorials
Full documentation and worked examples are maintained on GitHub:
- Overview and API guide
- Tutorial notebooks
- Low-level simulator documentation
- Source code and issue tracker
License
Albis is distributed under the MIT license.
Metadata
Release files for albis 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| albis-0.1.2.tar.gz | 31.9 kB | Without provenance | Details for albis-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| albis-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for albis-0.1.2-py3-none-any.whl |
Total release size: 60.4 kB
Release files / albis-0.1.2.tar.gz
| Download URL | albis-0.1.2.tar.gz |
|---|---|
| Size | 31.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b93ba75f05bb96ac44d5ffdb54720afe35654f5fe54ec83bb9da05b865e06d2
|
|
BLAKE2b-256 checksum How to use checksums |
a881717166bf2b9d229f888c3a60747ab602b0b15a5acf7d37a7b8a85dc8be82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.9
|
Release files / albis-0.1.2-py3-none-any.whl
| Download URL | albis-0.1.2-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4918f441da20a4c57f6331752d49afab4dfc90af79b7fc9a31280f61b5b32264
|
|
BLAKE2b-256 checksum How to use checksums |
8f4f920acda37dcc3a3e065f38c12a3ce511d4481c55ec454441a1fe6451e03d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.9
|
Security for albis 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.