Published May 31, 2023 | Version v2.0.0
Software Open

Understanding and leveraging phenotypic plasticity during metastasis formation - Code

  • 1. Department of Evolutionary Theory, Max Planck Institute for Evolutionary Biology, Ploen, August-Thienemann-Str. 2, 24306 Ploen
  • 2. Institute for Experimental Cancer Research, Kiel University and University Hospital Schleswig-Holstein, Campus Kiel, Arnold-Heller-Str. 3, Building U30, Entrance 1, 24105 Kiel

Description

This repo contains the code from the manuscript "Understanding and leveraging phenotypic plasticity during metastasis formation" by Shah et al. See the `README.md` for installation and usage.

 

# Modeling phenotypic plasticity

 

This README explains the simulations for the manuscript "Understanding and leveraging phenotypic plasticity during metastasis formation". The dataset can be found [here](https://doi.org/10.5281/zenodo.7989753).

 

Authors: Saumil Shah, Lisa-Marie Philipp, Stefano, Giaimo, Susanne Sebens, Arne Traulsen, Michael Raatz

 

## Table of Contents

 

- [Installation](#installation)

- [Usage](#usage)

- [Support](#support)

- [Contributing](#contributing)

- [License](#license)

 

## Installation

This project runs on python 3. One can obtain a python from the [official website](#https://www.python.org/downloads/) or [`conda`](https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html#anaconda-or-miniconda), a popular distribution suitable for science. We recommend a more robust alternative for `conda`, [`mamba`](https://mamba.readthedocs.io/en/latest/installation.html).

 

Please make sure you have the following python packages installed:

- `numpy`

- `scipy`

- `matplotlib`

 

For `mamba`, run the following in terminal `mamba install numpy scipy matplotlib`.

 

This project assumes the following directory structure and all the scripts read/write accordingly. All the python scripts, with the extension `.py`, go into the `code` folder.

```sh

.

├── code

├── data

│ ├── base

│ ├── ext1

│ └── ext2

└── figures

├── base

├── ext1

└── ext2

```

 

## Usage

### description

The script `draft.py`, provided here, allows reproducing all the figures in the main text and supplementary using simulation data found [here](https://doi.org/10.5281/zenodo.7989753). The script `utility.py` has an implementation of the model and a definition of all the model parameters, allowing independent exploration of the model. Some useful functions for plotting are defined in `plotting.py`. The `fig_*.py` scripts contain functions to plot figures in the [manuscript](https://www.biorxiv.org/content/10.1101/2022.11.07.515430v2). Script `draft.py` is a script that calls functions from `fig_*.py` scripts.

 

### saving plots

To save the plots, change `show` to `False`; in `draft.py`, this is a global variable at the beginning; in functions from `fig_*.py`, this is a keyword argument of the functions. **THIS WILL OVERWRITE EXISTING FIGURES**.

 

### computing new data

When parameters or the model is changed in `utility.py`, the data must be re-computed. Change `compute` to `True`; in `draft.py`, this is a global variable at the beginning; in functions from `fig_*.py`, this is a keyword argument of the functions. **THIS WILL OVERWRITE EXISTING DATA**.

 

### runtime

On a machine with the following specifications, it takes about ~2 mins to generate all the data and save all the figures.

```

Model Name: MacBook Air

Model Identifier: MacBookAir10,1

Chip: Apple M1

Number of Cores: 8 (4 performance and 4 efficiency)

Memory: 16 GB

System Version: macOS 12.6 (21G115)

Kernel Version: Darwin 21.6.0

```

 

## Support

Please email `shah{at}evolbio.mpg.de` for support.

 

## Contributing

Please email `shah{at}evolbio.mpg.de` for major contributions.

 

## License

MIT License

Copyright (c) 2023 Saumil Shah

Notes

All authors acknowledge funding by Deutsche Forschungsgemeinschaft through the Research Training Group "Translational Evolutionary Research" (TransEvo) (Project number 400993799, https:// gepris.dfg.de/gepris/projekt/400993799) and funding by the Deutsche Krebshilfe (AZ 70112935) to Susanne Sebens.

Files

LICENSE.txt

Files (1.3 MB)

Name Size Download all
md5:3b96370f431c76073ce05e9684a8936d
51 Bytes Download
md5:07f77651b994ad7613fa241be0d16897
6.3 kB Download
md5:5d41603ff5851cf4c3c7443ed46699fe
26.8 kB Download
md5:083465c22fd2278c87439e988fa34513
11.8 kB Download
md5:a1e7c580280e6f94ab73d65d0c9163a2
1.1 kB Preview Download
md5:6f096a3a2ad7f54e8b85a20a0a4acc86
1.2 MB Download
md5:b4d13e797e15ac1dbca45b6101b7ebcf
8.7 kB Download
md5:460415402e2f41f976997ff43232a4a9
3.2 kB Preview Download
md5:ce30db13776c1cc6a41259b2b2f2c348
9.9 kB Download

Additional details

Related works

Compiles
Dataset: 10.5281/zenodo.7989753 (DOI)
Is supplement to
Preprint: 10.1101/2022.11.07.515430 (DOI)