A new book on compatibility genes suggests that you can "sniff out" your perfect partner, so to speak, due to a small number of genes that play a role role in how attractive you find a potential partner based on their smell, according to the Guardian.

Daniel M. Davis's new book, "The Compatibility Gene," is based on the famous and controversial research by zoologist Claus Wedekind, who in 1994, split male and female college students into two groups based on gender. He asked the men to wear t-shirts for two nights and to avoid anything that may mask their natural scent (such as cologne or alcohol). After the two nights were up, Wedekind placed the shirts in boxes with holes in them and asked the female participants to rank the boxes based on smell using the following criteria: intensity, pleasantness and sexiness.

Wedekind found that the women overall preferred the boxes containing t-shirts worn by men with different compatibility genes from themselves, "raising the possibility that we unconsciously select mates who would put our offspring at some genetic advantage," according to the Guardian. The experiment was controversial, but changed the way many scientists thought about mate selection, including Davis.

"My research is in developing microscopes that look with better resolution at immune cells and how they interact with other cells," Davis told the Guardian. As for how our ability to sniff out these genes come into play, Davis admitted that "how it works on the olfactory level is basically not understood at all," and the ability may date back to before humans even existed, favored by evolution and coincidentally passed down to us from our distant mouse ancestors.  

Histocompatibility genes aren't called "compatible" because they help you find a partner. Instead, their intended role is to fight infection, as they are part of your immune system, providing a kind of signature to your tissue on a molecular level.

"There is evidence that [histocompatibility genes] can influence how our brains are wired, how attractive we are, even how likely we are to reproduce," Davis said. 

Essentially, when you smell someone attractive to you, you are likely smelling someone with human leukocyte antigens (HLA) molecules that you don't have, molecules which will be beneficial for your offspring, a kind of optimal genetic code.

Although we share most of our around 25,000 genes with one another, our compatibility genes vary much like eye or hair color, and can influence who we choose as a partner on a subsconscious level.