Software Open Access

Analysis Code: Digital contact tracing contributes little to COVID-19 outbreak containment

Burdinski, Angelique; Brockmann, Dirk; Maier, Benjamin F


JSON Export

{
  "files": [
    {
      "links": {
        "self": "https://zenodo.org/api/files/ba903140-035c-4b32-a300-d3108e637350/DigCT.zip"
      }, 
      "checksum": "md5:4ef7db9e5d5f838e2957613dc9aa58a2", 
      "bucket": "ba903140-035c-4b32-a300-d3108e637350", 
      "key": "DigCT.zip", 
      "type": "zip", 
      "size": 80194533
    }
  ], 
  "owners": [
    76653
  ], 
  "doi": "10.5281/zenodo.5093607", 
  "stats": {
    "version_unique_downloads": 2.0, 
    "unique_views": 226.0, 
    "views": 230.0, 
    "version_views": 239.0, 
    "unique_downloads": 2.0, 
    "version_unique_views": 230.0, 
    "volume": 160389066.0, 
    "version_downloads": 2.0, 
    "downloads": 2.0, 
    "version_volume": 160389066.0
  }, 
  "links": {
    "doi": "https://doi.org/10.5281/zenodo.5093607", 
    "conceptdoi": "https://doi.org/10.5281/zenodo.5093499", 
    "bucket": "https://zenodo.org/api/files/ba903140-035c-4b32-a300-d3108e637350", 
    "conceptbadge": "https://zenodo.org/badge/doi/10.5281/zenodo.5093499.svg", 
    "html": "https://zenodo.org/record/5093607", 
    "latest_html": "https://zenodo.org/record/5093607", 
    "badge": "https://zenodo.org/badge/doi/10.5281/zenodo.5093607.svg", 
    "latest": "https://zenodo.org/api/records/5093607"
  }, 
  "conceptdoi": "10.5281/zenodo.5093499", 
  "created": "2021-07-12T20:10:31.929065+00:00", 
  "updated": "2021-07-13T01:48:27.316724+00:00", 
  "conceptrecid": "5093499", 
  "revision": 3, 
  "id": 5093607, 
  "metadata": {
    "access_right_category": "success", 
    "doi": "10.5281/zenodo.5093607", 
    "description": "<p># Digital Contact Tracing</p>\n\n<p>This package provides the simulation, analysis, and figure code for<br>\nthe manuscript &quot;Digital contact tracing contributes little to COVID-19<br>\noutbreak containment&quot; by A. Burdinski, D. Brockmann, and B. F. Maier.</p>\n\n<p>## Prerequisites</p>\n\n<p>The analysis code was used and tested for Python 3.8 on CentOS 6.10, Ubuntui 18.04, and macOS 11.3.<br>\nIn order to run code in this collection, first install the requirements:</p>\n\n<p>```bash<br>\npip install -r requirements.txt<br>\n```</p>\n\n<p>The requirements read</p>\n\n<p>```<br>\nepipack==0.1.5<br>\nbfmplot==0.0.10<br>\nnetworkx==2.4<br>\nqsuite==0.4.14<br>\nsmallworld==0.1.0<br>\nsimplejson==3.17.2<br>\nrich==9.5.1<br>\ntqdm==4.61.2<br>\n```</p>\n\n<p>Models are implemented using [epipack](github.com/benmaier/epipack). To run<br>\nlarge-scale simulations, we use [qsuite](github.com/benmaier/qsuite), a CLI<br>\nto facilitate simulations on HPC clusters. `qsuite` will be installed when<br>\ndependencies are installed from `requirements.txt`.</p>\n\n<p>In order to have the simulations run faster, consider installing<br>\n[SamplableSet](https://github.com/gstonge/SamplableSet).</p>\n\n<p>The installation process will take a few seconds.</p>\n\n<p>## Main model</p>\n\n<p>The main model, including an example configuration,<br>\ncan be found in directory `main_model/`.</p>\n\n<p>### Example&nbsp;</p>\n\n<p>To run the simulation, do</p>\n\n<p>```bash<br>\ncd main_model/<br>\npython example.py<br>\n```</p>\n\n<p>In this example, 200 simulations are run, each on a<br>\ndistinctly sampled Erdos-Renyi network of `N = 10,000` nodes<br>\nwith mean degree `k = 20`,<br>\n100 simulations on networks with a 30% app participation rate,<br>\nand 100 simulations on networks with no tracing app.</p>\n\n<p>The code is expected to run for about 10 minutes on a &quot;regular&quot;<br>\ndesktop PC (tested on a 2020 Macbook Pro and a small 8-core webserver).&nbsp;</p>\n\n<p>This is the expected output (see `main_model/example.png`).</p>\n\n<p>![Example](main_model/example.png)</p>\n\n<p><br>\n### Usage</p>\n\n<p>Change directory as `cd main_model`. Import simulation code as</p>\n\n<p>```python<br>\nfrom simulation import simulation code<br>\n```</p>\n\n<p>Then, set the model parameters</p>\n\n<p>```python</p>\n\n<p>N = 10_000 # number of nodes</p>\n\n<p>model_parameters = dict(<br>\n&nbsp; &nbsp; N = N,<br>\n&nbsp; &nbsp; q = 0.3, # probability to identify&amp;quarantine a symptomatic individual<br>\n&nbsp; &nbsp; a = 0.3, # participation rate<br>\n&nbsp; &nbsp; R0 = 2.5,&nbsp;<br>\n&nbsp; &nbsp; quarantiningS = True, # wether or not susceptible contacts are traced and isolated<br>\n&nbsp; &nbsp; parameter = {<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;chi&#39;:1/2.5, # delay between test and tracing trigger<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;recovery_rate&#39; : 1/7, # 1/(symptomatic infectious period)<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;alpha&#39; : 1/3, # latent period<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;beta&#39; : 1/2, &nbsp;# presymptomatic infectious period<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;number_of_contacts&#39; : 20,<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;x&#39;:0.17, # portion of asymptomatic infectious<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;I_0&#39; : N*0.01, # initial prevalence<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;omega&#39;:1/10, # 1/(average isolation period of susceptibles)<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;y&quot; : 0.1, # ratio of people that induce next-generation tracing<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;z&quot;: 0.64, # ratio of people sharing their test result<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;R0&quot;: 2.5,<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;network_model&quot;:&#39;er_network&#39;, # choose between<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # - er_network<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # - confignetwork<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # - exp_sw_network<br>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # - swnetwork<br>\n&nbsp; &nbsp; &nbsp; &nbsp; },<br>\n&nbsp; &nbsp; sampling_dt = 1, # sample simulation every day<br>\n&nbsp; &nbsp; time = 1e7, &nbsp; &nbsp; &nbsp;# maximum simulation time<br>\n&nbsp; &nbsp; )<br>\n```</p>\n\n<p>Obtain simulation timeseries by calling the simulation code as&nbsp;</p>\n\n<p>```python<br>\nt, result = simulation_code(model_parameters)</p>\n\n<p>import matplotlib.pyplot as plt</p>\n\n<p>plt.(t, result[&#39;S&#39;]+result[&#39;Sa&#39;])</p>\n\n<p>print(result.keys())<br>\n```</p>\n\n<p>## Manuscript analyses&nbsp;</p>\n\n<p>Almost all simulations and analyses performed in the paper<br>\ncan be found in `analysis_collection/tracing_sim/`.</p>\n\n<p>All extracted (summarized) data can be found in<br>\n`analysis_collection/data_new.json`.</p>\n\n<p>Code to produce the figures in the main text from distilled analysis<br>\nresults and analyses for the locally clustered network with<br>\nexponential degree distribution can be found in<br>\n`figures_main_text_and_new_network_model/`.</p>\n\n<p>Code for plots in the SI can be found in<br>\n`analysis_collection/tools.py` except for Fig. S7-S8 -- those can<br>\nbe found in the respective directories&nbsp;<br>\n`analysis_collection/tracing_sim/results_deleting_edges_*`<br>\nand `analysis_collection/tracing_sim/results_toy_model/`.</p>\n\n<p>In order to replicate the simulations, change to the directory containing the<br>\nrespective analysis and run `qsuite local`, e.g.&nbsp;</p>\n\n<p>```bash<br>\ncd analysis_collection/tracing_sim/results_exponential_DF_NMEAS_100_ONLYSAVETIME_False/<br>\nqsuite local<br>\n```</p>\n\n<p>An illustration to justify the choice of `beta = 10^(-6)` for the small-world long-range<br>\nredistribution parameter can be found by running<br>\n`analysis_collection/small_world_parameter.py`.<br>\n&nbsp;</p>", 
    "license": {
      "id": "MIT"
    }, 
    "title": "Analysis Code: Digital contact tracing contributes little to COVID-19 outbreak containment", 
    "relations": {
      "version": [
        {
          "count": 2, 
          "index": 1, 
          "parent": {
            "pid_type": "recid", 
            "pid_value": "5093499"
          }, 
          "is_last": true, 
          "last_child": {
            "pid_type": "recid", 
            "pid_value": "5093607"
          }
        }
      ]
    }, 
    "version": "1.1", 
    "communities": [
      {
        "id": "covid-19"
      }
    ], 
    "publication_date": "2021-07-12", 
    "creators": [
      {
        "orcid": "0000-0002-9305-1493", 
        "affiliation": "Humboldt Universit\u00e4t zu Berlin", 
        "name": "Burdinski, Angelique"
      }, 
      {
        "orcid": "0000-0001-5708-2922", 
        "affiliation": "Humboldt Universit\u00e4t zu Berlin", 
        "name": "Brockmann, Dirk"
      }, 
      {
        "orcid": "0000-0001-7414-8823", 
        "affiliation": "Humboldt Universit\u00e4t zu Berlin", 
        "name": "Maier, Benjamin F"
      }
    ], 
    "access_right": "open", 
    "resource_type": {
      "type": "software", 
      "title": "Software"
    }, 
    "related_identifiers": [
      {
        "scheme": "doi", 
        "identifier": "10.5281/zenodo.5093499", 
        "relation": "isVersionOf"
      }
    ]
  }
}
239
2
views
downloads
All versions This version
Views 239230
Downloads 22
Data volume 160.4 MB160.4 MB
Unique views 230226
Unique downloads 22

Share

Cite as