DOI

The blantyreESBL R package is a repository for data generated as part of a study into carriage of resistant bacteria in Blantyre, Malawi. It also includes reproducible analysis script for three manuscripts arising from the study:

Colonization dynamics of extended-spectrum beta-lactamase-producing Enterobacterales in the gut of Malawian adults

Joseph M Lewis1,2,3,4, , Madalitso Mphasa1, Rachel Banda1, Matthew Beale4, Eva Heinz2, Jane Mallewa5, Christopher Jewell6, Nicholas R Thomson4,7, Nicholas A Feasey1,2

Paper available at Nature Microbiology here

Genomic analysis of extended-spectrum beta-lactamase (ESBL) producing Escherichia coli colonising adults in Blantyre, Malawi reveals previously undescribed diversity

Joseph M Lewis1,2,3,4, , Madalitso Mphasa1, Rachel Banda1, Matthew Beale4, Jane Mallewa5, Catherine Anscombe1,2, Allan Zuza1, Adam P Roberts2, Eva Heinz2, Nicholas Thomson4,7, Nicholas A Feasey*1,2

  • = contributed equally

Paper available at Microbial Genomics here

Genomic and antigenic diversity of colonising Klebsiella pneumoniae isolates mirrors that of invasive isolates in Blantyre, Malawi

Joseph M Lewis1,2,3,4, , Madalitso Mphasa1, Rachel Banda1, Matthew Beale4, Jane Mallewa5, Eva Heinz2, Nicholas Thomson4,7, Nicholas A Feasey1,2

Available at Microbial Genomics here

Installing and accessing data

If you just want the data, then all the data to replicate the analysis are bundled with the package. To install the package from GitHub:

install.packages("devtools")
devtools::install_github("https://github.com/joelewis101/blantyreESBL")

The various data objects are described in the pkgdown site for this package here, and available via R in the usual way (i.e. ?btESBL_participants brings up the definitions for the btESBL_participants data. They are all lazy loaded so will be available for use immediately; they all start with btESBL_ to make it easy to choose the one you want using autocomplete.

Whole genome sequence accession numbers and metadata

Reads from all isolates sequenced as part of this study have been depositied in the European Nucleotide Archive (ENA); accession numbers are available in the btESBL_sequence_sample_metadata data frame, available on installing the package as above.

Analysis scripts

The analysis scripts to reproduce tables and figures for each manuscript are available as package vignettes; these can be built when downloading the package by running:

devtools::install_github(
  "https://github.com/joelewis101/blantyreESBL", 
  build_vignettes = TRUE, 
  dependencies = TRUE )

The dependencies = TRUE option will install all the packages necessary to run the vignette. Building the vignettes may take some time - you have been warned!

Alternatively the source code for the vignettes are analysis.Rmd analysis-ecoli.Rmd and analysis-kleb.Rmdin the vignettes/ folder of the GitHub repo or the pkgdown site for this package has a rendered version of each vignette.

Running Stan models

The longitudinal modelling paper uses models fit with Stan, the probabilistic programming language, via the rstan R package. Unlike the rest if the vignettes (which run the analysis as they are built) the Stan models are not fit as part of the package vignettes as they take a long time to fit. The outputs of the models are available as data objects and a vignette provides instructions on how to fit and simulate from the posterior. The Stan code is available as .stan files in the package directory - see vignette for how to locate it.

Author affiliations

  1. Malawi Liverpool Wellcome Research Programme, Blantyre, Malawi
  2. Liverpool School of Tropical Medicine, Liverpool, UK
  3. University of Liverpool, Liverpool, UK
  4. Wellcome Sanger Institute, Hinxton, UK
  5. Kamuzu University of Health Sciences, Malawi
  6. University of Lancaster, Lancaster, UK
  7. London School of Tropical Medicine and Hygiene, London, UK