I’m not going to try to re-phrase this article about how ovaries/testicles are determined by a single gene. Better you read it from the source:
As embryos, our gonads aren’t specific to either gender. Their default course is a female one, but they can be diverted through the action of a gene called SRY that sits on the Y chromosome. SRY activates another gene called Sox9, which sets off a chain reaction of flicked genetic switches. The result is that premature gonads develop into testes. Without SRY or Sox9, you get ovaries instead.
But Henriette Uhlenhaut from the European Molecular Biology Laboratory has found that this story is woefully incomplete. Maleness isn’t just forced onto developing gonads by the actions of SRY – it’s permanently kept at bay by another gene called FOXL2.
Uhlenhaut developed a strain of genetically engineered mice, whose copies of FOXL2 could be deleted with the drug tamoxifen. When she did this, she found that the females’ ovaries turned into testes within just three weeks. The change was a thorough one; the altered organs were testes right down to the structure of their cells and their portfolio of active genes. They developed testosterone-secreting Leydig cells, which pumped out as much of the hormone as their counterparts in XY mice. They only fell short of actually producing sperm.
Uhlenhaut found that FOXL2 and SOX9 are mutually exclusive – when one is active, the other is silent and vice versa. The two genes are at opposite ends of a tug-of-war, with sex as the prize. FOXL2 sticks to a stretch of DNA called TESCO, which controls the activity of Sox9. By sticking to TESCO, FOXL2 keeps Sox9 turned off in the adult ovary. Without its repressive hand, Sox9 switches on and sets about its gender-bending antics.
Uhlenhaut’s work isn’t just of academic interest. It could also help to treat disorders of sexual development. It could also change how gender reassignment therapies are done, paving the way for gene therapies rather than multiple painful surgeries.
Emphasis mine. That is such a goddamned cool idea.