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.
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.