Skip to main content

chemoREsistance SIMulator

Project description

ReSim (chemoREsistance SIMulator) is a python package that simulates cancer chemoresistance dynamics based on a stochastic model. The model describes the interaction between chemotherapeutics and various cancer cell subpopulations (including sensitive, primary resistant, acquired resistant and quiescent cancer cells).

ReSim provides both GUI (powered by Flask <http://flask.pocoo.org>) and CUI.

Remarks: Simulation result is greatly depended on input params, therefore ReSim is intended to use in parallel with in vitro assay. Procedures or details in identifying input params in vitro is out of scope here and will be documented in elsewhere (hope to get it publish soon).

Dependencies

  • flask

  • Flask-WTF

  • numpy

  • scipy

  • pandas

  • matplotlib

  • seaborn

  • plotly

  • sdeint

Installation

We strongly recommend everyone to install resim within a virtual environment. Setup the venv as usual and run

$ pip install resim

Otherwise, install it locally.

Getting Start - GUI

Open your command prompt, simply run

$ resim-flask

ReSim is now available at http://localhost:5000/resim .

Note GUI provides a simplified & handy version of resim with interactive plotly plots. Please use CUI if you need more control of input params.

Advanced Usage

Using defaults params (calibrated from the case of sorafenib and liver cancer):

>>> import resim

>>> model = resim.Simulator()
>>> res = model.simulate()

>>> snsplt_cells = resim.plot_cells(res, subplot=True)
>>> snsplt_drug = resim.plot_drug(res)
>>> snsplt_fht = resim.plot_fht(res)

>>> snsplt_cells.figure.savefig('resim_cells.png')
>>> snsplt_drug.figure.savefig('resim_drug.png')
>>> snsplt_fht.figure.savefig('resim_fht.png')

You may set your own params. For examples, input the growth rate of sensitive cells and resistant cells determined in vitro:

>>> import resim

>>> model = resim.Simulator(gr=[0.2, 0.1, 0.1])
>>> res = model.simulate()

model.simulate() returns a dict of dictionary containing pd.DataFrame or np.array. To extract the result,:

>>>  df_cells = res['case']['cells']
>>>  df_drugs = res['case']['drugs']

>>> l_fht_control = res['control']['fht'])
>>> l_fht_treatment = res['case']['fht'])

Notes GUI outputs are generated by Plotly <https://plot.ly/>. But both plot_cells, plot_drug and plot_fht in CUI return seaborn <https://seaborn.pydata.org/> plot object. You may customize your own theme, title, layout.

Documentation

Available at https://resim.readthedocs.io/.

TODO

  • Add class methods for conventional first-line/second-line chemos in HCC, PC.

  • Add tool for converting tumor’s diameter/volume to number of cells.

  • Add tool for converting doubling time to growth rate.

  • Add tool for converting half-life to k.

  • Add command line module.

  • Integrate parallel programming sde solver module nsim <https://github.com/mattja/nsim> to speed up the computation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resim-0.1.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resim-0.1.1-py2-none-any.whl (22.1 kB view details)

Uploaded Python 2

File details

Details for the file resim-0.1.1.tar.gz.

File metadata

  • Download URL: resim-0.1.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for resim-0.1.1.tar.gz
Algorithm Hash digest
SHA256 64578f652b8fb74482c38e1caf0f2a01c20f6e3530dcc5493fc5f70e5a4576d1
MD5 125c988815936f6e6b3ff4bc8d87faa0
BLAKE2b-256 b371263f4fecee4f3dd2d55839f949b1b914687963c57aa8879b7f00cb8aa3cc

See more details on using hashes here.

File details

Details for the file resim-0.1.1-py2-none-any.whl.

File metadata

File hashes

Hashes for resim-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 e36c679d1e0d6cf4ec2ddf9695eb3d59b14ef71a3255c2800f70406fda5f0a19
MD5 41ae123eb75737395bd7de1ac60b6c20
BLAKE2b-256 7ab07254f4116d49ff649ccc468de28f1f753716c2ee09bd3d3b471d26023159

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page