News and Announcements » – A workflow script for computing beta diversity distance matrices and generating PCoA plots


This script will perform beta diversity, principal coordinate analysis, and generate a preferences file along with 3D PCoA Plots.

Usage: [options]

Input Arguments:



-i, --otu_table_fp
The input biom table [REQUIRED]
-m, --mapping_fp
Path to the mapping file [REQUIRED]
-o, --output_dir
The output directory [REQUIRED]


-t, --tree_fp
Path to the tree file [default: None; REQUIRED for phylogenetic measures]
-p, --parameter_fp
Path to the parameter file, which specifies changes to the default behavior. See . [if omitted, default values will be used]
Plots will have coloring for all mapping fields [default: False; only include fields with greater than one value and fewer values than the number of samples]
-f, --force
Force overwrite of existing output directory (note: existing files in output_dir will not be removed) [default: None]
-w, --print_only
Print the commands but don’t call them – useful for debugging [default: False]
-a, --parallel
Run in parallel where available [default: False]
-e, --seqs_per_sample
Depth of coverage for even sampling [default: None]
Do not generate emperor plots [default: False]
-O, --jobs_to_start
Number of jobs to start. NOTE: you must also pass -a to run in parallel, this defines the number of jobs to be started if and only if -a is passed [default: 1]


This script results in a distance matrix (from, a principal coordinates file (from, and folders containing the resulting PCoA plots (accessible through html files).


Given an OTU table, a phylogenetic tree, an even sampling depth, and a mapping file, perform the following steps: 1. Randomly subsample otu_table.biom to even number of sequences per sample (100 in this case); 2. Compute a weighted and unweighted unifrac distance matrices (can add additional metrics by passing a parameters file via -p); 3. Peform a principal coordinates analysis on the result of Step 2; 4. Generate a 2D and 3D plots for all mapping fields. -i otu_table.biom -o bdiv_even100/ -t rep_set.tre -m Fasting_Map.txt -e 100