Homosexuality is only partly genetic with sexuality mostly based on environmental and social factors, scientists believe.
A study found that, while gay men shared similar genetic make-up, it only accounted for 40pc of the chance of a man being homosexual.
But scientists say it could still be possible to develop a test to find out if a baby was more likely to be gay.
In the most comprehensive study of its kind, Dr Michael Bailey, of Northwestern University, has been studying 400 sets of twins to determine if some men are genetically predisposed to being gay.
The study found that gay men shared genetic signatures on part of the X chromosome - Xq28.
Dr Bailey said: “Sexual orientation has nothing to do with choice. Our findings suggest there may be genes at play – we found evidence for two sets that affect whether a man is gay or straight.
“But it is not completely determinative; there are certainly other environmental factors involved. “The study shows that there are genes involved in male sexual orientation.
“Although this could one day lead to a pre-natal test for male sexual orientation, it would not be very accurate, as there are other factors that can influence the outcome.”
Dr Alan Sanders, associate Professor of Psychiatry at Northwestern University, who led the study said that it was it was an 'oversimplification’ to suggest there was a 'gay gene.’
“We don’t think genetics is the whole story. It’s not. We have a gene that contributes to homosexuality but you could say it is linked to heterosexuality. It is the variation.”
The study builds on work by Dr Dean Hamer from the US National Cancer Institute in 1993 who also found an area of the x chromosome that he believed was linked to male sexual orientation.
Last year Canadian scientists found that the more older male siblings a man has, the greater change he will be gay.
They believe that the immune response produced by a pregnant mother increases with each son, increasing the odds of producing more feminine traits in the developing brain of the foetus.
Each older brother raised the odds that a man was homosexual by one third.
Researchers at the University of California believe that homosexuality can be explained by the presence of epi-marks — temporary switches that control how our genes are expressed during gestation and after birth.
Daryl Bem, a social psychologist at Cornell University, has suggested that the influence of biological factors on sexual orientation may be mediated by experiences in childhood. A child’s temperament predisposes the child to prefer certain activities over others.
Interestingly no similar genes have been discovered which influence female homosexuality.
“No-body has found something like this in women,” he added.
Dr Bailey said environmental factors were likely to have the biggest impact on homosexuality.
He added: “Don’t confuse “environmental” with “socially acquired.” Environment means anything that is not in our DNA at birth, and that includes a lot of stuff that is not social.”
Richard Lane, of Stonewall, said that while studies into the origins of homosexuality have yet to produce firm evidence, they do to point to a biological root.
He said: 'The thing that’s consistent across all of them is that they all point to sexual orientation being something fundamental to a person rather than the lifestyle choice some opponents of equality repeatedly suggest.’