When it comes to immunity, the environment you grow up in, or how you were 'nurtured', is more important than nature, a new study suggests. Particularly as you get older. 

Researchers from the Stanford University School of Medicine in the US analysed pairs of twins who were either 100 percent genetically identical, or fraternal twins, who only share on average 50 percent of their genes.

As all the twins grew up in the same environment, this allowed them to determine the role genes played in shaping their immune system.

"What we found was that in most cases, including the reaction to a standard influenza vaccine and other types of immune responsiveness, there is little or no genetic influence at work, and most likely the environment and your exposure to innumerable microbes is the major driver," said the study's leader and microbiologist, Mark Davis, in a press release.

This is in contrast with a lot of current research, which is focussing on determining people's predisposition to certain diseases based on the genes they're born with.

"The idea in some circles has been that if you sequence someone's genome, you can tell what diseases they're going to have 50 years later," said Davis. And while genetics clearly play a role in some diseases, he explains that their results show that the immune system is tremendously adaptable in response to the environment, particularly in our first 20 years of life.

To work this out, his team looked at 78 pairs of identical or monozygotic twins, and 27 pairs of dizygotic, or fraternal twins, all of which grew up in the same womb and home environment. The researchers took blood from the twins on three separate visits, and then examined these samples to measure more than 200 compounds that reflect the strength of the immune system. 

What they found was that environmental factors, such as how often participants had been exposed to toxins and bacteria, their diet, dental hygiene and how often they'd been vaccinated, and not genetics, could explain three quarters of the immune system differences seen between twins.

The environmental impact on immunity was also more pronounced in identical twins aged over 60, compared to those who were under 20.

Interestingly, the team also looked at how many antibodies the twins' immune systems produced in response to the flu vaccine, and found that environmental factors determined how well an individual twin would respond - not their genes. This contradicts previous studies which suggest that genetics play a major role in how someone's immune system reacts to a vaccine. 

While the study didn't identify which environmental factors were best for a healthy immune system, one of the biggest environmental factors that caused immune differences was the presence of cytomegalovirus - a harmless chronic infection that around three in five people in the US carry. 

In the study, 16 out of the 27 pairs of identical twins contained only one twin who had been infected by the virus, and in these cases, the researchers found that exposure to the virus alone could explain more than half the immune system differences between the siblings. The results have been published in the journal Cell.

While genetics obviously do play a part in our future health, this is hopeful news for parents who want to raise children with strong immune systems.

"At least for the first 20 or so years of your life, when your immune system is maturing, this amazing system appears able to adapt to wildly different environmental conditions. A healthy human immune system continually adapts to its encounters with hostile pathogens, friendly gut microbes, nutritional components and more, overshadowing the influences of most heritable factors," said Davis in the release.