Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 3.57 KB

README.md

File metadata and controls

41 lines (30 loc) · 3.57 KB

DOI License (for code): MIT License: CC0-1.0 License: CC-BY-4.0

Global patterns and correlates in the emergence of antimicrobial resistance in humans

Published at https://doi.org/10.1098/rspb.2023.1085

This repository is on Zenodo: https://doi.org/10.5281/zenodo.7051952

If referring to the study or methods, please cite the publication. If you re-use these data and/or code in a publication please be sure to cite the Zenodo reference, as well.

Authors: Emma Mendelsohn, Noam Ross , Carlos Zambrana-Torrelio, Thomas Van Boeckel, Ramanan Laxminarayan, Peter Daszak


Repository Structure

This repository contains code, data, and documentation used to model correlates of global antimicrobial resistance emergence events.

Reproducibility

This project was run with R version 4.2.1 (2022-06-23). This project uses the {renv} framework to record R package dependencies and versions. Packages and versions used are recorded in renv.lock and code used to manage dependencies is in renv/ and other files in the root project directory. On starting an R session in the working directory, run renv::restore() to install R package dependencies.

Code

  • 00-init-data.R compiles global data for the analysis. Outputs from this script are saved in data/, so it is not necessary to run this script to run the analysis in _drake.R.
    • AMR emergence data is from DOI 10.5281/zenodo.4924992
    • Data on potential correlates of AMR emergence come from multiple sources, documented within comments.
  • 00-get-promed-data.R generates an index of ProMED publications by country (to be used as an indicator for reporting bias within the study). Outputs from this script are saved in data/, so it is not necessary to run this script to run the analysis _drake.R.
  • _drake.R uses the drake package to run the analysis from the data compiled in above scripts. It uses static branching to evaluate multiple scenarios to test model robustness. Running the full script will trigger the drake plan to run (alternatively, sourcing Makefile within this repo will trigger a run). Individual targets within the plan can be loaded into environment using drake::loadd(target_name)
  • R/ contains functions used in the drake pipeline

Data

  • data/ contains all pre-processed data. All processed data is saved as country-level-amr.csv, which is used as the input to _drake.R.

Outputs

  • plots/ contains all figures generated by the analysis
  • doc/ contains .Rmd files with miscellaneous data queries