tumorevo
Simulate tumor evolution under different spatial constraints. This package aims to be as awesome as demon.
tumorevo simulates tumor growth and and produces a Muller plot, a cartoon of the 2D spatial organization of the tumor cells, and a clone tree.
Installation
$ pip install tumorevo
Usage
tumorevo contains two command line utilities: tumorsim and tumorfig.
Simulating tumor evolution
tumorsim can be used to simulate the evolution of a tumor according to a specified spatial structure.
$ tumorsim --mode 1 --steps 2000 --genes 20 --carrying-capacity 5 --grid-size 20 --division-rate 0.2 --dispersal-rate 0.1
100%|████████████████████| 1999/1999 [00:07<00:00, 251.69it/s]
This will create a folder containing:
parents.csv: file indicating each clones's parent;trace_counts.csv: file indicating the number of cells of each clone at each time step;genotypes.csv: file containing the genotypes of each clone;grid.csv: file containing the regular grid of genotypes ifmode> 0.
Full overview:
$ tumorsim --help
Usage: tumorsim [OPTIONS]
Simulate tumor evolution under different spatial constraints.
Options:
-m, --mode INTEGER Spatial structure.
-k, --carrying-capacity INTEGER
Deme carrying capacity.
-g, --genes INTEGER Number of genes.
-s, --steps INTEGER Number of steps in simulation.
--grid-size INTEGER Grid size.
--division-rate FLOAT Divison rate.
--mutation-rate FLOAT Mutation rate.
--dispersal-rate FLOAT Dispersal rate.
-r, --random_seed INTEGER Random seed for the pseudo random number
generator.
--log INTEGER Logging level. 0 for no logging, 1 for info,
2 for debug.
-o, --output-path TEXT Output directory
--help Show this message and exit.
Plotting tumor evolution
tumorfig can be used to create a Muller plot of the tumor's evolution, the 2D spatial organization of the tumor cells, and a clone tree.
$ tumorfig out/trace_counts.csv out/parents.csv --plot --grid-file out/grid.csv --normalize --remove
This will open a figure like this:
Full overview:
$ tumorfig --help
Usage: tumorfig [OPTIONS] GENOTYPE_COUNTS GENOTYPE_PARENTS
Plot the evolution of a tumor.
Options:
-c, --cells INTEGER Number of cells in slice plot.
-r, --average-radius INTEGER Average radius of circles in slice plot.
--grid-file TEXT Path to grid file.
--colormap TEXT Colormap for genotypes.
--dpi INTEGER DPI for figures.
--plot Plot all the figures.
--do-muller Make a Muller plot.
--do-slice Make a slice plot.
--do-tree Make a clone tree plot.
--normalize Normalize the abundances in the Muller plot.
--labels Annotate the clone tree plot.
--remove Remove empty clones in the clone tree plot.
-o, --output-path TEXT Directory to write figures into.
--help Show this message and exit.
Metadata
Release files for tumorevo 0.0.1
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 |
|---|---|---|---|---|
| tumorevo-0.0.1.tar.gz | 11.5 kB | Without provenance | Details for tumorevo-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tumorevo-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for tumorevo-0.0.1-py3-none-any.whl |
Total release size: 24.4 kB
Release files / tumorevo-0.0.1.tar.gz
| Download URL | tumorevo-0.0.1.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aba6995c7e77fd70c2d99c3a3d98965163a0aa903a95e64c2bc371d7f60273d6
|
|
BLAKE2b-256 checksum How to use checksums |
ed70eebbb83ad4413df0eb4818ce2c346fa4bb1a0671bcda6316b76b306cc8f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / tumorevo-0.0.1-py3-none-any.whl
| Download URL | tumorevo-0.0.1-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15d2fee1dabe1be1147478dbce2468650095f5739431dce8f4f1f29ec4b9a41b
|
|
BLAKE2b-256 checksum How to use checksums |
a43322b9d8df704599daf942a8625a815accde1ae3db92d088d23e885ebbe33e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for tumorevo 0.0.1
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.