Our genes may play an important role in determining our choices of friends, according to a recent Yale study.

The paper, co-authored by Yale social and natural science professor Nicholas Christakis 84, showed that people tend to share more DNA with friends than with strangers. In particular, the researchers determined that friends share approximately one percent of their genetic variants, making them as biologically similar as fourth cousins.

“One thing we had not tackled [in previous studies] was the origin of homophily, or ‘birds of a feather flock together,’” Christakis said. “Why do people generally prefer the company of people they resemble?”

The researchers compared the genomes of 1,932 subjects with the genomes of friends and strangers to determine a “kinship coefficient, a measure of the probability that the two individuals share any given gene. The study is the first of its kind to compare whole genomes between friends, Christakis said.

The genes most commonly shared between friends included genes responsible for sense of smell and certain metabolic pathways. On the other hand, genes responsible for immunity tended to be different between friends.

The results could be relevant to future studies in evolution, Christakis said. In the study, the researchers suggest that being surrounded by friends with immunity toward different pathogens may prevent the spread of a wider variety of pathogens in the shared environment.

“Choosing the right friends can also affect your prospects for survival,” Christakis said. “We think this fact must have played a role in evolution.

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