An apple can kill, a sprinkle of sprouts can send you to the hospital and your succulent, pan-seared red snapper may actually be tilefish. Despite rising concerns about food safety and authenticity, contamination rates by salmonella, campylobacter, Escherichia coli and other common pathogens have not fallen or are actually on the increase, depending on the microbe, according to a 2013 report from the U.S. Centers for Disease Control and Prevention. Each year foodborne illnesses caused by these microorganisms sicken 48 million Americans, hospitalize 128,000 and kill 3,000, according to the agency.

Food fraud is also increasing. In 2014 Oceana, an international conservation organization, published a two-year study of 1,215 seafood samples and 46 fish types from 674 retailers in 21 states. They found that a third of samples were mislabeled.

Tools to analyze DNA in food items may soon help eliminate these problems. Techniques ranging from whole genome sequencing to the ability to create artificial DNA labels that indicate points of origin are surprisingly affordable now, and have led to novel global collaborations and inventions. Scientists worldwide are working to create databases of foodborne microbial strains, sequence the most common pathogens and tag foods for immediate traceability. The new initiatives promise to speed investigations and reduce foodborne illnesses and deaths; the techniques could also spot food fakery by marketers.

Genome Trakr, a five-year collaboration between the University of California, Davis; Agilent Technologies; and the U.S. Food and Drug Administration, promises to perform whole genome sequencing on a total of 100,000 types of common foodborne pathogens. The technology maps the entire DNA sequence of a microbe, and allows scientists to distinguish one strain from another, allowing fast track-back and earlier elimination of outbreaks around the world. The project began in March 2012 and the database, hosted by the National Center for Biotechnology Information, will be available online and at no cost to researchers and public health officials. The zoom-in detail of a sequenced genome will make it possible to distinguish different strains of a microbe that are otherwise indistinguishable, and trace back a small cluster outbreak before it becomes widespread.

Right now that kind of trace-back is difficult without detailed epidemiologic exposure data. A recent study from Cornell University suggests the new technology is an effective and faster replacement. Using whole genome sequencing, researchers were able to double the number of cases associated with a known 2010 outbreak of a strain of salmonella called salmonella Heidelberg at a long-term care facility in New York City. They even found cases outside the metro region.

Whole genome sequencing has already proved successful in halting serious food outbreaks. In 2012 researchers isolated the specific strain in a salmonella outbreak in tuna sushi that sickened 258 individuals, and tracked it back to a processing plant in India. The U.S. Food and Drug Administration investigated the plant and found 10 sanitation slipups, including four outright violations of safety protocols. In 2014 the FDA was able to halt a U.S. Listeria outbreak that had killed one and sickened seven others. They genotyped and linked the strain to soft Hispanic-style cheeses manufactured by a company called Roos Foods, which ceased all manufacturing after being shut down by the FDA

The gigantic open-access Genome Trakr database should speed up this kind of detective work by providing an enormous volume of data that has already been analyzed. The project’s director, U.C. Davis microbiologist Bart Weimer, says that “We’ve just extended the project to China, and they will map another 10,000 genomes and deposit them. We have other global collaborations pending.”

Sequencing a whole genome is only one of the new approaches to food safety, however. Food fraud prevention is also benefitting from a large international project called The International Barcode of Life (iBOL), which is building a genetic library of all life on Earth. Initiated in 2003 by geneticist Paul Hebert at the University of Guelph in Ontario, it offers a global online database of DNA labels, akin to the bar codes on food packaging, for different species. These DNA bar codes are sequences from a small and stable region of the genome, which can reliably be used to identify a species.

The project has already created over 2.6 million bar-code records for almost 200,000 species of plants and animals, and Hebert hopes to reach 500,000 by the end of 2015. The BOL can distinguish farmed from wild salmon because they are two different species. A 2015 report from the CDC used bar coding to identify imported poisonous puffer fish that were being sold in the U.S. as nonpoisonous varieties. “DNA testing is often the only way to correctly identify food and medicinal products,” says Mark Stoeckle, a researcher at The Rockefeller University who used DNA bar codes to finger fake fish sold in New York City in a 2009 experiment that became known as “sushigate.”

Finally, inspired by the bar-coding idea, one new company, DNATrek, is creating synthetic bar codes for food items. The technology consists of DNA sequences extracted from plants; it is an odorless, colorless and tasteless material which can be mixed with already-in-use food coatings (such as natural waxes and oils) and sprayed on foods. The DNA sequences act like invisible bar codes and can be applied at each point of risk in the food chain: the farm, the sorting facility, the distributor, the packer and even the retailer. These bar codes can be read by polymerase chain reaction testing, a process that generates millions of copies of a small piece of DNA, so that it can be easily identified. “When an outbreak occurs,” says company founder Anthony Zografos, “polymerase chain reaction technology can read the DNA code in about 20 minutes in the laboratory, allowing immediate trace-back rather than weeks or months.”

The codes can also help verify the authenticity of a product like Italian olive oil: The tags should trace back to an olive farm and to packing facilities in Italy. DNATrek’s technology has been approved by the FDA, and this year will be tested in the U.S. supply chain. A similar DNA bar code has been designed by the Swiss Federal Institute of Technology in Zurich. There, researcher Robert Grass and colleagues created DNA labels encapsulated in small, food-safe silica particles that are already used as additives in certain foodstuffs. They then added the particles to milk. Later polymerase chain reaction testing was able to detect the labels in cheese and yogurt made from the milk. Regulatory hoops still need to be overcome, before widespread adoption of the second method, however.

DNA Trek’s Zografos thinks that smartphones may one day have apps that can actually detect bacterial contamination or synthetic bar codes. “My colleagues and I were thinking how wonderful that invention could be, but how many years away it was. And then we saw that a professor at U.C.L.A. had developed a smartphone app that could read a single virus or bacteria.” That researcher, bioengineer Aydogan Ozcan, recently published a study with his colleagues showing that a cellphone-based imaging system could detect viruses and nanoparticles. The phone is essentially converted into an advanced fluorescent microscope. The mobile microscopy unit uses the phone's camera to visualize and measure the length of single-molecule DNA strands.

So the day may not be far off when we can hold our phones over a fish fillet to make sure we know what we are eating.