Postings on science, wine, and the mind, among other things.

Using spectroscopy to identify the bugs that make (or spoil) wine

A pop summary of Raman spectroscopy and chemometrics techniques developed in Rodriguez, Thornton, & Thornton (2013, 2017) AEM, JIMB

Saccharomyces cerevisiae, the 'sugar mold,' is used to convert sugar to alcohol in wine and beer fermentation.

In the wine business, it is a common refrain that "the wine is made in the vineyard." This is meant to suggest that good wine ultimately relies on good grapes. It's not clear that this maxim is true, even in the figurative sense, because good wines can indeed be made from bad grapes. Fermentation, blending, and aging all provide opportunities for the winemaker to shape their wine, whatever the initial quality of the grapes. However, even those who fully endorse the 'wine is made in the vineyard' notion, might also agree that wine is unmade in the winery. By this I mean that many of the things that can turn good grapes into bad wine are things that happen in between the grapes arriving at the winery, and the wine leaving for the store. It is the task of the winemaker to steer past such hazards on the course to a desirable product.

The question of quality of wine is a perilous one. If you ask most winemakers or sommeliers, they will insist that quality is as plain as day. However, if you consult rigorous statistical analysis, even vaunted experts show virtually no reliable preference for Premier Grand Cru Bordeaux over wines from New Jersey. A cynic might suggest that the fact that certain people's paychecks depend on the mystique of wine biases them towards exaggerating its properties. However, careful examination would also suggest that most wine judgings are grossly underpowered (i.e., have too few participants) to statistically detect even quite large quality differences. A recent meta-analysis - a study which combines and analyzes the results of many other studies - found that wine quality can indeed be reliably rated, and that price is related (albeit modestly, r = .3) to desirable sensory properties in the liquid itself. Perhaps not entirely coincidentally, I found a quality-price relationship of similar magnitude when analyzing data from thousands of listing on

Boxplots represent the price distributions (normalized to a 0 to 1 scale, where 1 represents the most expensive wine) of wines rated 1-5 stars on The horizontal lines at the center of each yellow box indicate medians; the parts of the boxes above and below the median each contain 25% of the wines in that rating bracket.

Even a profound skeptic about wine quality would likely be forced to admit that there exist wines that are truly bad. I refer here to spoilage - tastes and smells that are almost universally regarded as noxious. There are many ways for a wine to spoil. Some forms of spoilage result entirely from chemical processes. For example, if you leave a bottle open to the air for too long, it will inevitably oxidize, turning even the most fragrant wine into a repulsive liquid with distinct notes of cardboard. However, many forms of spoilage are at least partially biological in nature: the undesirable chemical changes in the wine are mediated by living microorganisms. For instance, the same oxygen that produces oxidation can also lead to the thriving of acetic acid bacteria which turn wine into vinegar: tasty on your salad, nasty in your glass. Managing microorganisms - both the bad ones that lead to spoilage, and the good ones essential to wine production - is one of the chief responsibilities of a winemaker.

Over the course of their careers, my parents - Dr. Roy Thornton and Dr. Susan Rodriguez, recently emeritus members of the CSU Fresno Department of Viticulture and Enology - have focused much of their efforts on understanding the microorganisms in wine, improving fermentation yeast via selective breeding, monitoring yeast and bacterial viability during fermentation by flow cytometry, and developing methods to allow winemakers to track microbial populations in their grape juice. As a profile of my mother in the Penn Gazette pointed out a few years ago, she is essentially a "wine epidemiologist." Recently, we have found occasion to collaborate on a project at the intersection of their wine research and my statistical knowledge: developing methods to rapidly and affordably identify microorganisms using a combination of Raman spectroscopy and machine learning.

