Suspicions that genes play a part in peanut allergy have been confirmed in a study that says environmental factors may contribute to the problem.
Researchers in the United States compared the genomes of more than 1300 children of European ancestry, most of whom had some kind of food allergy, to those of their biological parents.
The team found no genetic variants to explain allergies to eggs or cow's milk.
They did, however, find that tell-tale variants in two genes, HLA-DQ and HLA-DR, located on Chromosome 6, accounted for about 20 per cent of children with peanut intolerance.
"We always suspected it, but this is the first genome-wide association study that identified a genetic link," said Xiaobin Wang, a professor at the Johns Hopkins Bloomberg School of Public Health in Baltimore, Maryland.
In the United States, about one child in 13 has a food allergy, of which the most common by far is to peanuts, according to the study published in the journal Nature Communications.
The problem ranges in scale from a lifestyle hassle to life-threatening.
Those with a severe allergy live in constant fear of accidental exposure to peanuts.
"Over the past 20 years, FA (food allergy) has grown from a relatively uncommon to a major clinical and public health problem worldwide, due to its increasing prevalence, potential fatality and enormous medical and economic impact," the study said.
"FA accounts for more than $US20 billion ($A25.65 billion) in overall annual healthcare costs in the United States."
The investigation marks a first step towards a fuller picture of genetic causes for food allergies, something that would help doctors identify children at risk.
The researchers added there could also be non-genetic factors.
Not everyone with the HLA-DR and HLA-DQ mutations develops peanut allergy, they found.
It could mean other culprits are epigenomes -- the chemical switches which help turn genes on and off and which can be influenced by environmental factors, such as food, tobacco smoke, toxic substances and uterine fluid.
On Monday, a paper in the New England Journal of Medicine found that most children at high risk from peanut allergies - determined by pre-existing eczema or egg allergy -- were protected if they ate peanuts frequently, starting within the first few months of life.