See also
beta diversity
metrics
alpha_div command
The beta_div command calculates one or more beta
diversity metrics from an OTU table. The OTU
table must be in QIIME classic format.
The -metrics option specifies one or more metric names separated by commas. Default is all supported metric names. See beta diversity metrics for supported names.
For each metric, up to three output files are generated: a distance matrix in square format, a sorted distance matrix and a tree.
Trees are written in Newick format.
Sorted matrices and trees are generated only for metrics which support
clustering; see beta diversity metrics. In a
sorted distance matrix, samples are sorted to bring similar samples
together.
Output file names are based on the metric name. The -filename_prefix
option species a string to be added at the beginning of all output
filenames. Typically this is a directory name, which must end with a slash
or backslash. The directory must exist; usearch will not create a new
directory. Default is no prefix.
The ‑mx_suffix, ‑sorted_mx_suffix and -tree_suffix options specify strings to be added at the end of the output filenames. Default values are .txt, .sorted.txt and .tree, respectively.
The Unifrac metric requires a tree for the OTUs, which is specified using
the -tree option. The file must be in
Newick format. The tree can be generated using the -cluster_agg command
using the OTU FASTA file as input. If no tree is specified, the Unifrac
metric will not be calcualated.
Example: calculate
all supported beta metrics and write results in current directory
usearch -beta_div otutable.txt
Example: calculate all supported beta metrics and write output in directory /results/beta
usearch -beta_div otutable.txt -filename_prefix /results/beta/
Example: calculate Jaccard only and write results in current directory
usearch -beta_div otutable.txt -metrics jaccard
Example: calculate Jaccard and Bray-Curtis
and write results in current directory
usearch -beta_div otutable.txt -metrics jaccard,bray_curtis
and