According to the lore of modern-day movies about teenage angst, the age at which you lose your virginity has to do with a lot of complicated external stuff. Your looks. Popularity. Clothes. School culture. Peer pressure. Religion. Economic background. How overprotective your mother is.

While scientists generally agree that all these forces probably play a role, a team of researchers reported this week in Nature Genetics that the timing of this rite of passage to adulthood may not be as much a matter of free choice as we might think. It might, to some extent, be pre-programmed into your DNA.

In what is believed to be the first and largest study of its kind, researchers from the University of Cambridge and elsewhere analyzed data for 125,000 men and women participating in the British Biobank. The national repository contains genetic data and other in-depth personal information for each individual.

They found that there were 38 genetic variants associated with age of first sexual intercourse. They found similar links between DNA and age of puberty and when people had their first child.

"This is hugely important as the timing of these events affects educational achievements as well as physical and mental health," researchers John Perry and Ken Ong from the University of Cambridge wrote in an opinion piece about the study.

Epidemiological studies have shown that having sexual intercourse at an earlier age, for example, appears to be linked to some negative behavioral, educational and health issues later in life. More specifically, these individuals are less likely to get a college degree and more likely to be smokers.

Perry and Ong suggested that roughly 25 percent of the variation in these three milestones may be due to genetic factors. As points of comparison, studies suggest the influence of DNA is about 80 percent for height and as much as 50 percent for intelligence.

The scientists said that the genes they identified could be divided into two categories. One group, as might be expected, is known to be associated with reproductive biology. The second set is more of a surprise: They play a role in brain development and personality. A gene variant more commonly found in those who had their first sexual experience at a young age is CADM2, which has been shown in previous studies to be present among people who consider themselves to be risk-takers. People who lost their virginity at later ages were more likely to have the gene variant MSRA, which has been associated with a characteristic that might be a turn-off for potential mates — irritability.

The researchers described a push-and-pull effect between genes that correspond to "stimulus-seeking behavior" or taking risks and those that convey "moderating traits such as intelligence and neuroticism."

They confirmed similar associations in two other large databases — one based in Iceland with 240,000 men and women, and another in the United States with 20,000 women of European ancestry.

The following graphic shows the 38 gene variants that appear to influence age of first sexual intercourse and how they are linked to 15 other behavioral, reproductive and health traits. There are nine that are particularly significant, and they are marked with asterisks.

Take a look at CADM2 which was found more often in people who had their first sexual experience at a younger age. It's positively associated with alcohol intake, smoking, having a higher number of children and a high number of lifetime sexual partners.

Of course, this study is just a statistical analysis despite the significant size of its data, so there's no way to know whether these genes actually cause the behaviors at certain ages, much less how this timing might work in the body. Indeed, while geneticist Joel Hirschhorn at Boston Children’s Hospital was generally positive about the study to Scientific American he thinks the authors may have overreached in "the association they saw between genes involved in puberty and those involved in impulsivity and crankiness means these traits also play a causal role in the timing of sexual activities."

“It might not be direct cause and effect,” he said.

Former National Institutes of Health researcher Mary Hediger told the Verge that this "kind of biological determinism makes me a bit uncomfortable."

"It sort of gives you the impression — and a lot of these genetics studies sort of do that — that you’re more your biology than you are a product of your environment," she said. "You don’t want to give the impression that you’re doomed, your biology dooms you."

Like our Health & Wellness page on Facebook for more science news about the ins and outs of the human body and mind, essays and advice. You can sign up here for our newsletter.

Read more: