SimSpace: a comprehensive in-silico spatial omics data simulation framework
Project description
SimSpace
SimSpace is a Python framework for simulating spatial omics data with realistic cellular distributions and tissue organization. Designed for benchmarking spatial analysis methods, SimSpace enables generation of synthetic datasets that preserve spatial autocorrelation, cell-cell interactions, and reference-based spatial layouts using a Markov Random Field (MRF) model.
📦 Installation
To install the latest version of SimSpace, we recommend using conda to setup the environment:
git clone https://github.com/TianxiaoNYU/simspace.git
cd simspace
conda env create -f environment.yml
conda activate simspace
pip install -e .
🧬 Setting up the R environment
To reproduce the R environment required for SimSpace omics simulation:
- Make sure you have R (version 4.4 or compatible) installed.
- From the project folder:
cd simspace/R
Rscript -e 'install.packages("renv"); renv::restore()'
🚀 Quick Start
Here’s a basic example to simulate a 2D tissue with 4 cell types:
from simspace import util, spatial
# Define simulation parameters
params = util.generate_random_parameters(
n_group=3,
n_state=8,
seed=42)
# Run simulation
sim = util.sim_from_params(
params,
shape=(50, 50),
num_iteration=4,
n_iter=6,
custom_neighbor=spatial.generate_offsets(3, 'manhattan'),
seed=42
)
# Visualize
sim.plot()
🙋♀️ About
Developed by Tianxiao Zhao at NYU Grossman School of Medicine. Should you have any questions, please contact Tianxiao Zhao at Tianxiao.Zhao@nyulangone.org
🔗 References
If you use SimSpace in your work, please cite:
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simspace-0.1.0.tar.gz.
File metadata
- Download URL: simspace-0.1.0.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
780ec91460b1a86629c13ef4f7839186860ccb177c01daa181df9e46544b5767
|
|
| MD5 |
4140d897a60d6cd2630438004e67da01
|
|
| BLAKE2b-256 |
cba5192598421bb3b637eaa2e5112bb0f96fb5015e494d1835d4018b88365ec5
|
File details
Details for the file simspace-0.1.0-py3-none-any.whl.
File metadata
- Download URL: simspace-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
194c96c28deea86631f01b513c05eedb93508c30588d0accbb1b6840254e921c
|
|
| MD5 |
5e973de740c0ca49efc6d8e808bd8d82
|
|
| BLAKE2b-256 |
43d7fe595f83eed4ad4e5655504ea681154639b1702e311f3c5cc5eb359042aa
|