After comparing differences in the DNA of just under half a million people, an international team of scientists has concluded it's impossible to predict a person's sexual preference based on their genes.

That doesn't mean our unique combinations of genetic codes aren't involved in the development of our sexuality. But if you were hoping for a simple explanation for why many of us are attracted to members of the same sex, it's time to move on.

For decades, biologists have hunted for some kind of 'gay gene' signature that might help better explain our innate sexual predilections.

While we've abandoned the idea that a single gene might be solely responsible for our passions, studies on families and twins have provided tantalising signs that our DNA might at least lay out the groundwork for our attractions.

Unfortunately many of those studies have been based on unconvincing sample sizes, or haven't met current standards of genome-wide studies to be significant.

So researchers pooled data on 477,522 records from the UK Biobank and the genetic reporting service 23andMe to identify sequences common to people who could be classed as either heterosexual or non-heterosexual.

The team based their results on a measure of whether or not an individual had ever had sex with a person of the same sex, which in the case of the UK Biobank was 4.1 percent of males and 2.8 percent of females.

Our sexual preferences don't always fall neatly into boxes, of course. That said, given the constraints of these kinds of surveys, it's not unreasonable to treat human sexuality as more categorical than a smooth continuum, at least for statistical purposes.

An analysis of whole genomes between these two groups revealed five locations on our chromosomes that are significantly associated with same-sex sexual behaviours. Thousands of other sequences were also implicated to a lesser extent.

Some of those flagged genes have already been linked with biological functions such as hormonal pathways or ovulation, making it all too tempting to treat those variations as the kinds of genes that predispose us to a specific sexuality.

But we do need to put it all into context: On closer inspection, aggregates of such sequences accounted for just 8 to 25 percent of the contrast in sexuality. More importantly, combinations of these genes couldn't be used to predict any individual's sexual behaviour.

That doesn't mean such genes can't play a role in our biology. In fact, it's hoped that identifying these sequences might help inform future research into social behaviours.

What it does mean is we're a long way off being able to pin down the odds of your sexuality based on combinations of genes you happen to possess. In what should come as little surprise by now, sexuality is a hugely complex behaviour that emerges from the interplay of different genes

Based on the researcher's findings, these specific clusters also happen to differ between the sexes. While many shared conditions and behaviours have a relatively high amount of overlap in the associated genes between men and women, there's relatively little similarity when it comes to the genetic architecture of sexuality.

The team also compared the sequences associated with sexuality with 28 other traits previously linked with non-heterosexual activity, including mental health conditions such as anxiety and more physical characteristics, such as height and birth weight.

None of the physical characteristics stood out, but a handful of mental health and personality traits – such as anxiety, and loneliness – showed a small but significant genetic correlation.

The researchers are quick to point out that culture might have a lot to answer for when it comes to challenges to mental health.

"We emphasise that the causal processes underlying these genetic correlations are unclear and could be generated by environmental factors relating to prejudice against individuals engaging in same-sex sexual behaviour, among other possibilities," the team writes.

This very prejudice has also plagued the history of searching for links between the hard wiring of our biology and our sexuality, framing sexual and gender diversity as a disease to be cured or shunned.

Times are changing, and so is the science.

Sorting the rainbow of genes that plays a role in our sexual interests is no longer about trying to find simple explanations for 'aberrant' behaviours, but rather better understanding how the evolution of such a complex array of sexualities makes us all so very human.

"We wish to make it clear that our results overwhelmingly point toward the richness and diversity of human sexuality," the researchers write.

This research was published in Science.