Disorders of sexual development (DSD) are conditions with an atypical chromosomal, gonadal or phenotypic sex, which leads to differences in the development of the urogenital tract and different clinical phenotypes. Some genes have been implicated in the sex development during gonadal and functional differentiation where the maintenance of the somatic sex of the gonad as either male or female is achieved by suppression of the alternate route. The diagnosis of DSD requires a structured approach, involving a multidisciplinary team and different molecular techniques. We discuss the dimorphic genes and the specific pathways involved in gonadal differentiation, as well as new techniques for genetic analysis and their diagnostic value including epigenetic mechanisms, expanding the evidence in the diagnostic approach of individuals with DSD to increase knowledge of the etiology.
Phenotypic sex is the result of the differentiation of internal ducts and external genitalia under the function of the hormones of the differentiated gonad, this occurs once the gonad abandons its bipotential state under the influence of sex-determining genes . Disorders of sexual development (DSD) were defined in the Chicago Consensus, 2006 as congenital conditions in which the development of chromosomal, gonadal and anatomical sex is atypical . The term has positive aspects such as accuracy within the medical context, as well as avoid confusion by not overlapping with conditions such as transgender, gender dysphoria and homosexuality. However, negative connotations of DSD perceived by patients include the stigma of “disorder” and the perceived implications of “sex” involving sexual behavior . The clinical classification in patients is difficult because the phenotypes are similar or almost identical and may have several etiologies [4,5]. Due to the lack of clarity of the term, there is no certainty of the incidence of the conditions included. It has been estimated that its individual incidence is approximately 1 in 4,500-5,500 newborns  and when considering all genital congenital anomalies, including cryptorchidism and hypospadias, the incidence can be from 1:200 to 1:300 . The incidence of DSD in 46,XY individuals has been estimated in 1 in 20,000 births and the global incidence of DSD in 46,XX individuals (mainly congenital adrenal hyperplasia) is 1 in 14,000-15,000 live births , which varies by region due to differences in the frequency of pathogenic variants. Congenital adrenal hyperplasia and mixed gonadal dysgenesis constitute half of all patients with DSD which clinically present with genital ambiguity .
These conditions can be identified at different times of life, in fetuses or newborns with ambiguous external genitalia, gonadal dysgenesis and internal genitalia that are discordant for the constitution of sexual chromosomes, also can be subsequently diagnosed in individuals with late puberty, unexpected virilization or gynecomastia, infertility or gonadal tumors. Occasionally, DSD may be part of a genetic syndrome, demonstrating the complexity of sexual development and the effect of multiple genes.
In recent years, research in DSD has focused on the identification of genetic variants that lead to the atypical development of sex through different techniques. However, sequencing, deletion and duplication analysis have identified causality in near of 50% of cases [10,11]. It is likely that this diagnostic gap exists due to inadequate knowledge of the pathogenesis and underlying mechanisms of DSD, variation in evaluation and phenotypic description, and limited awareness of the value of molecular genetic diagnosis to guide management and treatment of the individual.
The challenges facing the genetics of DSD include the development of a diagnostic algorithm that integrates various technologies (including transcriptomics, epigenomics, proteomics and metabolomics), so that the etiology of the entity can be established. This review will discuss basic concepts of DSD and the advances in the diagnostic approach of this entity.
Classification of DSD
DSD are classified according to the alterations in the levels of sex designation: gene sex, chromosomal sex, gonadal sex, hormonal sex, ductal sex, external genitalia, secondary characters, legal assigned sex and psychological characteristics . However, clinical management is carried out in accordance with the classification proposed by the Pediatric Endocrinology Society Lawson Wilkins and the European Society of Pediatric Endocrinology (Table 1) as follows: 1) DSD sex chromosomes, 2) DSD 46,XX and 3) DSD 46,XY. Despite the classification some conditions do not fit exactly into a specific diagnostic category or may belong to more than one category .
Sexual determination is the result of molecular events that direct the undifferentiated bipotential gonad to the development of the testis or ovary. The bipotential gonad is developed from the urogenital crest, between weeks 6 to 7 of fetal life, when there are 2 sets of internal ducts: Müllerian ducts and Wolffian ducts [13,14]. During the bipotential stage, several genes (WT1, DAX1, SF-1, LHX9, LIM1, PAX2, GATA4, EMX2, WNT4) are expressed in the gonadal crests XY and XX. The function of protein products of these genes, gene dosage and the resulting levels of gene expression determine gonadal differentiation [15,16,17], in response to the activation of the testis-specific or ovary-specific pathway with parallel repression of the opposite pathway. The genitalia external to this age present a genital tubercle, genital folds, urethral folds and a urogenital orifice.
Several genes upstream of SRY not sex-specific are early expressed in the gonadal and are essential for sexual development; in fact, absence of some of these genes leads to sex reversal . There is evidence in animal models of pregonadal sexual differentiation independent of determination by SRY expression. The results of analysis in vitro of fertilized embryos show early evidence of sexual dimorphism. Yadav et al.  found that the first embryos performing the one-cell division were significantly more likely to be male than female, being XY mouse embryos fastest in cell division than XX embryos, the findings have already been confirmed in humans  and it is associated with the paternal X chromosome that has a retarding effect in post implantation embryos .
Some factors also have a work early in the development, as have been demonstrated to the insulin receptor in the male sexual differentiation , required to gonadal proliferation before SRY expression.
Later, 2 proteins that play a major role in the development of the bipotential gonad are the nuclear receptor SF-1 (also known as NR5A1) and the Wilms tumor suppressor (WT1). The steroidogenic factor 1 (SF-1) is important for the synthesis of adrenal and gonadal steroids and it is expressed in the bipotential gonad of both sexes.
Its expression continues in the developing testes, but it is repressed in the ovary, which hypothetically linked the expression of SRY with that of the antimüllerian hormone (AMH) . The WT1 gene encodes a necessary transcription factor for mesenchymal-epithelial interactions and secondary development of the bipotential gonad (interactions between Sertoli cells and Leydig cells) .
Other genes implicated in gonadal differentiation, with transcripts present in the urogenital ridges are DMRT1, PAX2, LHX9. Pathogenic variants in these genes does not form a gonad because the somatic cells of the genital ridge fail to proliferate despite normal germ cell migration . Other genes of gonadal differentiation include SOX3, SOX9, FGF9 and PGD2 which have more testicular-promoting activity [26,27,28]. The DAX1, WNT4, FOXL2, RSPO1 and β-catenin genes are predominantly ovarian promoters [16,29,30,31].
Male differentiation is a 2-step process , determined by: 1) testis formation from primitive gonad through various transcription factors known as sex determination, and 2) differentiation of internal and external genitalia by action of hormones secreted by the fetal testicle know as sex differentiation, which include the action of AMH secreted by Sertoli cells, androgens and insulin-like factor-3 secreted by Leydig cells.
Testicular formation depends on SRY, a gene that encodes a sufficient and necessary transcription factor to induce testicular development. After translation, the SRY protein translocate to the nucleus and binds to the enhancer region of SOX9, to intervene in the differentiation and proliferation of Sertoli cells and the tubular organization of the testis [33,34] (Fig. 1). Pathogenic variant or loss of SRY gene function result in male to female sexual reversion or in coexistence of ovarian and testicular tissues . Being the most of pathogenic variants detected in the SRY gene localized in the DNA binding domain . Similarly, SRY expression in XX individuals by chromosomal translocation has been reported to account for 10% of female to male sex reversals and that pathogenic variants in the SRY gene are responsible for 15% of cases of gonadal dysgenesis in 46,XY individuals . Failure of SRY expression can also be caused by pathogenic variant in genes involved in chromatin structure, like polycomb complexes, which help to maintain the undifferentiated state of embryonic stem cells by inhibiting the expression of many genes , or genes proposed to alter SRY expression as GATA4 and its partner FOG2 . When alterations occur at the gonadal level, it causes anatomic, physiological and functional defects of the gonad as complete gonadal dysgenesis or mixed gonadal dysgenesis .
Gene targets of SRY are SOX9, CBLN4, and ER71/ ETV2; being perhaps the most important target gene SOX9. Activation of SOX9 is produced by the joint action of the SRY and SF-1 proteins on the TESCO region (testicular enhancer specific of Sox 9 core) . Likewise, it has been established that the SOX9 protein can bind to its own promoter, modulating its own expression . Although the relationship between SRY and SOX9 is narrow, testicular formation can occur in the absence of SRY, which has been observed in XX men who have duplications and/or translocations of SOX9, as well in XX mice transgenic for SOX9 . Studies related to gene expression showed a decrease in SOX9 protein expression and absence of pathogenic variant in several regions of the gene promoter (TESCO region) in 75 Brazilian patients with karyotype 46,XY and sexual reversion  which may indicate other mechanisms of gene regulation as etiology. Unlike the expression of SRY in the developing gonad which is transient, the expression of SOX9 occurs after its initial induction and remains positive.
Also, belonging to the SOX family, the SOX3 gene, similar in structure and function to the SRY gene (67% nucleotide identity and absence of introns), has transactivating activity and works synergistically with SF-1 for testicular differentiation (Fig. 1). Despite the evidence, the role of SOX3 in sexual determination is still unclear and the available information is only based on animal models . However, it has been shown that SOX3 is expressed in both the XX and XY mouse gonads during the critical period of sexual determination . From this, it has been proposed that SOX3 acts as a repressor of SOX9 expression during female determination and that SRY expression removes SOX9 repression by acting as a SOX3 repressor in male individuals [45,46]. It has been described that one way in which SRY could affect or inhibit SOX3 activity would be by competition for DNA binding sites [47,48]. In male mice, SOX3 has been found to be necessary for the normal formation of the seminiferous tubules and for the normal function of Sertoli cells, supported with the results of SOX3-deficient mice, which exhibit anomalies in testicular histology with small tubules, often fused seminiferous and large vacuoles .
Another gene involved with testicular gonadal development is DAX1 (also known as NR0B1). This gene is located on the X chromosome (p21.3) and encodes for an orphan nuclear receptor. Duplication of doses of this gene (individuals of karyotype XX) has been reported to act by directly inhibiting of SF-1 (transcription factor regulating SOX9) (Fig. 1). In this way, the two functional copies of DAX1 prevent testicular formation . This mechanism was validated in transgenic mice over-expressing DAX1 with XY karyotype and female phenotype, where it was shown that the duplication of this gene was sufficient to block testicular differentiation  despite the chromosomal complement.
Female differentiation occurs once the germ cells enter meiosis, in the absence of SRY [51,52], resulting in the inability of SOX9 expression to reach a critical threshold, along with the expression of signaling factors such as RSPO1, WNT4 and FOXL2 that lead to ovary formation by differentiating precursor cells into granulosa cells and antagonizing testicular formation .
In XX gonads, the WNT4 and RSPO1 signaling factors favor and stabilize expression of the transcription factor CTNNB1 (known as B-catenin), which suppresses SOX9 expression and regulates the transcription of WNT4-dependent genes. Thus, the presence of WNT4 antagonizes the male pathway by interfering with SOX9 expression (Fig. 1) [53,54].
Although SF-1 main factor of the formation of the bipotential gonad remains essential for the differentiation of the testicles, its role in the maintenance of ovarian function also has been documented . Expression of a single copy of the SOX9, SF-1 and WT1 genes, as well as duplication of the DAX1 and WNT4 genes result in 46,XY gonadal dysgenesis [56,57]. While duplication of SOX9 or SOX3 genes may lead to DSD 46,XX testicular [48,58,59].
Male reversion cases in XX individuals with SRY-negative can occur due to pathogenic variant of loss of function in members of the ovarian pro-differentiation pathway or function-gain pathogenic variant in genes that mimic SRY activity .
Epigenetic and DSD
Epigenetics is the study of changes in gene expression not related to alterations in DNA sequence . The main epigenetic mechanisms that regulate gene expression include: DNA methylation, covalent histone modification and the presence of non-coding RNAs. During embryonic development, cells differentiate, acquire and maintain an identity through changes in gene expression, this process is fundamental to determine sex and differentiation.
DNA methylation is an epigenetic mechanism that occurs by transfer of a methyl group (CH3) to carbon at the 5-position of the cytosine ring that occurs in the regulatory genes, as well as in the inter- and intra-genic sequences. This reaction is catalyzed by the family of enzymes DNA methyltransferases (DNMT1, DNMT3A, DNMT3B) . In germ cells of mouse testicular or ovarian development, it has been determined that DNMT3A and DNMT3L are actively involved in maintaining methylation of promoters requiring to be silenced for differentiation .
DNA methylation controls the expression of important genes for sexual differentiation, such as SRY, during gonadal development and X-chromosome inactivation in XX individuals . Genes that regulate sex determination and differentiation have altered their expression in somatic cells, therefore, they are subject to a complex mechanism of regulation of expression. Reports in the literature related to murine gonadal development show that SRY, SOX9, NR5A1, DAX1 and WNT4 genes regulate their expression by methylation of their promoters in different cell contexts including cell differentiation processes of the development of tumor [63,64,65] and in specific cell differentiation spatiotemporal as shown in mouse embryos of 8.5 dpc, in which the SRY gene was not expressed secondary to hypermethylation of 5´-flanking region. However, at 11.5 dpc, this region was hypomethylated specifically in the gonad allowing expression of SRY and remained hypermethylated in tissues that do not express the SRY gene . It is a sample of the possible alteration of genetic expression dependent on the time that can occur during sexual development due to epigenetic modifications.
Hypermethylation of the SRY gene causing abnormal gene expression resulted in the silencing of genes, DMRT1, SOX8, SOX9, NR5A1 and AMH, involved in the DSD XY in dogs. More recently, incomplete demethylation of SRY gene has been suggested to be one of the causes of DSD XY in these dogs .
Recent evidence suggests that histone modifications and chromatin regulation may also play roles in sexual differentiation . Chromatin refers to the packaging of DNA and the modulation regulates the accessibility of the transcriptional machinery, thereby it regulates the activity of regulatory and functional DNA sequences. Covalent histone modifications, nucleosome repositioning and chromatin remodeling are fundamental epigenetic mechanisms to regulate the expression of specific genes and more extensive genomic regions. Specific enzymes (e.g. histone acetyltransferases and histone deacetylase) mediate reversible histone modifications .
Trimethylation of lysine 4 (H3K4me3) constitutes an important H3 modification associated with transcriptional activity, whereas methylation of lysine 9 (H3K9me) has the opposite effect. Tachibana et al.  found that XY mice deficient of the H3K9 demethylating enzyme developed as fertile females. RNA and protein expression analysis, showed that loss of H3K9 demethylation led to a strong downregulation of SRY expression during embryogenesis. Evidencing the role of histone methylation and demethylation on mammalian sex determination.
Recently, Kuroki et al.  reported that an XY mice deficient in JMJD1A exhibits a male-to-female sexual reversion. JMJD1A is an enzyme that demethylates H3K9 (hallmark of transcriptionally silenced heterochromatin). The validation studies of the effect of JMJD1A by microarray, the rescue of the sex reversal phenotype by transgenic mouse and the chromatin immunoprecipitation analysis revealed that JMJD1A specifically contributes to the SRY activation by directly catalyzing H3K9 demethylation.
Another epigenetic mechanism are non-coding RNAs (ncRNAs), functional RNA molecules that are not translated into protein, including long non-codingRNAs (lncRNAs) and microRNA (miRNAs). lncRNAs such as XIST has been implicated in dosage sex compensation in Mus musculus , and some ncRNAs displaying sexually dimorphic expression have been identified . However, the role of these ncRNAs during sex determination and gonadogenesis is at currently unknown and it will have to be characterized in the near future.
Despite the above, in relation to DSD, only DNA methylation analyses have been described in patients with alterations in SRY gene expression, recently in a woman with primary amenorrhea, with karyotype 46,X,inv(Y) in whom methylation studies found higher methylation levels in CpG box located 3 Kbp upstream from the SRY compared to their father .
Approach to DSD
The clinical evaluation of an individual with DSD or atypical genitalia begins with evaluation of vital signs, general physical examination, description of sexual characteristics and detailed evaluation of the perineal area consisting of observation, palpation and measurement, to be described according to Prader's classification  plus a complete clinical history including prenatal and family history  in a multidisciplinary group assessment (endocrinologist, urologist, geneticist, gynecologist, pediatrician, psychologist) to achieve an accurate diagnosis .
An extensive evaluation should be made when it is not possible to assign a sex or when the cytogenetic tests are inconclusive. Biochemical tests are good support for guiding diagnostic suspicion based on gonadal function, these measurements should be interpreted in relation to characteristics of the test and reference of normal values for gestational and chronological age. In some cases, serial measurements or stimulation tests may be necessary .
First-line tests include measurement of 17-hydroxyprogesterone, blood electrolytes, determination of AMH  and gonadotrophin levels, together with a cytogenetic study (karyotype) and an abdominal ultrasound in search of müllerian structures. Additional tests will be dependent on the results of the initial tests to guide the diagnostic suspicion .
The algorithm of the genetic study of DSD is defined according to the results of the sexual chromosomal complement  and fluorescence in situ hybridization analysis for regions of the Y chromosome, considering the percentage of XX individuals with SRY translocation. The next step of evaluation is followed by the study of specific genes involved in the gonadal development (AR, SRY, SF-1, WT1, CYP21, SOX9, DAX-1, 5α- reductase, among others) by traditional molecular research methods including Sanger sequencing combined with multiplex ligand dependent probe amplification  to identify abnormalities in the sequence or dosage of a gene, such as a deletion or duplication of genes [81,82]. Although this genetic approach has generated expectations in clinical practice, results of sequencing and deletion/duplication analyses have identified the etiology of phenotypes in a very limited number of cases [33,83]. Laino et al.  reported etiological diagnosis in 64% of the cases of a cohort of 88 individuals with DSD 46,XY and 46,XX using this diagnostic algorithm.
The hypothesis in relation to the above supposes that many genes causing DSD have not yet been identified or the techniques by which they are studied are insufficient. This is due to the complexity of genetic regulation that allows the functioning of a gene and therefore the expression of a phenotype.
Although pathogenic variant, in most cases, is a process that affects the functionality of a gene, it is important to keep in mind that it is not the only that can alter it. With the discovery of the epigenetics, it is now clear that the mechanisms of transcriptional regulation (DNA methylation, covalent histone modification and the presence of ncRNAs, among others) can alter the expression of a gene, acting as true biological switches . Therefore, new diagnostic options aim to evaluate the effect of epigenetic modifications and transcriptional factors on the expression of genes important for sexual determination are necessary to increase the detection of etiology in these individuals.
It is important to remember that epigenetic modifications are time- and tissue-specific, therefore in individuals with DSD these analyses should be performed on gonadal tissue, in conjunction with histological analysis, due to the high frequency of tumors derived from gonadal dysgenesis, considering that tumors by themselves have epigenetic modifications that can confuse the true etiology.
The above analyses may be performed in gonadal tissue by messenger RNA expression analysis by quantitative polymerase chain reaction or RNAseq, determination of the presence of chromatin tags (e.g., H3K4me1, H3K27Ac) by chromatin immunoprecipitation [33,85] and determination of DNA methylation status by bisulfite modification - sequencing or methylation-specific polymerase chain reaction. This aims to increase the understanding of gonadal gene regulation networks, which will probably lead to contribute to the etiology of specific phenotypes of DSD. Description of some genetic tests that can be used in the DSD approach are shown in Table 2.
DSD are complex conditions due to the bipotential nature morphology and functionality of the gonads. The characterization of chromosomal and molecular alterations, as well as the analysis of networks of gene regulation and their contribution in the phenotype of patients with DSD is a fundamental contribution in the understanding of the etiology of these clinical conditions that in the future will contribute to the improvement of the diagnosis, treatment and genetic counselling of the patient or his/her family.
Ideally, all patients should have studies of molecular biology and cytogenetics in the gonadal tissue, given the possibility of mosaicism as well as the specific tissue changes related to epigenetic modifications, this could aid in determining the etiology in many of the individuals in whom it is unknown.