Skip to content
Analysis for McLaren, Willis, and Callahan (2019)
R Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Data and analysis for McLaren, Willis, and Callahan (2019)

McLaren MR, Willis AD, Callahan BJ. 2019. Consistent and correctable bias in metagenomic sequencing experiments. eLife 8:46923. DOI:

This repository

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")

Then, download this package from GitHub or by running

git clone

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



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

You can’t perform that action at this time.