We published our first paper on the topic, focusing on three major wine yeast - Saccharomyces cerevisiae, Zygosaccharomyces bailii, and Brettanomyces bruxellensis - in the journal of Applied and Environmental Microbiology in 2013. S. cerevisiae is the most important microorganism in the wine fermentation process, as it is the main yeast responsible for converting grape sugar (glucose and fructose) into alcohol (ethanol). However, in today’s sweeter wines, S. cerevisiae can referment a finished wine resulting in gassiness and off-odors. The other two yeast result in the production of other chemicals, many of which are considered spoilage, although there is considerable variation between strains. Our second paper, published last month in the Journal of Industrial Microbiology and Biotechnology, and extends our technique to lactic acid bacteria. The three genera we studied were Lactobacillus, Pediococcus, and Oenococcus. All three of these genera can conduct a secondary type of fermentation, known as malolactic, that converts malic acid to lactic acid. If you've ever enjoyed a buttery chardonnay, you have lactic acid bacteria to thank. However, Oenococcus oeni is much preferred for this purpose, because Lactobacillus and Pediococcus strains tend to produce a number of off-odors and unpleasant textures in the wine. However, again, strains of the same species differ considerably in their chemical byproducts, so highly specific identification is crucial to making informed decisions as a winemaker.

An illustration of taxonomic ranks, CC BY-SA 4.0 Annina Breen. The strain level (not shown) is even more specific than species. A reasonable everyday analogy might be drawn between strains and different breeds of dog.

Detecting the differences between microorganisms depends a great deal on their genetic relationships. Big differences, such as that between bacteria and yeast, should be apparent to anyone looking down a microscope. Smaller differences, such as between one yeast genus and another, are also generally visible to the eye with training and practice. However, the smallest differences, between species of the same genus or strains of the same species, can be virtually impossible to pick out through visual inspection. Unfortunately, differences at these levels are still highly relevant to the winemaking process. Biochemical and genetic tests can be used to pin down species, and sometimes strains, but these tests are often so slow and expensive that they are impractical for winemakers outside of large industrial settings.

So how do we improve on this unhappy status quo? Our approach starts with Raman spectroscopy. Named after Nobel Prize-winning Indian Physicist Sir Chandrasekhara Venkata Raman, who discovered the eponymous effect, this approach involved shining a laser on a sample and measuring the wavelengths of the light that scatters off. The details are rather technical - and not my bailiwick at all - but the result is that one ends up with a spectrum reflecting the chemical composition of the sample. In relatively 'pure' samples this spectrum typically produces a easily interpretable pattern of peaks and valleys that indicate the different types of chemical bonds present in the sample. However, in complex biological samples like whole yeast cells, fluorescence combines with the wide variety of different compounds present to create more wave-like spectra.

Average preprocessed spectra, with 95% confidence intervals, for the three lactic acid bacteria in our 2nd paper.

Examining complex Raman spectra by eye would likely be more difficult than trying to identify the respective microorganisms down a microscope. Thus we turned to tools in the domain of machine learning to help us algorithmically classify the different yeast and bacteria. Raman data are very high-dimensional, with information from thousands of different wavelengths. However, in each study we had only a few hundred samples. For mathematical reasons, many classification techniques struggle when the number of variables (wavelengths, in this case) outnumber the data points being classified (samples). Fortunately, not all classifiers have this problem, and thus we selected an algorithm known as a linear support vector machine to help us solve this problem. To get an estimate of the real-world accuracy which we could expect, we used a technique called cross-validation to measure classifier performance. In cross-validation, the classifier is trained on only some of the data, and then tested on previously unseen data. This helps avoid a problem called overfitting, where a classifier capitalizes on chance to produce better performance than could be realistically expected if it was applied to new data.

The end result of this process was highly accurate classification of both yeast and bacteria. In our first paper, we classified wine yeast with 94.9% accuracy at the genus level (chance = 33%), and 81.8% accuracy at the strain level (chance = 5.6%). We repeated this results with lactic acid bacteria in the second paper, achieving genus-level accuracy of 93.7% (chance = 33%) and strain-level accuracy of 86.8% (chance = 5.3%). Although admittedly imperfect, these levels of strain identification are generally superior to the best methods on the market, and could allow winemakers to take cogent action during the fermentation process. Moreover, they can be done more quickly and cheaply than molecular genetic techniques such as PCR.

If the microbial classification technique we developed in these papers is widely adopted, it could considerably improve the industry state of the art in identifying yeast and bacteria relevant to the production of good (or bad) wine. This in turn could mean more diverse and interesting flavor in your glass, and fewer spoiled wines on the shelf. The American Vineyard Foundation, the California State University Agricultural Research Institute, the National Science Foundation, and Sackler Scholar Programme in Psychobiology all supported this research (or us, while we were doing it), so ultimately you may have them to thank for tastier wine in the future. Thank you for reading! Questions? You can reach me at