Principal coordinates analysis, or PCoA, turns a set of samples into a map where closeness means similarity. It is one of the most common pictures in studies of gut bacteria, plant communities and animal genetics. The map is only as meaningful as the way “difference” was measured before the picture was drawn.
How PCoA Builds A Map From Differences
PCoA begins with a distance matrix, a table listing how different every sample is from every other sample.1CD Genomics. What Is Principal Coordinates Analysis (PCoA)? The question it answers is how to lay those sample-to-sample differences out as points in ordinary space.1CD Genomics. What Is Principal Coordinates Analysis (PCoA)? The differences can be measured any way the researcher chooses, including measures that don’t behave like ruler distances.2QIIME 2 Forum. Using PCoA versus PCA To do that, the method rearranges the table into new axes, ordered from the one that captures the most variation to the one that captures the least.3PubMed Central. Time-series sewage metagenomics distinguishes seasonal, human-derived and environmental microbial communities potentially allowing source-attributed surveillance
Imagine you only knew the road distances between cities, not where the cities sit. From those numbers alone you could redraw a rough map. PCoA does the same thing with samples instead of cities.
A sample might be one person’s stool, one patch of forest, or one animal’s DNA. The difference score compares what is in two samples, such as which bacteria are present and how many of each. Every pair gets a score, so 50 samples produce over a thousand comparisons.
Plotting just the first two or three gives a scatter plot a person can look at.3PubMed Central. Time-series sewage metagenomics distinguishes seasonal, human-derived and environmental microbial communities potentially allowing source-attributed surveillance The method is also called classical multidimensional scaling.4Open Plant Pathology. What Is Principal Coordinates Analysis (PCoA)?
Squeezing many dimensions into two means some distances in the plot are slightly off from the true values in the table. The first axes are chosen to keep as much of the overall pattern as possible, so the biggest differences are the best preserved.
It is also easy to mistake the axes for measured variables. PC1 is not a measurement like height or pH. It is a summary direction built from all the differences together, and its meaning has to be worked out afterwards by checking what lines up with it.
How To Read A PCoA Plot
Each axis, labelled PC1, PC2 and so on (the principal coordinates), comes with a percentage of the total variation it shows.5PubMed Central. Bifidobacteria Abundance-Featured Gut Microbiota Compositional Change in Patients with Behcet’s Disease These percentages are often small, such as 9.4% and 3.6% for the first two axes in one gut bacteria study.6PubMed Central. The effect of gut microbiota dysbiosis on patients with preeclampsia A plot can therefore show clear groups even while most of the difference between samples sits in axes you can’t see. In a cotton aphid genetics study, by contrast, the first two axes showed about 30% and 15%, a much fuller picture.7PubMed Central. Genetic variation and phylogeographic structure of the cotton aphid, Aphis gossypii, based on mitochondrial DNA and microsatellite markers
A low percentage makes the picture partial, not wrong: the dots still show the biggest single pattern in the data. Microbiome samples differ in many small ways at once, so each axis gets a small share.
Separate clouds of colored dots suggest the groups differ, as with pregnant women with preeclampsia versus healthy controls.6PubMed Central. The effect of gut microbiota dysbiosis on patients with preeclampsia In wild boar genetics, axes showing about 7% and 6% revealed no distinct clusters, only mixing between locations.8PubMed Central. The effects of habitat fragmentation on the genetic structure of wild boar (Sus scrofa) population in Lithuania Two axes can even explain a lot of variation yet still show no grouping by the factor being studied.9PubMed Central. Use of Direct Gradient Analysis to Uncover Biological Hypotheses in 16S Survey Data and Beyond
Distance on the plot has a limited meaning. Two close dots had similar contents by the chosen measure. Distance along a low-percentage axis matters less than distance along PC1. The origin and the direction of the axes are arbitrary, so a flipped plot means the same thing.
Some plots add arrows for specific bacteria or traits, called a biplot.10PubMed Central. Gut microbiota composition and blood pressure: Coronary Artery Risk Development in Young Adults (CARDIA) Study An arrow points in the direction that feature is linked with, and a longer arrow means a stronger link.10PubMed Central. Gut microbiota composition and blood pressure: Coronary Artery Risk Development in Young Adults (CARDIA) Study Researchers can likewise fit factors such as site or year onto the plot to see which axes they line up with.11PubMed Central. Monitoring fish communities through environmental DNA metabarcoding in the fish pass system of the second largest hydropower plant in the world
Some papers show PC1 against PC2 and then PC1 against PC3, or draw a three-dimensional plot, to reveal structure the first pair hides. If groups overlap on PC1 and PC2 but separate on PC3, a two-axis plot alone would suggest no difference. The percentage on each extra axis tells you how much that added view contributes.
PCoA Versus PCA
PCA starts with the raw table of measurements and works with straight-line distances between samples.2QIIME 2 Forum. Using PCoA versus PCA PCoA starts with the table of pairwise differences and accepts measures such as Bray-Curtis or UniFrac.2QIIME 2 Forum. Using PCoA versus PCA As a result, PCA’s axes can be explained by the original variables, while PCoA focuses on relationships between samples.12Metware Bio. Principal Coordinates Analysis (PCoA): Principles, Applications, and a Comparison with PCA PCoA also usually takes more computing work.12Metware Bio. Principal Coordinates Analysis (PCoA): Principles, Applications, and a Comparison with PCA
That difference shows up when you read the plots. On a PCA plot, you can usually check which original measurements load heavily on an axis, so an axis can be described as, for example, mostly about body size. On a PCoA plot built from a difference table, there are no original variables to read from, so you describe the axes by how samples are arranged. Arrows can be added afterwards, but they are an extra step rather than something the method gives for free.
The two methods meet in one case. When PCoA is run on ordinary straight-line distance, it gives the same result as PCA.13Applied Multivariate Statistics in R. Ordinations (Data Reduction and Visualization) Researchers have used this equivalence directly, getting PCA results by running PCoA on straight-line distance.14PubMed Central. AC-PCoA: Adjustment for confounding factors using principal coordinate analysis
Straight-line distance works well for measurements like height, blood pressure or temperature, where bigger gaps mean bigger differences in a steady way. It can mislead with counts that are mostly zero, because a large number of shared zeros makes two samples look close. Samples with very different total counts can also look far apart even if their proportions are similar.
That is why ecology and microbiome fields prefer PCoA. Two samples that both lack a species shouldn’t look alike for that reason, and custom difference measures handle this. For your own data, continuous measurements like blood values usually suit PCA, while species counts or genetic profiles usually suit PCoA.
Why The Distance Measure Changes The Picture
In microbiome papers the plot is said to show beta diversity, meaning how different communities are from each other.5PubMed Central. Bifidobacteria Abundance-Featured Gut Microbiota Compositional Change in Patients with Behcet’s Disease Common measures include Bray-Curtis, Jaccard, weighted UniFrac and unweighted UniFrac.15PubMed Central. Effects of ursodeoxycholic acid on the gut microbiome and colorectal adenoma development Unweighted UniFrac counts only presence or absence, while weighted UniFrac accounts for how abundant each member is.16PubMed Central. Quantitative and qualitative beta diversity measures lead to different insights into factors that structure microbial communities
Jaccard asks only which members two samples share and which each has alone, ignoring amounts. Bray-Curtis also uses how many of each member there are, so it responds to shifts in abundance. Two samples with the same members in different proportions can look identical to Jaccard yet clearly different to Bray-Curtis.
UniFrac adds something neither of those does: it takes into account how related the bacteria are on the family tree. Two samples with different but closely related species count as fairly similar. Bray-Curtis and Jaccard treat every species as equally distinct.
Which view matters depends on whether the question is about rare members or dominant ones. Measures based on presence alone and measures based on amounts can lead to different insights about what shapes a community.16PubMed Central. Quantitative and qualitative beta diversity measures lead to different insights into factors that structure microbial communities It is reasonable to check whether a pattern holds across more than one measure. To find out which measure a paper used, look in the figure caption or the methods, for phrases like “PCoA based on Bray-Curtis.” Without knowing the measure, you can’t say what “similar” meant.
Testing Whether Groups Really Differ
A plot alone isn’t proof. PCoA is often paired with PERMANOVA, also called the Adonis test, a test that works on the difference table directly.12Metware Bio. Principal Coordinates Analysis (PCoA): Principles, Applications, and a Comparison with PCA It measures how much variation a grouping explains, then shuffles the labels to see whether that could happen by chance.12Metware Bio. Principal Coordinates Analysis (PCoA): Principles, Applications, and a Comparison with PCA If the real grouping beats nearly all the shuffled ones, the pattern is unlikely to be chance; the fraction of shuffles that do as well or better becomes the p-value. In one HIV and fatty liver study, grouping explained about 17% of the variation and the difference was unlikely to be chance.17PubMed Central. A gut microbiome signature for HIV and metabolic dysfunction-associated steatotic liver disease A similar test, ANOSIM, found the preeclampsia and healthy groups clearly differed.6PubMed Central. The effect of gut microbiota dysbiosis on patients with preeclampsia
The R² number is the share of total difference explained by the grouping. A value of 0.17 means groups explain about a sixth. The rest comes from individual variation and other factors, so a real difference can still be small.
A plot and a test can disagree. The test uses all the differences, while the plot shows only the first axes, so groups may differ in dimensions not drawn. Or the test may flag a difference that really comes from the spread inside the groups rather than where the groups sit.
No difference is also a finding. In a study of C. difficile infection, plots and tests showed no difference between patients who responded to treatment and those who didn’t.18PubMed Central. Gut Microbiome Predictors of Treatment Response and Recurrence in Primary Clostridium difficile Infection
Limits And Pitfalls Of PCoA
Many common microbiome measures don’t fit neatly into ordinary space, which can cause problems for PCoA.19OpenAlex API / Springer. Mathematical Foundations of Beta Diversity: Why Common Metrics Fail in Microbiome Analysis When a difference measure cannot be laid out exactly, the calculation produces some negative values for certain axes. These are a warning that some of the table’s distances cannot be reproduced faithfully. Tools exist to check for this and correct the difference table while keeping the plot’s structure.19OpenAlex API / Springer. Mathematical Foundations of Beta Diversity: Why Common Metrics Fail in Microbiome Analysis The correction adjusts the table so that the first axes, the ones plotted, are less affected.
Missing data can distort things too. When lots of data are missing, samples with more gaps can be pulled toward the center of the plot.20Wiley Online Library (Palaeontology). Biases with the Generalized Euclidean Distance measure in disparity analyses with high levels of missing data A central cluster may reflect missing information rather than true similarity.20Wiley Online Library (Palaeontology). Biases with the Generalized Euclidean Distance measure in disparity analyses with high levels of missing data
Other methods answer different questions. NMDS tries to preserve only the rank order of differences, not their exact sizes.1CD Genomics. What Is Principal Coordinates Analysis (PCoA)? PCoA ties plot distances to the actual difference values, making it stricter.21Applied Multivariate Statistics in R. What Is Principal Coordinates Analysis (PCoA)? UMAP trades some overall accuracy for showing local neighborhoods, while PCoA keeps the global layout.22PubMed Central. Uniform Manifold Approximation and Projection (UMAP) Reveals Composite Patterns and Resolves Visualization Artifacts in Microbiome Data
If only the order of similarities matters, NMDS may suit better. If fine local clusters matter, UMAP can reveal them. PCoA is a good default when exact differences in any measure matter.
How To Run A PCoA Yourself
In R, the cmdscale function performs PCoA on a difference table.3PubMed Central. Time-series sewage metagenomics distinguishes seasonal, human-derived and environmental microbial communities potentially allowing source-attributed surveillance The vegan package supplies Bray-Curtis and other measures and can fit factors onto the plot.11PubMed Central. Monitoring fish communities through environmental DNA metabarcoding in the fish pass system of the second largest hydropower plant in the world Microbiome software like QIIME 2 calculates diversity measures and PCoA together.15PubMed Central. Effects of ursodeoxycholic acid on the gut microbiome and colorectal adenoma development Samples are often first trimmed to equal size, such as 900 sequences each, so they can be compared fairly.15PubMed Central. Effects of ursodeoxycholic acid on the gut microbiome and colorectal adenoma development
The basic steps run in order. Organize the data with samples as rows and pick a difference measure suited to the question. Compute the difference table, then run PCoA. Plot the first two axes with their percentages, color the dots by group, and run a PERMANOVA to test the groups.
The input is usually a table of counts with one row per sample and one column per species or feature. Check that sample names match between the count table and the table that records groups, or the colors will be wrong. In sequencing studies, decide whether to trim to equal size or convert to proportions, since uneven depth can create false differences.

