A simple spit test could identify thousands of children with severe asthma who are taking medication which will never help them, scientists say.
One in seven people will not respond to salmeterol, found in purple or green inhalers, which is given to tens of thousands of children in the UK.
A study of 62 children showed those patients could be identified and given effective treatment.
The results were published in the journal Clinical Science.
Salmeterol, which is found in Seretide and Servent inhalers, is used to relax the airways in the lungs. It is taken by children who cannot control their asthma just with a blue inhaler, which is given to all children when they are diagnosed with asthma.
The reason why some children do not respond to salmeterol is hidden in their genetic code. The drug acts on beta-2 receptors in the airways, however, one in seven people have a genetic mutation resulting in their receptors being a slightly different shape, which the drug struggles to recognise.
DNA taken from a child's spit can be tested to reveal the shape of their beta-2 receptor and whether salmeterol will work.
The study, by the Brighton and Sussex Medical School and the University of Dundee, looked at 62 children with the mutation.
Half were given salmeterol and the other half were given an alternative asthma drug, montelukast.
The researchers said the difference was "pretty striking" as symptoms improved and children had less time off school.
Prof Somnath Mukhopadhyay said: "For almost every clinical outcome we were looking at we found that salmeterol either wasn't working or was working very poorly. Montelukast was very much better.
"We've shown for the first time that personalised medicine can work in the field of childhood asthma."
He said the test, which is not yet available for use in GPs surgeries, would cost about £15 and that it was "unacceptable" to give children drugs which did not work.
Prof Mukhopadhyay added: "It's a common disease affecting a million children in this country, a common medicine is probably not working in a significant proportion of the population.
"I think we need to get some guidance from lead charities and from the Department of Health."
The exact number of children who have the mutation and are taking the drug is unknown, but could be up to 15,000 in the UK.
Responding to the study, Malayka Rahman from the charity Asthma UK said the results were "really encouraging" but more research was needed before a decision could be made on introducing such a test.
"This exciting area of research has the potential to lead to the tailoring of better treatments for an individual based on their own genetic make-up; ultimately keeping more people out of hospital and preventing unnecessary asthma deaths in the long-term."
The Department of Health welcomed the research and said looking at genes may one day be used to tailor treatments. However, a spokesperson said more work still needed to be done before that stage was reached.
Anna Murphy, consultant pharmacist and Royal Pharmaceutical Society spokesperson, said: "The study itself was designed to prove that a child's genetic make-up can have an impact on the effectiveness of treatment rather than to advise on the specific treatments we use for children with asthma.
"Therefore it would not be responsible to change prescribing practice at this time."
She said parents who were concerned should speak to their pharmacist or doctor.
Prof Stephen Holgate, from the University of Southampton, said the results were "impressive" and were a "wonderful example" of personalised medicine getting closer to the GPs surgeries.
"The gene-based test is not yet available to doctors, but should become so if larger trials are equally positive."
--Courtesy of BBC News