WHEN A PATIENT SHOWS UP WITH A COUGH AND A SORE THROAT, there is no good way to determine quickly whether the infection is bacterial or viral. That uncertainty has consequences for everyone’s health. Clinicians often prescribe antibiotics as a precaution, and when they do, each strain of bacteria in the patient’s body has a better chance of becoming resistant to further treatment.

Antibiotic-resistant bacteria have become a serious threat. They infect more than 2 million people in the United States every year, and at least 23,000 people die as a direct result. A recent British report found that, if unchecked, antibiotic-resistant bugs could eventually cause more than 10 million deaths globally each year and at least $100 trillion in lost GDP. President Obama has included $1.2 billion in his 2016 budget to tackle this coming public health crisis.

Although the problem has many roots, one good way to fight this resistance would be with a smarter test that could tell whether an incoming infection is viral or bacterial. And one promising frontier for the development of such a tool involves looking at the genes that become involved in the body’s immune response.

When a bacterium or virus invades, the genes of key immune cells produce messenger RNAs (mRNAs), a kind of genetic set of directions to produce proteins that will recognize and control the invader. Isolating those mRNAs might reveal the type of infection a patient has. This kind of approach has only recently become possible with the help of technologies that can cheaply measure the many gene signals taking place within a cell.

To test this idea, a team at Duke University’s Center for Applied Genomics & Precision Medicine gathered information from 273 patients who had come to the hospital with suspected infections.  First they looked for a clinical answer. Health records showed what symptoms the patients had developed, and which tests and cultures had been used for diagnosis. They were able to designate each illness as due to viral infection, bacterial infection or a noninfectious cause.

Then the Duke team looked at blood samples taken from these 273 patients. Sure enough, the immune cells showed distinctive arrays of gene responses that corresponded to bacterial infections, viral infections or noninfectious illnesses.  The viral infections turned out to be the easiest to spot, distinguishable by just a handful of mRNAs, while the signature for bacterial infections could be detected from a few dozen mRNAs.

The researchers used that information to create a diagnostic test that measured the activity of 120 genes. Taken together, these genes could predict the source of an infection with 87% accuracy—much better than any existing diagnostic tool. “The signal was terrific,” said Geoff Ginsburg, one of the researchers leading the team and the center’s director.

A team at the University of Sydney took a similar approach with influenza and found that all of the viral flu infections they tested showed the activity of IFI27, a single gene in dendritic cells, a special type of immune cell. “It’s highly unusual to have one gene that captures all the information that you are looking for,” said Benjamin Tang, who leads the Sydney team. But after five years of follow-up, the correlation between the gene and the virus still holds.

While a gene-expression approach to diagnosing infections holds great promise, it may have a drawback: human genetic variation itself. Populations around the world have different genetic make-ups and different histories of exposure to viruses and bacteria. Not every immune system will respond the same way to the same pathogen, says David Relman, an infectious-disease researcher at Stanford University.

But the Duke team says this isn’t a fatal flaw. The patient population they used to develop their gene-based diagnostic test came from widely diverse ethnic backgrounds. And although human populations vary, many different animal species tend to respond similarly to infections, argues Ephraim Tsalik, a physician-scientist on the Duke team. “In fact, we can use our gene-expression signatures to make the same discriminations in mice and baboons,” he said. So relatively minor differences between human populations may not pose a significant problem.

The larger challenge, the researchers say, is to transform this research into a tool that can be used in the clinic. A test focusing on the activity of 120 relevant genes might be affordable, but speed could be a bigger hurdle.  Measuring the mRNA profile of a patient takes days in the research environment—not the minutes or even hours that would make a test clinically viable. Most current gene-expression tests are used in cancer treatment, where an immediate result isn’t crucial. “With somebody coming in with an infection, you can’t wait a couple of weeks,” Tsalik says. “You need an answer quickly, ideally within an hour.”

The Duke team is now working with industry partners to develop a test that can measure the 120 genes in its assay in a more useful time frame. If an accurate diagnosis could happen in an hour or less, “that’s revolutionary,” says Chris Woods, a researcher on the Duke team. “That changes how we deal with patients altogether.”