Simble is a simulation tool for B cell receptor (BCR) somatic hypermutation (SHM) and affinity maturation. Simble models B cells in the germinal center and their differentiation and migration to other tissues.
Project description
simble
simble is a BCR evolution simulator. It starts with a naive heavy and light chain pair, and models evolution and selection in the germinal center as well as migration out of germinal center. simble also has customizable sampling.
:globe_with_meridians: simble website
To cite the SimBLE package in publications, please use:
Fielding J, Wu S, Melton H, Du Plessis L, Fisk N, Hoehn K (2025). "TyCHE enables time-resolved lineage tracing of heterogeneously-evolving populations." bioRxiv 2025.10.21.683591 doi:10.1101/2025.10.21.683591 https://doi.org/10.1101/2025.10.21.683591
Documentation
For full, up-to-date documentation, information, and tutorials, please visit simble.readthedocs.io.
Installing simble
Clone this repo and install from local files:
# clone the repo however you like, eg
git clone https://github.com/hoehnlab/simble
# in the repo directory, install simble from local files
pip install .
# run
python3 -m simble -flags
# or
simble -flags
Quick Start
[!NOTE] The default simulation runs with selection, with no migration, sampling every 25 generations for 200 generations.
To specify an output folder for default simulation:
simble -o <path-to-folder>
To run a neutral-selection BCR simulation (using naive BCRs, heavy and light chains, and S5F mutation/substitution model):
simble --neutral [other args]
To run a uniformly neutral simulation (no selection, randomly generated starting nucleotide sequence, and uniform mutations/substitutions):
simble --uniform [other args]
To run a uniformly neutral simulation with a specified sequence length of 100:
simble --uniform --sequence-length 100 [other args]
To run with expected migration of one cell every 25 generations:
simble --migration-rate 0.04 [other args]
To run 5 clones in parallel across 2 processes, with expected migration of one cell every 10 generations with selection, and sampling every 10 generations for 100 generations:
simble -o ./current-results -n 5 --processes 2 --migration-rate 0.1 --samples 0 100 10
which is equivalent to
simble -o ./current-results -n 5 -p 2 --migration-rate 0.1 -s 0 100 10
[!TIP] Flags can be provided any order.
Frequently used arguments:
| argument | abbr | default | description |
|---|---|---|---|
| --output | -o | cwd/results | folder for results |
| --number | -n | 1 | number of clones to simulate |
| --processes | -p | 1 | number of processes (multiprocessing) |
| --neutral | if provided, runs a neutral simulation | ||
| --uniform | if provided, runs a uniform neutral simulation | ||
| --migration-rate | 0 | expected number of cells that leave the germinal center each generation | |
| --samples | -s | [0 200 25] | start, stop, step, to specify sample times other than the default |
| --quiet | -q | don't display progress bar |
Development
Clone the repo and install necessary packages, which can be found in pyproject.toml:
# clone the repo however you like, eg
git clone https://github.com/hoehnlab/simble
# install requirements, up to date requirements can be found in pyproject.toml
pip install <requirement>
# run
python3 -m simble -flags
All arguments
Available arguments:
| argument | abbr | default | description |
|---|---|---|---|
| Frequently used | |||
| --output | -o | cwd/results | folder for results |
| --number | -n | 1 | number of clones to simulate |
| --processes | -p | 1 | number of processes (multiprocessing) |
| --neutral | if provided, runs a neutral simulation | ||
| --uniform | if provided, runs a uniform neutral simulation | ||
| --migration-rate | 0 | expected number of cells that leave the germinal center each generation | |
| --samples | -s | [0 200 25] | start, stop, step, to specify sample times for germinal center |
| Sampling | |||
| --other-samples | GC sample times | start, stop, step, to specify "Other" location sample times | |
| --sample-size | 50 | specify sample size for 'GC' location | |
| --sample-size-other | 12 | specify sample size for the 'Other' location | |
| Model parameters | |||
| --sequence-length | 370 | length of the sequence to simulate if uniform | |
| --antigen | -a | 1000 | amount of antigen |
| --heavy-shm | 0.0008908272571108565 | expected number of heavy chain mutations each division per site | |
| --light-shm | 0.0004923076923076923 | expected number of light chain mutations each division per site | |
| --target-mutations-heavy | 5 | number of amino acid mutations the target heavy chain should have | |
| --target-mutations-light | 2 | number of amino acid mutations the target light chain should have | |
| --cdr-dist | cdr distribution (constant or exponential) | ||
| --cdr-var | cdr variable | ||
| --fwr-dist | fwr distribution (constant or exponential) | ||
| --fwr-var | fwr variable | ||
| --multiplier | -m | 2 | selection multiplier |
| Program settings | |||
| --quiet | -q | if present, progress bar suppressed | |
| --verbose | -v | if present, verbose information provided | |
| --fasta | if present, also write a fasta file | ||
| --config | path to a config file (still in development) | ||
| --dev | if present, run in dev mode (not recommended) | ||
| --seed | an RNG seed to reproduce specific simulations | ||
Thank you for using simble!
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 simble-0.0.3.tar.gz.
File metadata
- Download URL: simble-0.0.3.tar.gz
- Upload date:
- Size: 11.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4caed1f6176e4a6620d01ab8a339c1d4c4ef69f2309cedc7b1d1070cc5ecdf91
|
|
| MD5 |
2d7ca65f2beb94c3cf98ecad24e0a68f
|
|
| BLAKE2b-256 |
787942f451d2b2ad77a6008d8cae0b68f5a20350220b360b1d6d0c4c656ced0e
|
File details
Details for the file simble-0.0.3-py3-none-any.whl.
File metadata
- Download URL: simble-0.0.3-py3-none-any.whl
- Upload date:
- Size: 12.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92c720b70ffaafe8773e5b50c64b5f78e5f43c137471805c87fa7048d00f8320
|
|
| MD5 |
0f5ddd61333a41530ff3e769be721cb3
|
|
| BLAKE2b-256 |
6ff81ebd06b39b2b424d09de32deffbaf3a577d255b0af318eec5d43a1814283
|