The debate between nature and nurture continues – but chalk up this latest finding as a win for nature.

According to results from a new study, our genes may have some say in who we choose as friends, which can in turn impact later life choices, Time.com reported.

With certain genes, we prefer people who are more similar to us, but with others, we prefer those who are different.

For example, if people have a certain variant of the gene DRD2, they will be attracted to other people who have a similar variant. DRD2 is involved in producing a dopamine receptor, and the variant is linked with an increased risk of alcoholism.

Another way to think about it is, “If I'm more impulsive, I might choose to be with friends with others who are more impulsive,” according to lead author James Fowler, professor of medical genetics and political science at the University of California-San Diego. Also, people who are more impulsive may frequent certain places, like bars or amusement parks, where they may meet and befriend like-minded people.

Meanwhile, another gene that affects how the liver metabolizes foods and drugs and is linked with openness to experience, shows the opposite pattern. Here, people prefer the friendship of others who have a version of the gene that is different from theirs.

This makes sense from an evolutionary standpoint, according to previous research, which suggests that people tend to choose mates who have versions of certain immune system genes which are different from their own, in order to increase the likelihood that offspring will have an immune system equipped to fight a variety of diseases.

The study found correlations between the two specific genes and the likelihood of individuals being friends by using two large databases, the National Longitudinal Study of Adolescent Health and the Framingham Heart Study. Researchers controlled for other factors that may account for friendship, such as people who live in the same region as each other.

The study was published in the Proceedings of the National Academy of Sciences.

Click here to read more from Time.com.