The listeria outbreak that killed three and prompted Texas ice cream company Blue Bell Creameries to recall every one of its products late last month is the latest example of how genetic epidemiology is changing the detection of foodborne illnesses. Two years ago, the U.S. Centers for Disease Control and Prevention (CDC) in Atlanta launched a pilot program to sequence the DNA of every listeria sample tied to an illness in the United States—all told, about 800 per year.

“Now that we’re turning whole-genome sequencing on, we’re identifying outbreak after outbreak,” says Brendan Jackson, a medical epidemiologist with CDC. “We’re also finding smaller outbreaks that we weren’t able to find before.” They’re also finding them originating in previously unsuspected foods, from caramel apples to ice cream.

The new detection method can identify gaps in the food safety system, especially when used alongside similar efforts by the Food and Drug Administration (FDA) to sequence samples from food and from the places where food is prepared, from factories to distribution centers, Jackson says.

In the Blue Bell case, a quick-thinking nurse was the first to link five cases in Kansas with the tainted ice cream. For more than a year, Infection Prevention and Control Coordinator Kären Bally at Via Christi Health in Wichita and the rest of the team had been searching for anything to tie together the infections, which started with a single illness in January 2014. Traditional epidemiological tools showed nothing. Diet records were inconclusive, and listeria samples from the first four patients seemed unrelated using the standard technique for DNA analysis.

When the fifth patient fell ill in early 2015, standard DNA analysis finally showed a link to a previous case—patient number three. The state of Kansas sent a sample to CDC for confirmation. Whole-genome sequencing revealed that the two samples of listeria were a near-perfect match. “That was like the 'aha' moment,” Bally says.

But they still didn’t have a source. Bally and her team scoured FDA recalls and public health listservs for reports of tainted foods. Nothing. Then, she heard about a quality problem with one of their vendors—Blue Bell ice cream. Unknown to Bally, FDA sampling had turned up listeria in a Blue Bell distribution center in South Carolina, and inspectors had traced it to a production facility in Texas. Without explanation, Blue Bell stopped delivering its most popular products to Bally’s hospital.

Bally called the state health department. They contacted FDA, which had just sequenced the tainted ice cream samples. When they compared those results to the CDC samples, they found another match. CDC then looked into other unsolved listeria cases. By sequencing samples still in storage, they confirmed five additional cases, dating back to 2010.

“It’s not something that we’ve seen before—being able to look at cases so far back,” Jackson says. And although it took many tools to track the current outbreak, whole-genome sequencing “made all the difference,” he says.

Before now, investigators had two main tools for tracking cases: diet interviews and DNA analysis known as genetic fingerprinting. Fingerprinting shows the degree to which two different samples of DNA are related. But it isn’t 100% accurate—in some cases, different bacterial strains can appear related and similar strains can appear to be unrelated.

Whole-genome sequencing, in contrast, allows scientists to accurately compare every single DNA base pair in samples, giving them “a much sharper look at the differences and similarities in the strains,” Jackson says. The process takes longer—72 hours for testing compared with 48 hours—and it costs more. CDC’s goal is to create a national DNA database for foodborne pathogens from clinical samples that could be integrated with an already-existing FDA database of foodborne pathogens from food and environmental samples. The agency plans to add other foodborne illnesses, including salmonella and the most common disease-causing strain of Escherichia coli, to the project within 3 years.

But progress toward setting up a comprehensive national network has been incremental, because only two states can currently perform their own sequencing. The rest must send their samples to central CDC laboratories. And because the onus is on the state to send in samples, some go unsequenced. But the technology can do more than simply identify outbreaks, according to Robert Tauxe, deputy director of CDC’s Division of Foodborne, Waterborne, and Environmental Diseases.

“Whole-genome sequencing shines a new light in this area that helps us find unsuspected gaps in the food safety system,” he says. Ice cream, for example, was rarely tested for listeria prior to the Blue Bell outbreak. But in the weeks since, several states have said that listeria testing in ice cream will now be part of their regimen. “Finding these outbreaks related to foods we never suspected before is a very surprising thing,” Tauxe says. “This is a wake-up call to the ice cream industry in general and to the regulators.”