Skip to contents

Tidytacos

Package overview

tidytacos
tidytacos: Functions to manipulate and visualize amplicon count data.

File handling

Functions for loading in or creating tidytaco objects or converting to another datatype.

read_tidytacos()
Read community data written by tidytacos
write_tidytacos()
Write community data in tidytacos format
merge_tidytacos()
Merge two tidytacos objects
create_tidytacos()
Initiate tidytacos object
make_tidytacos()
Create a tidytacos object from three tidy tables
add_metadata()
Add metadata to the tidytacos object
from_dada()
DADA2 to a tidytacos object
from_phyloseq()
Convert phyloseq object to tidytacos object
as_phyloseq()
Convert tidytacos object to phyloseq object
to_biom()
Write the counts of the tidytacos object to a biom file
to_fasta()
Write the sequences of the taxa table to a fasta file

Table manipulation

Functions for manipulation of the three distinct tables using tidy-related functions.

samples()
Extract the sample table
taxa()
Extract the taxon table
counts()
Extract the count table
select_counts()
Retain or remove a set of count variables
select_samples()
Retain or remove a set of sample variables
select_taxa()
Retain or remove a set of taxon variables
mutate_counts()
Create extra variables in the count table
mutate_samples()
Create extra variables in the sample table
mutate_taxa()
Create extra variables in the taxa table
filter_counts()
Filter the counts
filter_samples()
Filter the samples
filter_taxa()
Filter the taxa
aggregate_samples()
Aggregate samples with identical values for all metadata
aggregate_taxa()
Aggregate taxa on a given taxonomic rank
everything()
Get all data in one single table

Relative abundance, prevalence and other count computations

Functions for transforming the count table to different matrix representations or pairwise comparison.

counts_matrix()
Return a counts matrix
rel_abundance_matrix()
Return a relative abundance matrix
add_rel_abundance()
Add relative abundances to count table
add_mean_rel_abundance()
Add average relative abundances to taxa table
mean_rel_abundances()
Get mean relative abundances of taxa in general or per condition
add_absolute_abundance()
Add absolute abundances to count table
add_spike_ratio()
Add spike ratio
add_density()
Add density to count table
add_logratio()
Add logratios
add_clr_abundance()
Perform a centered log ratio transformation on the readcounts.
add_jervis_bardy()
Apply the taxon QC method of Jervis-Bardy
prevalences()
Get prevalences of taxa in general or per condition
add_prevalence()
Add taxon prevalences to the taxon table
counts_tidy()
Convert matrix with counts to tidy data frame
add_total_absolute_abundance()
Add total absolute abundances of samples
add_total_count()
Add total read count per sample
add_total_density()
Add total densities of samples

Plotting

Functions for various plots that can be made with the data in a tidytacos object.

tacoplot_alphas()
Return a boxplot of every alpha metric per group in the samples table of a tidytaco object. If no alpha metrics are present, all available ones are added.
tacoplot_codifab()
Generate a compositional differential abundance plot
tacoplot_euler()
Return an euler diagram of overlapping taxon_ids between conditions
tacoplot_ord()
Return an ordination plot of the samples
tacoplot_ord_ly()
Return an interactive ordination plot of the samples
tacoplot_stack()
Return a bar plot of the samples
tacoplot_stack_ly()
Return an interactive bar plot of the samples
tacoplot_venn()
Return a venn diagram of overlapping taxon_ids between conditions
tacoplot_venn_ly()
Return an interactive venn diagram of overlapping taxon_ids between conditions
tacoplot_zoom()
Return a visualization designed for a small number of samples

Statistical tests

Functions for various statistical tests that can be performed on a tidytacos object.

perform_adonis()
Perform an adonis test
perform_anosim()
Perform anosim test
perform_mantel_test()
Determine the correlation between the distance of the counts in a tidytacos object and a sample variable, multiple sample variables or another matrix.
add_codifab()
Perform compositional differential abundance analysis

Functions to manipulate taxonomy names.

rank_names()
Return rank names associated with a tidytacos object
set_rank_names()
Set rank names for a tidytacos object
add_taxon_name()
Add sensible taxon name to taxon table
add_taxon_name_color()
Add taxon color for visualization.
add_eigentaxa()
Calculates eigentaxa values based on SparCC - MCL generated clusters per sample. It is advised to run cluster_taxa on the tidyamplicons object before running this function to add the clusters if you want to stray from any default parameters.

Diversity analysis

Functions to add various diversity metrics to the tidytacos object.

add_alpha()
Add alpha diversity measure
add_alphas()
Add alpha diversity measures
betas()
Get beta diversity table
add_ord()
Add ordination
add_copca()
Add compositional principal components to the sample table

Clustering

Functions to cluster the sample and taxa table.

cluster_samples()
Clusters samples into n clusters
cluster_taxa()
Performs SparCC network analysis on a tidytacos object and then performs Markov Clustering on the network to annotate taxa of the largest clusters in the tidytacos object.
add_sample_clustered()
Add clustering-based sample order

Network analysis

Functions to perform network inference, clustering and filtering the resulting clusters.

network()
Perform network inference with SparCC on a tidytacos object, after dropping rare taxa. See sparcc.
filter_network()
Filters the output of network to a minimal threshold and transforms to matrix for downstream clustering or heatplot visualization.
cluster_network()
Performs Markov Clustering on a sparcc network matrix generated by filter_network. and returns a tibble with clusters and taxon identifiers. Optionally, the network can be visualized.

Miscellaneous

Functions to tidy up the three tables or convert to other data structures.

trim_asvs()
Trim all sequences
classify_taxa()
(Re)classify amplicon sequences
reset_ids()
Reset the taxon and sample IDs
change_id_taxa()
Change taxon IDs to a given expression
change_id_samples()
Change sample IDs to a given expression
remove_empty_samples()
Removes empty samples from the tidytacos object
tidy_count_to_matrix()
Convert counts tidy data frame to matrix
rarefy()
Rarefy the samples to a given number of reads
test_taco()
Create a tidytacos object for testing/example purporses
taxonlist_per_condition()
Return a list of taxon IDs per condition
tacosum()
Return some descriptive numbers