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:
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
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
Paper available at Microbial Genomics here
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
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.
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.
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.Rmd
in the vignettes/
folder of the GitHub repo or the pkgdown site for this package has a rendered version of each vignette.
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.