Skip to contents
schtools
schtools: Schloss Lab Tools for Reproducible Microbiome Research

Microbiome

Handle microbiome-related data.

read_dist()
Read in lower left triangular matrix from file
read_tax()
Read in a taxonomy file and parse it to a wide dataframe
parse_tax()
Convert taxonomy strings into dataframe of labels based on taxonomic classification
calc_relabun()
Calculate OTU relative abundances from a shared file
pool_taxon_counts()
Pool OTU counts at a particular taxonomic level

R Markdown helpers

Format publication-quality documents.

set_knitr_opts()
Set knitr chunk options & inline hook
inline_hook()
Inline hook for knitr to paste human-readable numbers and nice lists.
paste_oxford_list()
Create a prose string from a list or vector
format_number()
Format human-readable numbers.

ggplot2 helpers

Make your plots even prettier.

theme_lucas()
Sarah's go-to theme for ggplot2
theme_sovacool()
Kelly's go-to theme for ggplot2

Everything else

Useful tools for miscellaneous tasks.

close_enough()
Check whether two numeric vectors are close enough for gov't work.
is_nearly_whole()
Checks whether a number is near to a whole number
is_nondesc()
Check whether all elements given are sorted in non-descending order
load_deps()
Install & load packages
log_snakemake()
Save output, messages, warnings, and errors to the Snakemake log file