McLaren MR, Willis AD, Callahan BJ. 2019. Consistent and correctable bias in metagenomic sequencing experiments. eLife 8:46923. DOI: https://doi.org/10.7554/eLife.46923
This repository contains the code and data for reproducing the analysis in our manuscript. It is structured as an R package, as explained here. To reproduce our analysis, first install the manuscript version of the metacal R package
# install.packages("devtools")
devtools::install_github("mikemc/metacal@v0.1.0-manuscript")
Then, download this package from GitHub or by running
git clone https://github.com/mikemc/mgs-bias-manuscript
You can then knit
or run the R-markdown documents in analysis/
, which are
described below. These documents include code to load this package with
devtools::load_all()
, so you do not need to install this package itself.
Various other R packages are needed to run the code in the analysis/
documents; these are listed in the "Imports" field of the DESCRIPTION
file
and can be installed all at once with
devtools::install_deps("path/to/mgs-bias-manucript")
The scripts we used to download and/or generate the necessary sample metadata,
16S and metagenomic taxonomic profiles, and taxon information for our analyses
are in data-raw/
. This folder also contains scripts that clean the
data and save it as .rda
(R data) objects that can be loaded with the
data()
function once the R package is loaded; these objects serve as the
starting point for subsequent analyses. An explanation of how to use these
scripts is given in the directory's Readme file.
Analyses are contained in R-markdown documents in analysis/
.
Versions already rendered to html can be seen at