Rapid genomic tests are poised to change the way doctors diagnose and treat infections, but their cost may limit widespread use.

Ryan Springer’s mystery illness began last summer with a dull ache in his chest. Over the next few days, the symptoms grew more alarming: sharp pain with every breath, a rapid heartbeat and a spiking fever.

Emergency room doctors at Carle Foundation Hospital in Urbana, Ill., were stumped. They ordered up a lung biopsy and started Mr. Springer, 47, on a broad-spectrum antibiotic. But his condition worsened, and doctors feared he might not survive the five or more days it would take to get the lab results back.

There was one more option: a new genomic test that can offer much faster results by rapidly sorting through the DNA in a blood sample and picking out the pathogen most likely making a patient sick. It is part of a rapidly growing new generation of lab tests under development that could revolutionize the way doctors diagnose and treat infections.

The usual method, based on growing and analyzing germ cultures in a lab, has barely changed since the 1880s, when Julius Petri came up with a way to grow germs in a gelatinous bed of algae set between two nesting discs of glass.

More from The New York Times here.