>>23857409There are two genes involved in human sex - Dmrt1, and FOXL2.
Before we go any further, let's establish that genes can't be turned 'off.' Every one of them is on throughout your entire life.
Dmrt1 contains a protein which, when produced in large quantities, produces a male. This protein is produced in these quantities by first replicating Dmrt1 so that you now have two copies of Dmrt1 - than, you form all your genes (Including one of the copies of Dmrt1) into a complete set of chromosomes again.
The extra copy of Dmrt1 is copied again and again in the nucleus, and it exits the nucleus and finds ribosomes, which further replicate the protein. Soon, you have tons of the protein, and the cell begins to leak it into the surrounding extracellular matrix - which is the collection of non-cellular proteins that compose what you call your body. Your cells are invisible - you're only seeing the results of their protein secretions.
A male body is produced by lots of Dmrt1 - a female body is produced by lots of FOXL2;
>https://web.archive.org/web/20150203043513/http://umnews.ur.umn.edu/news/features/2011/UR_CONTENT_346326.html>"If Sertoli cells lose the Dmrt1 gene, you get an avalanche of feminization," Zarkower observes. If, say, an environmental toxin should disable the gene in an adult man, the research predicts that cells of the testes would become more female, but outward appearances wouldn't changeThis is how XY females work - the ones have give birth. As well, this is how a true sex change would work;
>http://www.news.com.au/lifestyle/health/womb-transplants-coming-to-australia-in-2016-to-deliver-the-chance-of-a-pregnancy-to-women-without-a-womb/story-fneuz9ev-1227146047542>"While you could probably engineer to bring a (male) pregnancy to full term you would have to make fundamental changes to a man. The man would have to have the hormonal nature of a woman," he said.Other animals do this all the time - this is evolution.