These scripts must be run first, and in the given order, to create the files
results/metadata-clean.csv
, results/hiranonis-and-scindens.csv
, and
results/ps.Rds
, which form the starting points for the statistical analysis.
This script cleans the sample metadata in data/Metadata_2.13.2019.xlsx
and
saves the cleaned version in results/metadata-clean.csv
and
results/metadata-clean.Rds
; the latter includes formatting of some variables
as factors.
Rendered version: 00-sample-data.html
This script runs the DADA2 pipeline to analyze the 16S sequence data and create
an ASV-sequence count table (results/dada2/seqtab.Rds
) and a taxonomy table
(results/dada2/taxa.Rds
).
This script imports the DADA2 results into a phyloseq object. It adds some additional columns to the sample data based on the sequence table that are used in our downstream analysis.
This script 1) inspects the fraction of ASVs and reads with assigned taxonomy
at various taxonomic levels; 2) inspects ASVs identified as C. difficile in the
DADA2 species-assignment step; 3) uses BLAST to identify ASVs as C. hiranonis
and C. scindens, which were not identified in the initial species assignment.
The results are saved in results/hiranonis-and-scindens.csv
and added to the
taxonomy table in the phyloseq object.
Rendered version: 03-taxonomy.html
This script analyses patterns of alpha and beta diversity across animal host types, and between C. difficile positive and negative samples within an animal host type. Alpha and beta diversities were computed with C. difficile reads included or excluded, giving approximately indistinguishable results.
Rendered version: alpha-beta.html
Rendered version with C. difficle reads removed: alpha-beta-no-cdiff.html
This script creates separate Bray-Curtis NMDS plots for canines and equines.
Rendered version: nmds-separate.html
This script performs a compositional PCA analysis and community-wide differential-abundance test to look for ASVs associated with C. difficile presence.
Rendered version: canine-aldex.html
This script visualizes C. difficile presence by lab sporulation assay versus age.
Rendered version: cdiff-vs-age.html
This script examines the co-occurrence of the three C. difficile ASVs and compares the detection of C. difficile by lab sporulation assay to that via 16S community sequencing.
Rendered version: cdiff-asvs.html
This script analyses the prevalence of C. hiranonis, the association of C. hiranonis presence with C. difficile, and the co-abundance patterns of the various C. hiranonis ASVs.
Rendered version: hiranonis-asvs.html
This script performs logistic regression of C. difficile presence versus presence of the two C. hiranonis types, with and without the sample covariates of age, antibiotics use, GI distress, and sex.
Rendered version: multivariate-regression.html