Skip to contents
schtools schtools-package
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

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

Make your plots even prettier.

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

Snakemake

Helpers for running R scripts from Snakemake.

log_snakemake()
Save output, messages, warnings, and errors to the Snakemake log file
get_wildcards_tbl()
Get the Snakemake wildcards as a tibble

Everything else

Useful tools for miscellaneous tasks.

close_enough()
Check whether two numeric vectors are close enough
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