Skip to main content

ctdna computes the expected tumor detection size at a given sampling frequency.

Project description

build codecov PyPI Binder Downloads

ctDNA: Circulating tumor DNA

Python package (https://pypi.org/project/ctdna) to compute the shedding of a biomarker from cancer cells into the bloodstream and its analysis in liquid biopsies (small blood samples). The package can be run from the command line or various methods can be important for customized calculations. Multiple examples are provided below and can be executed within a browser from https://mybinder.org. Cite: Avanzini et al, A mathematical model of ctDNA shedding predicts tumor detection size, Science Advances 6:eabc4308 (2020), in press. For further technical details see the preprint Avanzini et al., bioRxiv (2020): https://doi.org/10.1101/2020.02.12.946228 Source code is available at https://github.com/reiterlab/ctdna.

Releases

Installation and Setup

Manual

ctdna can be run in the following modes:

  1. dynamics: simulates the evolutionary dynamics of a tumor and its biomarkers over time
  2. distribution: simulates the biomarker distribution at a given tumor size or tumor age
  3. detection: simulates the detection size of a growing tumor for repeated testing at a desired annual false positive rate or a specified p-value threshold
  4. roc: computes the ROC (receiver operating characteristic)

See <PACKAGE_DIRECTORY>/settings.py for default parameter values.

Examples

  • Use the interactive binder notebook at https://mybinder.org/v2/gh/reiterlab/ctdna/912b0958ef64d536185fdb2af33c71945db73287 to immediately try the package. Examples show how to calculate the probability to detect a specific actionable mutation in tumors with diameters of 1, 1.2, 1.5, and 2 cm with a specificity of 99% example.ipynb
  • Simulate tumor growth and ctDNA shedding dynamics of 10 cancers: ctdna dynamics -b 0.14 -d 0.13 -M 1e10 -n 10
  • Simulate ctDNA at a given tumor size for 100 subjects: ctdna distribution -b 0.14 -d 0.13 -n 100 -M 1e8 --q_d=1.4e-4
  • Simulate monthly relapse testing for previously simulated tumor growth and shedding dynamics: ctdna detection monthly -b 0.14 -d 0.13 -M 1e10 --panel_size 20 --n_muts 20 --annual_fpr 0.05 --seq_eff 0.5 --imaging_det_size 1e9
  • Simulate annual screening with CancerSEEK for previously simulated tumor growth and shedding dynamics: ctdna detection annually -b 0.14 -d 0.136 -M 1e11 --panel_size 2000 --n_muts 1 --annual_fpr 0.01 --seq_eff 0.5 --diagnosis_size 2.25e10
  • Simulate annual screening with CAPPSeq for previously simulated tumor growth and shedding dynamics: ctdna detection annually -b 0.14 -d 0.136 -M 1e11 --panel_size 300000 --n_muts 10 --pval_th 1.5e-7 --seq_eff 0.5 --diagnosis_size 2.25e10

Arguments

  • -b <> or --birth_rate <>: birth rate of cancer cells

  • -d <> or --death_rate <>: death rate of cancer cells

  • --q_d <>: ctDNA shedding probability per cell death

  • --q_b <>: ctDNA shedding probability per cell birth

  • --lambda1 <>: ctDNA shedding probability per cell per day

  • --t12_mins <>: cfDNA half-life time in minutes

  • --tube_size <>: size of blood sample tube (liters; default 0.015 l)

  • --panel_size <>: sequencing panel size

  • --seq_err <>: sequencing error rate per base-pair (default: 1e-5)

  • --seq_eff <>: sequencing efficiency, ie. fraction of the sampled molecules that are actually successfully sequenced (default: 0.5)

  • --n_muts <>: number of clonal mutations in the cancer that are covered by the sequencing panel

  • -M <> or --det_size <>: tumor detection size where biomarker level is evaluated or size where dynamics simulations are stopped

  • -T <> or --sim_time <>: simulations end when cancer reaches the given time

  • --exact_th <>: approximate growth of tumor after this given threshold is reached

  • -o <> or --output_dir <>: output directory for files (default is defined in <CTDNA_DIRECTORY>/ctdna/settings.py)

  • --biomarker_wt_freq_ml <> Optional argument to fix the wildtype haploid genome equivalents (hGE) per plasma ml to the given number instead of sampling the plasma DNA concentration from a Gamma distribution with parameters specified in <CTDNA_DIRECTORY>/ctdna/settings.py

Detection mode

  • --annual_fpr <>: Specifies desired annual false positive rate (1 - specificity) if test is repeated at the given frequency over a year
  • --pval_th <>: Instead of the desired annual false positive rate --annual_fpr, one can directly provide a p-value threshold that calls somatic point mutations in ctDNA

Authors: Stefano Avanzini & Johannes Reiter, Stanford University, https://reiterlab.stanford.edu

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

ctdna-0.1.2.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

ctdna-0.1.2-py3-none-any.whl (66.5 kB view details)

Uploaded Python 3

File details

Details for the file ctdna-0.1.2.tar.gz.

File metadata

  • Download URL: ctdna-0.1.2.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.6.12

File hashes

Hashes for ctdna-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1b997ad2534dd082a8a387e8feb7f3183033c40849b3a3f2613e5d8825b719b8
MD5 f7e3bae7082a8791ccec24152f0e9277
BLAKE2b-256 99ccdad0c172a17707ca886dc7d7d0b086b073d30af11f37e0b15b88eee97900

See more details on using hashes here.

File details

Details for the file ctdna-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ctdna-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 66.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.6.12

File hashes

Hashes for ctdna-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6fe5a25bc1515af6fb2af49a2d7eda98d210ef3c885fa2956f790d7209e3d309
MD5 bf9a64534def89f1b60dbdf540374451
BLAKE2b-256 e6ffa9c2c930c7c88699d028777bd2f6e0e9df3694f3bd5e5443fc956308eed5

See more details on using hashes here.

Supported by

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