Today's article comes from the Frontiers in Bioinformatics journal. The authors are Gallina et al., from the University of Padova, in Italy. In this paper, they're testing whether two existing distance measures (Bray-Curtis and Jaccard) behave reliably in a new context: metagenomic comparisons.
DOI: 10.3389/fbinf.2026.1788907
If you head over to Google Trends and type in the term "microbiome", you'll see that search-interest in that term is currently hovering around an all-time high. It's been on a bit of a run since last July. And now more people than ever are exploring that ecosystem of microbes that live in and on the human body. They're trying to learn more about how their gut community works, and how to keep it healthy.
This trend has been buffeted by an onslaught of products and services that claim (rightly or wrongly) that they can help you transform your gut. That they can add beneficial microbes. That they can feed the beneficial microbes that are already there. That they can change the chemical environment of the gut, or that they can even transplant an entire microbial community from one person to another. And millions of Americans are buying in. Sales of probiotics, prebiotics, supplements, and at-home tests are going up, and up and up.
The question is: do they work? Or more to the point: how can we know if they work? How can we know if these products and services are actually changing our gut at all? If they're making a real difference, or if they're just producing temporary fluctuations that look meaningful on a test report.
Well, figuring that out is actually quite difficult. Your gut is home to a massive microbial population, with bacteria from many different species and strains living alongside archaea, viruses, fungi, and other genetic material. The act of "fixing" your gut, or changing its composition means that the relative makeup of that community is shifting in some objective way. To figure out if that is occurring we need to compare two populations of DNA. This kind of testing isn't comparing one strand to another. It's comparing one huge mixed bag of DNA fragments to another huge mixed bag of DNA fragments. Some of those fragments may come from common organisms. Some may come from rare organisms. Some may come from microbes we can name, and some may come from microbes we've never seen before.
Broadly speaking there are two ways to do that comparison: with or without a "reference". In both options you start by collecting a sample, sequencing the DNA inside it, and then breaking those sequencing reads into features that can be compared across samples. Then:
Obviously reference free is harder. But it's made a little easier by a concept called "mers". These are the 'features' I mentioned above. A "mer", from the Greek word "meros" meaning 'part' or 'portion' is just a unit, or a part. And in DNA analysis, a "k-mer" is just a short DNA substring of length k. So if k is 3, then a "3-mer" is a three-letter DNA sequence like ACG or GTA. If k is 21, then a "21-mer" is a DNA substring 21 bases long. When you're running a reference-free k-mer comparison, you don't need to compare the entire bagfuls of DNA to each other, or even individual genomes to each other. Instead you just need to go through all of the DNA in all of the microbes and chop them up into smaller mers. These short DNA strings. Long enough for each string to be uniquely identifiable most of the time, but not so long that they appear only once, or stop overlapping reliably across related samples.
So imagine that you've done all that. You've collected the samples, sequenced the DNA, chopped the reads into k-mers, counted those k-mers, and now you have two big piles of them. One from sample A, and one from sample B. Now what? Remember, your goal is to calculate the similarity between them. But how exactly do you do that?
What you need is a distance metric. A tool that can measure how similar or different the two groups of mers are. But which metric should you choose? And how can you know that it will work? That's where today's paper comes in.
In it, the authors are not introducing a new sequencer, a new microbiome test, or a new classification model. This study is much more narrow than that. All they're doing is testing whether two existing distance measures behave reliably in this context. On today's episode we'll walk through how both of these metrics work, what they're normally used for, what they have in common and how the authors tested their efficacy at this specific task. Let's dive in.
Before we go on, let's clarify what field we're even dealing with here. This is the field of metagenomics. Whereas genomics is the study of an individual organism's genome, metagenomics deals with the genetic material recovered from an entire mixed community. Instead of sequencing one bacterium, one virus, or one species in isolation, you sequence everything in a sample at once. This means that your data is a composite of many organisms, many genomes, and many abundance levels. That's why in this paper they're not particularly worried about assembling complete genomes, or identifying each organism by name. They're just focusing on whether two metagenomic samples can be compared in a consistent way. More specifically, they want to know whether the distance between two samples can be measured directly from their sequenced content. The two measures they're testing are called Bray-Curtis and Jaccard.
Bray-Curtis is not a "similarity" metric, it's a "dissimilarity" metric. Meaning it doesn't measure how alike two samples are, it measures how far apart they are. But it also doesn't just ask whether a species is present or absent. It asks how much of the community is shared when abundance is taken into account. Imagine that you have two samples. If both samples contain mostly the same organisms in similar proportions, Bray-Curtis gives them a low dissimilarity score. If one sample is dominated by one group of organisms and the other sample is dominated by another group, the score moves higher. It works by tallying the number of times each mer appears in each sample, comparing the counts assigned to each mer, looking at the overlap between those counts, and then normalizing that overlap by the total amount of material in both samples. This makes it especially useful in community ecology, environmental monitoring, or any setting where the structure of a population matters. It is commonly used when researchers care about relative abundance: not just what is there, but what dominates, what is rare, and how the overall composition changes across sites or conditions.
Traditionally, the features being counted are called "taxa", the classified biological groups in the sample. You might start by running a taxonomic profiler, then you estimate how many reads belong to each species, and then compare two samples based on those abundance profiles. In this paper, the authors replace those species counts with k-mer counts. So instead of saying, "sample A has this many reads from species one, this many from species two, and this many from species three," they say, "sample A has this many copies of k-mer one, this many copies of k-mer two, and this many copies of k-mer three." The Bray-Curtis calculation is then applied to those count profiles. If the same k-mers appear in similar amounts in both samples, the samples are treated as similar. And if the counts are very different, the samples are treated as dissimilar. The important shift here is that the comparison no longer requires the method to name the organisms first. It uses the abundance structure embedded in the raw sequence content to figure out how similar or different the underlying communities are.
The other measure is Jaccard: a distance measure for comparing sets. It is usually used when the central question is not "how much of each thing do we have?", but "which things are shared?" At its simplest, Jaccard looks at two collections and compares their overlap to their total combined content. If two samples contain many of the same features, they are close. If each sample contains mostly features that are missing from the other, they are far apart. This makes Jaccard useful even outside of biology. It can compare documents based on shared words, users based on shared purchases, or websites based on shared visitors. In ecological terms, we say that Jaccard is a "presence-absence" measure. It treats a rare organism and a dominant organism the same, as long as both are detected. That makes it conceptually simple, but also much more sensitive to sparse observations, missed detections, and noise in the tail of the distribution.
Normally Jaccard is used to compare the set of species detected in two samples. If the same species are detected in both communities, the distance is low. If each community has a very different species list, the distance is high. In this paper, the authors again remove the species-identification step and apply the same idea directly to mers. For each sample, they build a set of k-mers that appear in the sequencing reads. Then they compare the overlap between the two k-mer sets. Unlike Bray-Curtis, this version does not care how many times a k-mer appears. A k-mer that appears once and a k-mer that appears a million times are both just present. So Jaccard is still testing similarity, but a very different notion of it. Bray-Curtis asks whether the samples have similar abundance structure. Jaccard asks whether they contain the same sequence vocabulary.
So what questions were the authors asking in regard to these metrics?
To answer them, they set up a comparative validation experiment. They took three collections of metagenomic samples: a simulated microbiome dataset, a real microbiome dataset, and an ocean metagenomics dataset. For the simulated data, they calculated the k-mer distances then compared them against the known ground truth. For the real data (human-based and ocean-based), where the true species composition wasn't known, they used Kraken2 and Bracken (two taxonomic profiling tools) to produce reference-based species-abundance estimates. Then they treated them as the comparison point. And for each dataset, they computed Bray-Curtis and Jaccard distances in two ways: once using species-level profiles, and once using reference-free k-mer profiles. And finally, they checked whether the resulting sample-to-sample distance matrices agreed across a range of k-mer lengths.
So what happened? The main result was that Bray-Curtis held up well. When it used k-mer counts instead of species counts, it still produced sample relationships that were strongly aligned with the references and ground-truths. This was especially clear in the human microbiome datasets, where the k-mer version captured the major differences between body sites. The ocean dataset was more complicated, partly because the samples varied more in size and read length. But, Bray-Curtis still gave useful structure. Jaccard though, was less reliable. It sometimes preserved the broad ordering of sample similarity, but because it only tracks whether k-mers are present or absent, it was more vulnerable to sparsity, uneven sampling, and rare sequence fragments.
So what can we learn from this paper? The biggest lesson is that sometimes you can compare complex systems without needing to label every component inside them. If your goal is to measure how different two samples are, the raw statistical structure of the data may be enough. And that idea holds beyond metagenomics, to any domain where labels are incomplete, expensive, biased, or unavailable. In those cases it may still be possible to build useful comparison tools from your raw measurements, even if all you have is unlabeled feature distributions. The hard part is proving that those unlabeled measurements preserve the structure you would have seen if you had perfect labels in the first place.