News and Announcements » – Principal Coordinates Analysis (PCoA)


Principal Coordinate Analysis (PCoA) is commonly used to compare groups of samples based on phylogenetic or count-based distance metrics (see section on

Usage: [options]

Input Arguments:



-i, --input_path
Path to the input distance matrix file(s) (i.e., the output from Is a directory for batch processing and a filename for a single file operation.
-o, --output_path
Output path. directory for batch processing, filename for single file operation


The resulting output file consists of the principal coordinate (PC) axes (columns) for each sample (rows). Pairs of PCs can then be graphed to view the relationships between samples. The bottom of the output file contains the eigenvalues and % variation explained for each PC. For more information of the file format, check the OrdinationResults class in the scikit-bio package (

PCoA (Single File):

For this script, the user supplies a distance matrix (i.e. resulting file from, along with the output filename (e.g. beta_div_coords.txt), as follows: -i beta_div.txt -o beta_div_coords.txt

PCoA (Multiple Files):

The script also functions in batch mode if a folder is supplied as input (e.g. from run in batch). No other files should be present in the input folder - only the distance matrix files to be analyzed. This script operates on every distance matrix file in the input directory and creates a corresponding principal coordinates results file in the output directory, e.g.: -i beta_div_weighted_unifrac/ -o beta_div_weighted_pcoa_results/