Friends may share more in common than you'd think.

People may unsuspectingly choose friends who have some DNA sequences in common with them, a new analysis finds.

Researchers compared gene variations between nearly 2,000 people who were not biologically related, and found that friends had more gene variations in common than strangers.

The study lends a possible scientific backing for the well-worn clichés, "We're just like family," or "Friends are the family you choose," the researchers said.

"Humans are unique in that we create long-term connections with people of our species," said Nicholas Christakis, a social scientist at Yale University involved in the study. "Why do we do that? Why do we make friends? Not only that, we prefer the company of people we resemble."

The researchers did the study because they wanted "to provide a deep evolutionary account of the origins and significance of friendship," Christakis said.

The new study is based on data from the Framingham Heart Study, which is a large, ongoing study looking at heart disease risk factors in the people living in one town: Framingham, Massachusetts. The researchers looked at data on people's DNA, as well as who was friends with whom.

After analyzing almost 1.5 million markers of gene variations, the researchers found that pairs of friends had the same level of genetic relation as people did with a fourth cousin, or a great-great-great grandfather, which translates to about 1 percent of the human genome.

The most common gene shared by friends was the "olfactory" gene, which is involved in a person's sense of smell.

Although 1 percent may not sound like much, Christakis said in a statement, "to geneticists it is a significant number.

He said, "Most people don't even know who their fourth cousins are, yet we are somehow, among a myriad of possibilities, managing to select as friends the people who resemble our kin."

The findings suggest that choosing friends who share similar genes is a behavior that may have contributed to human evolution, the researchers said.

"Imagine you're the first person on the planet to evolve the capacity to speak," Christakis told Live Science. "Do you think that mutation would increase your Darwinian evolution? No. Because you would have no one to speak to."

The usefulness of a speech gene would depend on whether a friend shared the same gene, Christakis said. In other words, there's an advantage to people's genes evolving in relation to those of their friends.

The researchers acknowledged some caveats to their conclusions. For example, it may be that people form friendships with those of the same ethnicities, they said. But to take this into account, the researchers studied participants from a homogenous group of people, from a Caucasian background.

The researchers compared pairs of strangers within this population as well as friends, using a "friendship score," which predicts whether two people could be friends based on their genetic background.

"What we're reporting is the difference between people who are friends, and people who could be friends, all from the same ancestry," said study researcher James Fowler, a professor of medical genetics at the University of California, San Diego.

The study was published today (July 14) in the journal Proceedings of the National Academy of Sciences.

Follow Jillian Rose Lim @jillroselim & Google+. Follow us @livescience, Facebook & Google+. Original article on Live Science.