The situation is similar for people with anxiety, ADHD, and other mental-health ailments.

Several companies are trying to change that by applying reams of data and, in some cases, genetic testing, to mental-health conditions. The goal is for psychiatrists to be able to test patients and find medications that are more likely to work well right away.

“Psychiatry remains the only discipline of medicine that has no test to predict treatment response,” said Evian Gordon, the founder of one such company, Brain Resource. “This is providing, for the first time, an objective step as to which drug might be responsive.”

These start-ups represent the medical world’s increased interest in so-called “personalized medicine.” Many doctors and health-policy experts are eager to find treatments that will work best for specific patients rather than rely on what’s worked on the average patient in the past. Genetic tests already help guide treatment for some cancers and rarer conditions like cystic fibrosis. The White House recently launched a precision-medicine initiative that will aim to uncover more specific cures, in part through gene testing.

But some experts say that genetic testing for psychiatric conditions still has a long way to go.

A Tennessee-based company called Harmonyx, for example, introduced a test this year that examines mutations on four different genes that, it claims, determine the body’s compatibility with several popular ADHD medications.

When a patient presents a pharmacy with a prescription for a given ADHD drug, the pharmacist could order a Harmonyx $89 cheek-swab test that, in as little as 24 hours, would suggest the patient will respond best to one of several popular ADHD medications, including Adderall, Vyvanse, Ritalin, Strattera, and Dexedrine. (Genetic tests like Harmonyx are already allowed by law).

But specialists I interviewed said that while both Brain Resource and Harmonyx are promising, they don’t necessarily represent an improvement over the existing process for choosing depression and ADHD drugs.

James McGough, a child psychiatrist at UCLA medical center, says that while there is some guesswork involved in choosing the right ADHD medication, doctors are also limited by unrelated factors, like insurance coverage and whether the child is old enough to swallow pills. What’s more, it only takes about two weeks to determine whether a given ADHD drug will work at a given dose—much less time than for antidepressants. “You have to weigh that against the price of the test. Is it really going to make you so much better off?” he said.

According to McGough, it’s a stretch to say that any mental-health condition, or responses to psychiatric medications, are controlled only by genes—especially just four of them. “It’s not like having blue eyes or brown eyes,” he said. “Psychiatric disorders are likely caused by a whole array of genes in combination with environmental and other factors.”