Gene expression in human brain implicates sexually dimorphic pathways in autism spectrum disorders

Autism spectrum disorder (ASD) is more prevalent in males, and the mechanisms behind this sex-differential risk are not fully understood. Two competing, but not mutually exclusive, hypotheses are that ASD risk genes are sex-differentially regulated, or alternatively, that they interact with characteristic sexually dimorphic pathways. Here we characterized sexually dimorphic gene expression in multiple data sets from neurotypical adult and prenatal human neocortical tissue, and evaluated ASD risk genes for evidence of sex-biased expression. We find no evidence for systematic sex-differential expression of ASD risk genes. Instead, we observe that genes expressed at higher levels in males are significantly enriched for genes upregulated in post-mortem autistic brain, including astrocyte and microglia markers. This suggests that it is not sex-differential regulation of ASD risk genes, but rather naturally occurring sexually dimorphic processes, potentially including neuron–glial interactions, that modulate the impact of risk variants and contribute to the sex-skewed prevalence of ASD.

A utism spectrum disorder (ASD) is a developmental condition characterized by deficits in social communication and restricted, repetitive behaviours or interests 1 that is estimated to affect 1 in 68 children in the United States 2 . Genetic variation contributes strongly to ASD risk, as evidenced by high familial recurrence [3][4][5] , overlap with monogenic syndromes such as Fragile X (FMR1) or Smith-Lemli-Opitz syndrome (DHCR7) 6 , and higher rates of gene-disrupting genetic variants in ASD cases compared with their siblings or controls [7][8][9] . The set of genes that can be definitively implicated as ASD risk genes has been growing rapidly, and predictive models from studies of single nucleotide variants in sporadic cases estimate that there are likely to be hundreds of genes involved in ASD risk 8,10 . Given the scope of this genetic heterogeneity, understanding the biological aetiologies of ASD and designing broadly applicable treatments has proven challenging.
One robust risk factor for ASD is sex: for every female with ASD in the United States, there are 4.5 affected males 2 , and a male bias in prevalence is consistent across countries and across diagnostic criteria 11 . A multiple threshold liability model has been applied to conceptualize this difference in vulnerability, which posits that a higher minimum liability is required for females to manifest the ASD phenotype as compared with males [12][13][14] ; this is also referred to as the female protective model. There is now evidence from population-wide data, family-level data 14 and at the genetic level 7,9,15 to support the hypothesis from this model that autistic females with ASD carry greater genetic liability. However, we note that a female protective model is not incompatible with the existence of male-specific risk factors, and the molecular mechanisms responsible for either protecting females or potentiating males' vulnerability remain unknown.
Several theories have been proposed regarding sex-differential risk and protective mechanisms, though the evidence supporting each is varied 12 . For example, ASD has been conceptualized as an X-linked disorder 16,17 , and although several X-chromosome genes have been implicated, numerous autosomal genes contribute to risk as well 7,8 ; X-chromosome genes alone do not explain the overall male bias 9,18,19 . Imprinted, paternally expressed X-chromosome genes have also been proposed to exert protective effects on females 20 , though such genes have yet to be identified. Beyond genetics, the extreme male brain theory of autism posits that elevated prenatal testosterone exposure increases risk 21 . While recent evidence has linked increased fetal testosterone levels to later ASD diagnoses in a population sample 22 , the molecular and cellular mechanisms that act to link an early hormone exposure to a later ASD phenotype are unknown. It is also plausible that multiple mechanisms, acting independently or interacting with one another, collectively account for the sex bias in ASD risk.
We reasoned that since sex-differential gene expression patterns contribute to the development and function of a sexually dimorphic brain, evaluating genome-wide sex-differential gene expression in neural tissue could elucidate points of overlap with ASD risk genes and related pathways. Here we test two basic hypotheses about the relationship between sexually dimorphic expression and ASD risk genes: (1) ASD risk genes are expressed at different levels in males and females. With differing baseline expression levels, the magnitude of the impact of a disruptive mutation in a risk gene is likely to differ by sex. Accordingly, we expect to observe enrichment of sex-differentially expressed (sex-DE) genes among known ASD risk genes. (2) ASD risk genes are expressed at the same level in males and females, but genes in interacting molecular pathways and/or cellular processes are differentially expressed by sex. In this case, the downstream impact of sex-neutrally expressed ASD risk genes is likely modulated by their interactions with sexually dimorphic processes. If this were the case, we would expect to observe enrichment of sex-DE genes among gene sets representing processes associated with ASD pathophysiology, but not among ASD risk genes themselves.
To evaluate these hypotheses, we identify sexually dimorphic gene expression patterns in adult and prenatal human cerebral cortex tissue and test ASD-associated gene sets for enrichment of sex-differential expression. We observe significantly male-biased expression patterns for microglial-function-enriched, ASD-upregulated, co-expression modules from post-mortem ASD brain 23,24 and microglia and astrocyte marker genes [25][26][27] , but no enrichment of sex-differential expression for ASD risk genes. These patterns are most consistent with our second hypothesis, and suggest that sex differences in biological processes captured by specific ASD-dysregulated co-expression modules, or sexual dimorphisms in cortical microglia and/or astrocytes, may play critical roles in setting males' greater risk for ASD.

Results
To identify sex-differential gene expression patterns in the human brain, we analysed RNA-sequencing (RNA-seq) gene expression data from human cerebral cortex tissue from the BrainSpan project 28 and from an independent, in-house data set, as well as published array data from prenatal samples 29 . We focused on cerebral cortex, since ASD risk genes are highly expressed in this region in neurotypical brain 30,31 , and examination of post-mortem autistic brain has demonstrated consistent gene expression changes in the cerebral cortex as well 23,24 . To characterize stable sex differences in gene expression, we evaluated samples from adult subjects, and to assess sexdifferential expression during early development, when many ASD risk genes are highly expressed, we evaluated samples from prenatal subjects. We then tested multiple ASD risk gene sets, ASD-associated gene sets and cell type markers for enrichment of sex-differential expression 8,[23][24][25][26][27][32][33][34] , to determine whether sexually dimorphic utilization of ASD risk genes, or genes in interacting processes, may contribute to the sex bias in ASD prevalence.
Sex-differential expression in adult human cortex. We first analysed RNA-seq data from 58 post-mortem cortex samples from the BrainSpan project 28 for sex-differential gene expression using a linear mixed model. This set of samples was collected from 10 teenage and adult subjects matched for sex, age and brain region (13-40 years; 5 females), and filtered for outliers (Supplementary Table 1).
Sex-differential expression patterns in adult cortex show expected, robust differential expression of Y-chromosome genes and XIST, an X-chromosome transcript that initiates X-chromosome inactivation and is only expressed in females (Fig. 1a). We note that all Y-chromosomal transcripts that fail to show male-biased expression are pseudogenes with high sequence similarity to their corresponding genes on other chromosomes. Previous studies of sex-differential expression in human brain have preferentially reported sex-DE genes with pronounced fold differences (FDs), such as those on the X and Y chromosomes 29,35,36 . Beyond these differences driven by sex chromosome copy number, sex-differential expression of autosomal and non-XIST X-chromosome transcripts are generally subtle in magnitude 37 , and may reflect sex-specific tuning of molecular pathways. Using a minimum FD magnitude of 1.2, a standard threshold, we identify 186 genes at Po0.005, 311 genes at Po0.01 and 866 genes at Po0.05 ( Fig. 1b and      ; overlaid text displays the adjusted P value for each enrichment. (d) Shifts in the distribution of sexdifferential expression direction for genes in each ASD risk or ASD expression sets, and (f) neural cell type markers. Blue and pink bars display the proportions of each gene set that have higher expression in males (FD41) or females (FDo1); whiskers note 95% confidence intervals; horizontal black lines note the proportion of male-and female-higher genes in the corresponding background gene set. Overlaid text displays significant Bonferroni-adjusted P values from the binomial test. chr, chromosome; disr., disrupting; expr., expression; F, female; M, male.
The 37 autosomal sex-DE genes, then, are not sexually dimorphic due to copy number differences between males and females. Instead, they may be the regulatory targets of sex steroid hormone receptors or transcription factors from the X or Y chromosomes, or they may be preferentially expressed in a certain cell type that is differentially represented in male and female cortex.
Over-representation analysis for gene sets of interest. To determine whether genes associated with ASD risk show sex-differential expression in the human adult cortex, we examined sets of known risk genes from several sources: (a) candidate genes from a manually curated database 32 ; (b) genes with rare, de novo, proteindisrupting or missense single nucleotide variants in sporadic ASD cases from the Simons Simplex Collection 8 ; and (c) FMRP (Fragile X mental retardation protein) binding targets 33 (Supplementary Data 2). Together, these gene sets capture a broad scope of ASD risk genes, including heavily studied candidates, genes with evidence of de novo risk variants, and genes from a strongly ASD-associated regulatory network 33 . For each gene set, we first applied a Fisher's exact test to assess its overlap with sex-DE genes defined by specific thresholds (FDZ1.2 and Pr0.05, Fig. 1c . To corroborate these results and assess sexually dimorphic shifts in gene expression across the transcriptome without applying arbitrary thresholds, we also used a binomial test to assess each gene set's distribution into two possible outcomes: higher expression in males (FD41, any P value), or higher expression in females (FDo1, any P value). We found no evidence from either test for significant sex-differential expression of any of these diverse sets of ASD risk genes in the adult cerebral cortex, providing no evidence supporting hypothesis 1 ( Fig. 1d and Supplementary Data 3).
Next, we tested gene sets with evidence of ASD-associated expression patterns in adult human cortex 23,24 (Supplementary Data 2), neural cell type marker gene sets [25][26][27] (Supplementary Data 4) and genes marking cell types of the adaptive immune system 34 (Supplementary Data 5) for sex-differential expression. We include immune cell markers in this analysis, since recent work has suggested complementary roles for T cells and microglia in mediating behaviour, specifically pain responses, in female versus male animals 38 . The ASD-associated gene sets include genes differentially expressed in post-mortem cortex from subjects diagnosed with ASD 24 , and two ASD-associated coexpression modules from this same study (asdM12 V , downregulated in ASD and enriched for genes with neuronal and synaptic functions; and asdM16 V , upregulated in ASD and enriched for genes involved in immune and inflammatory responses) 24 . We also tested three ASD-associated coexpression modules from a subsequent RNA-seq study by Gupta et al. 23 , which used a larger, but overlapping set of individuals (asdM1 G , downregulated in ASD, and asdM6 G , upregulated in ASD, both modules are enriched for neuronal markers and synaptic genes and overlap with the asdM12 V module 24 ; asdM5 G , which is upregulated in ASD, enriched for M2-state microglial genes, and overlaps with the asdM16 V module 24 ). These DE genes and co-expression modules comprise large gene sets that were coherently altered in samples of ASD cases harbouring different genetic aetiologies. Therefore, these sets are likely to represent the downstream consequences of deleterious variants in risk genes, an upstream or ongoing background of molecular risk for ASD, or a secondary response to alterations in brain function that accompany ASD, any of which might be sexually dimorphic.
In contrast to the ASD risk genes, we observe significant enrichment and depletion for neural cell type markers and gene sets dysregulated in post-mortem brain from autistic subjects 24 . Among genes expressed at significantly higher levels (FDZ1.2, Po0.05) in males than in females (male-DE), we find a sevenfold enrichment of ASD-upregulated genes (7.0-fold, Fisher-adjusted P (P Fisher_adj ) ¼ 1.5e-04; Fig. 1c and Supplementary Data 3). Among genes upregulated in ASD post-mortem cortex (ASDup) 24 , 67% show higher expression in males than in females (male-higher, 21% shift from background expectation, binomial test-adjusted P (P Binom_adj ) ¼ 6.9e-03, Fig. 1d). Genes belonging to the ASD-upregulated module asdM16 V also show enrichment for significantly male-DE genes (5.2-fold, P Fisher_adj ¼ 1.8e-10, Fig. 1c) and a significant shift towards male-biased expression overall (73% male-higher, 28% shift, P Binom_adj ¼ 4.9e-21, Fig. 1d). The related co-expression module asdM5 G from Gupta et al. 23 also shows this male-biased shift in expression (57% male-higher, 11% shift, P Binom_adj ¼ 9.2e-08, Fig. 1d). It is critical to note that this apparent concordance between sex and ASD status is not the result of a male skew or lack of sex balance in the cases and controls used by either post-mortem ASD study 23,24 , as all samples consisted predominantly of males (Voineagu et al. 24 : 4/16 female ASD cases and 1/16 female controls; Gupta et al. 23 : 8/32 female ASD cases and 9/41 female controls). Both of these published studies use multiple approaches to show that sex confounds do not drive the observed ASD-associated gene expression changes in brain 23,24 .
Comparison of sex-and ASD-differential expression patterns. We were particularly interested in the sex-DE enrichment in the ASD-associated co-expression modules from post-mortem brain, asdM16 V and asdM12 V (ref. 24). Previous studies have demonstrated that co-expression modules frequently correspond to neural cell types and coherent biological functions 39,40 ; thus, sex-DE enrichments in these modules may most directly implicate pathways involved in sex-biased ASD risk. Strikingly, we observe that all 36 sex-DE genes that are also members of asdM16 V are expressed at higher levels in ASD than in control cortex 24 , 29 of which are also expressed at higher levels in neurotypical male than in female cortex (Fig. 2a). We also observe that all of the 22 sex-DE genes in asdM12 V are expressed at lower levels in ASD than in control cortex, and 20 of these are also expressed at higher levels in females compared with males (Fig. 2b). In short, we find concordant directionality of differential expression by sex and ASD status, with asdM16 V sex-DE genes expressed at higher levels in ASD and typical males and asdM12 V sex-DE genes expressed at higher levels in controls and typical females.
To assess the extent of these parallel expression patterns across the transcriptome, we compared the FDs from sex-DE genes with FDs observed in the differential expression analysis of ASD cortex 24 . For the 374 sex-DE genes (FDZ1.2, Pr0.05) that were also tested in the ASD-DE analysis, we observe a highly significant positive correlation between the sex-differential and ASDdifferential FDs (r ¼ 0.30, P ¼ 5.7e-09, Fig. 2c), as well as for the subset of genes differentially expressed at FDZ1.2 and Pr0.05 in both comparisons (r ¼ 0.29, P ¼ 5.7e-04, N ¼ 90 genes). We note that among the 47 genes expressed at significantly higher levels in both males and in ASD, 22 are asdM16 V members 24 and 19 are astrocyte markers 26 (16 belong to both sets). Among the 25 genes expressed at significantly higher levels in both females and in unaffected controls, 11 are asdM12 V members 41 and 12 are neuron markers 14 (5 belong to both sets). These results suggest that the parallels in sex-differential and ASD-differential expression direction extend beyond asdM16 V and asdM12 V , and that this pattern may be more broadly indicative of sexually dimorphic transcriptomes originating from specific neural cell types.

AQP4
LRP4 GPR56  FGFRL1  LRIG1  LYN  ZFP36L1  ADORA2B  MERTK  MSI2  RAB31  XAF1  ADD3  NEK6  PITPNC1  PODXL  IL17RB  RIN2  APPL2  ABCA1  WLS  GNG5  CXCL16  GPT2  ARHGEF6  NFE2L2  RAB7L1  CTDSP2  PARP14  APOL3  SERF2  RPS6  YBX3  DSE  DDAH2  COL4A1 Fold difference Sex-differential expression in prenatal human cortex. One possible explanation for the lack of enrichment of ASD risk genes among sex-DE genes from adult brain is that ASD risk genes may be acting primarily during fetal brain development 30,31 . To address this, we next analysed array expression data from 86 neocortex samples from 8 subjects (4 females) between 16-22 post-conception weeks 29 (Supplementary Table 1). This prenatal epoch follows the mid-gestation peak in testosterone secretion from males' differentiated testes 42,43 and thus captures a stage during which steroid hormones are likely to be exerting organizational effects. We find 306 sex-DE genes at Po0.005, 440 sex-DE genes at Po0.01 and 1,037 sex-DE genes at Po0.05, with 96 genes sex-DE at an adjusted Po0.05 (Fig. 4a,b and Supplementary Data 1). Results from over-representation analysis for the gene sets of interest within these prenatally sex-DE genes mirror those in the adult data: there are no significant enrichments for ASD risk gene sets, and FMRP interactors are significantly depleted within male-DE genes (0.33-fold, P Fisher_adj ¼ 8.0e-04, Fig. 4c, Supplementary Data 7).
Taken together, these findings fail to support the hypothesis that ASD risk genes are differentially expressed by sex in the human cerebral cortex. Rather, we observe that sex-DE genes are enriched among specific classes of changes observed in postmortem cortex from ASD patients, which is indicative of shared biology between ASD and typical sexual dimorphisms. These patterns of sex-DE enrichment follow what is observed in ASD cortex, with higher expression of microglial and astrocyte genes (exemplified by asdM16 V and asdM5 G ) in the more susceptible male population, and higher expression of a cohort of synaptic genes (exemplified by asdM12 V ), in the more protected, female population.

Discussion
Autism risk is sexually dimorphic, and genetic studies are most consistent with a female protective effect. To begin to explore potential mechanisms mediating sex-differential genetic risk, we tested the hypothesis that ASD risk genes would show sexually dimorphic expression in the cerebral cortex, a region that plays a major role in complex human cognitive phenotypes, including social behaviour, and where many ASD genes are expressed 30,31 . We observe both in adult and fetal brain that while some ASD risk genes do show sex-differential expression, overall this is not beyond what would be expected by chance. Furthermore, these sex-neutral expression patterns are evident in the mid-fetal cortex, a spatiotemporal point of convergence for ASD risk genes' expression 30,31 .
Instead, we find support for a second hypothesis: that genes whose expression patterns are altered in post-mortem autistic brain, which highlight downstream or interacting pathways, but not ASD risk genes themselves, are differentially expressed by sex. The convergence of male-DE genes with these downstream pathways, but not with risk genes or neuronal markers, is consistent with the evidence presented by Voineagu et al. 24 : asdM16 V is upregulated in ASD brain and enriched for immune system function and inflammatory response genes, but not for common ASD susceptibility variants. The asdM16 V module is therefore interpreted as representing a secondary, likely downstream effect of genetically causal perturbations. Whether a secondary effect of genetic variants or a result of independent mechanisms, it may be that expression of this gene set beyond a certain threshold is detrimental to neural development and function. Our findings show that typical males land closer to this putative threshold than females do, potentially implicating these genes expressed at higher levels in the male and ASD cortex in mechanisms driving male-biased ASD risk. Furthermore, to the extent that asdM16 V upregulation contributes to ASD pathophysiology, this module may serve as a useful target for pharmacological treatments that could modulate the effects of heterogeneous risk variants acting upstream.    ARTICLE Alternatively or concordantly, it may also be the case that ASD-protective genes are expressed at a higher level in females. Genes in the neuronal-and synapse function-enriched asdM12 V module may represent such a protective gene set, as these genes are downregulated in ASD post-mortem cortex 24 . Genes belonging to asdM12 V do show higher expression in adult female cortex from the BrainSpan sample (Fig. 1c,d), though neither the replication adult sample nor the prenatal sample show this same female skew. Alternatively, the relatively sex-neutral expression of asdM12 V genes in contrast to asdM16 V may simply reflect the absence of a particular ASD pathophysiological process in neurotypical samples.
We also observed a correlation in the relative FDs of sex-DE genes and ASD-DE genes that extends beyond the asdM16 V module, such that genes expressed more highly in typical male cortex also tend to be more highly expressed in ASD cortex, while genes more highly expressed in typical female cortex also tend to be expressed at lower levels in ASD cortex 24 . Again, we emphasize this agreement in fold change direction between sex and ASD status is not likely the result of a male-confounded analysis by Voineagu et al. 24 or Gupta et al. 23 , as cases and controls were sex balanced, and any potential sex effects were also regressed out in those studies. Interestingly, the gene expression patterns we observe fit squarely with hypotheses derived from both the extreme male brain theory and from the concept of female protective factors in ASD: male-DE (ASD-upregulated) genes could act to increase risk, while female-DE (ASDdownregulated) genes could have protective functions. However, we caution that FDs do not indicate the underlying mechanism of gene regulation (that is, active upregulation in males can return the same result as repression in females). We cannot yet conclude that parallel expression differences between the sexes and in ASD are derived from the same regulatory mechanisms, but this work provides a starting point for their study. Additional experiments that include sufficient numbers of cases and controls of both sexes will be necessary to tease apart how sex and ASD status interact to affect gene expression, for example, to determine whether male-DE genes are expressed at even higher levels in ASD cases.
Astrocyte and microglial markers are also reliably enriched among male-DE genes in both adult and prenatal cortex. We recognize two possible explanations for this: (1) a greater proportion of astrocytes and microglia to neurons in male cortex results in higher measured gene expression in males; or (2) males' cortical astrocytes and microglia are more transcriptionally active than females'. Aside from early, tenuous observations of greater cortical neuron density in males 44 , sex differences in the cellular composition of human cortex have not been sufficiently characterized to determine if there is a greater number of certain glial subtypes in male cortex. In contrast, there is clear evidence for sexually dimorphic astrocyte morphology in animals, particularly in hypothalamic nuclei, with male astrocytes showing a greater number of longer and more branched processes [45][46][47] . In addition, sex steroid hormones may play a role in astrocyte differentiation and regulation, as oestrogen receptors are expressed in hypothalamic and hippocampal astrocytes 48,49 , and female animals exposed to testosterone neonatally show maletypical astrocyte morphology 46 . Given the participation of astrocytes in the modulation of neurotransmission 50,51 and of microglia and astrocytes in synapse formation and function [52][53][54][55] , it is plausible that sexual dimorphisms in astrocyte and/or microglia number or function would lead to sex-differential effects on neuronal connectivity 56 . It is also interesting to consider that numerous ASD risk genes function at the synapse 7,9,[57][58][59] , and that as a third synaptic component along with pre-and postsynaptic neurons, sexually dimorphic astrocytes and/or microglia are well positioned to broadly influence the effects of upstream, heterogeneous risk variants.
We also acknowledge several limitations of our study. First, our analyses utilize gene expression data from the human cerebral cortex, a region that other studies have indicated is a convergent area where many ASD risk genes likely exert their action 30,31 . However, other brain regions not sampled in our data sets, such as the hypothalamic nuclei, are known to be robustly sexually dimorphic 60 . It may be that ASD risk genes are differentially expressed by sex in these sexually dimorphic regions, or that it is the connections between these regions and other parts of the brain where the sex-differential risk-modulatory mechanisms act (as opposed to purely within-cortex interaction at the level of molecular pathways and local cell-cell connections). Assessment of additional brain regions, including hypothalamic nuclei and other subcortical structures, in sufficiently powered test and replication sets will be useful for addressing this important question, once such data are available.
The mechanism(s) of the sex-biased expression observed here are not known, but present significant opportunities for understanding ASD's sex-biased pathogenesis. For example, transcription of sex-DE genes identified here may be regulated by sex-differential factors, such as transcription factors from the sex chromosomes, or by sex steroid receptor binding to hormone response elements upstream from transcription start sites. Chromatin immunoprecipitation experiments in human neural tissue coupled with functional assays in model systems will be needed to thoroughly characterize binding sites for these regulatory elements throughout the genome.
Alternatively, the sex differences we have observed may not result from differential transcription regulation, but instead from sex differences in the proportions of different neural cell types within male and female tissue. The overlap between male-DE genes and astrocyte and microglial marker genes is consistent with this possibility, although the processes that lead to sex differences in cell type proliferation or differentiation are unclear. Quantitative histological studies of male and female human brain will be critical to characterize the extent to which cell type composition differs between the sexes, and neurodevelopmental follow-up will be required to demonstrate how these differences arise.
The extent to which the convergent transcriptional changes previously observed in ASD cortex 23,24 represent causal aetiologies versus consequences of brain dysfunction also remains to be delineated 61 . In the case of ASD-associated co-expression modules enriched for risk variants, such as asdM12 V , enrichment of genes carrying ASD risk variants provides evidence for a causal, primary role in ASD aetiology. However, ASD-associated co-expression modules that lack enrichment for genetic risk variants, such as asdM16 V , may be linked to ASD in one of several ways: (1) They reflect direct downstream consequences of variants in, or dysregulation of, primary, 'causal' genes (for example, asdM12 V ) that actively participate in the pathophysiological processes that shape and maintain an autisticfunctioning brain; (2) they represent risk pathways that are independent of primary risk genes, for example, consequences of an environmental exposure, that also actively participate in ASD's aetiology; or (3) they exemplify consequences of living with ASD to the brain, which may modify the presentation of ASD or its comorbidities, but that do not have a role in ASD's aetiology. For example, the gene expression signature captured by non-variantenriched, co-expression module asdM16 V , which is upregulated in post-mortem adult autistic cortex, may reflect the impact of chronic social stress experienced across the lifespan. If male and female brains respond differently to stress 62 , then the concordance we observe between these gene expression signatures may be tangential to ASD's primary pathophysiology. Though, one would expect that such stress would be cumulative over the lifespan, so that a stress-driven gene expression profile would increase with experience and age. Neither of the ASD-associated co-expression modules is significantly correlated with age 23,24 , making this explanation less likely. Nevertheless, extensive characterization of animal models of ASD genetic risk variants, including gene expression patterns, may help to determine whether expression signatures like these are purely consequential, or if they are evident during early development and play a role in ASD aetiology.
In any case, the sex-DE patterns that we observe in multiple, independent samples demonstrate that currently identified ASD risk genes are not innately sex-differentially expressed in the developing or adult human cerebral cortex. Instead, it is the molecular, cellular or circuit-level context in which ASD risk genes operate that is likely responsible for modulating ASD liability in a sex-differential manner. This notion fits with the remarkable consistency of the male bias in ASD prevalence, despite ongoing evidence of considerable genetic heterogeneity in ASD. Study of astrocyte-neuronal and microglia-neuronal synapse interactions, and study of the causes and functional consequences of higher expression of astrocyte and microglial genes in male brain and synaptic genes in female brain, are needed to determine how sex-differential functioning of these pathways impact sexually dimorphic risk for a variety of neurodevelopmental disorders, including ASD.

Methods
Adult BrainSpan data set. Developmental RNA-seq data from the BrainSpan project 28 summarized to Gencode 10 (ref. 41) gene-level reads per kilobase million mapped reads (RPKM) were used. Data were normalized for GC content, using conditional quantile normalization 63 , batch-corrected for processing site using ComBat 64 and log 2 -transformed (log 2 (RPKM þ 1)). Samples from regions of the frontal, temporal and parietal cortex from subjects aged 13-40 years, with RNA integrity number (RIN) of at least 8.0, were retained for this analysis. Nonexpressed genes defined as having a log 2 -transformed RPKM expression level of o1 in more than 50% of all male or female samples were removed. Outlier samples were identified by evaluating inter-sample correlations and hierarchical clustering, first within each sex, and then on the full data set (samples of both sexes considered together); samples with inter-sample correlations 42.5 s.d.'s from the mean were removed. The data were then quantile normalized to mitigate the effects of systematic differences in the distribution of expression levels across samples on the differential expression analysis results. After gene filtering and outlier removal, 72 samples (29 from males and 43 from females) and 16,843 expressed genes remained. To balance the male and female sample sets, we then matched a subset of the female samples to the male samples by age and brain region, and again filtered for expressed genes. The final data set consisted of 58 samples from 10 subjects (29 samples from 5 subjects of each sex; Supplementary Table 1)  Adult replication data set. The adult replication sample comprised seven frontal and temporal cortex samples from five male individuals matched to seven cortical samples from five female individuals with no history of neuropsychiatric or neurological diagnoses. Male and female samples were matched for age, post-mortem interval (PMI) and brain region. These samples were a subset of a larger set acquired from the Harvard Brain and Tissue Bank and the Eunice Kennedy Shriver National Institute for Child Health and Human Development Brain and Tissue Bank for Developmental Disorders following the tissue acquisition policies of the respective brain banks.
Approximately 100 mg of tissue from each sample was dissected on dry ice; RNA isolations were performed using the miRNeasy kit (Qiagen), RNA quality was quantified using the RIN 65 and ribosomal RNA was depleted using the Ribo-Zero Gold kit (Epicentre). Remaining RNA was then size selected with AMPure XP beads (Beckman Coulter) and re-suspended, and sequencing libraries with indexed adaptors were prepared according to the Illumina TruSeq protocol. Fifty base-pair, paired-end reads were generated on a HiSeq 2000/2500, with 24 samples pooled per lane.
Reads were mapped to the human reference genome (hg19) using Gencode v18 annotations with TopHat2, allowing for up to 10 multiple mappings per read 41,66 . Output BAM files were filtered to ensure that every read had a valid pair, resulting in only paired-end reads (fragments) being used for downstream analyses. Transcript levels were quantified using Gencode v18 gene models at the union gene model level using HT-seq Counts 67 . We normalized these data for GC content biases using the cqn package in R (ref. 63), which resulted in log 2 (normalized FPKM) values, and ensured that there were no sample outliers with a summed sample correlation Z-score42 (ref. 68). Genes not expressed in the subset of neurotypical samples selected for these analyses were identified (log 2 -transformed FPKM expression level o1 in more than 50% of all male or female samples) and removed. Outlier samples with inter-sample correlations 42.5 s.d.'s from the mean, either within each sex or within the complete sample set, were removed. The expression data for the remaining samples were then quantile normalized. The final filtered data set consisted of 13 samples from 10 subjects (Supplementary Table 1 Prenatal data set. Exon array data analysed by Kang et al. 29 and downloaded from the Gene Expression Omnibus (GSE25219) were used for the assessment of prenatal gene expression. Only samples from subjects between 16 and 22 postconception weeks from the frontal, temporal and parietal cortex, and with RIN of 8.0 or greater were used in this stage of analysis.
Probe set IDs from the downloaded data were matched to Ensembl Gene IDs from Gencode 10 using the biomaRt function in R. Non-expressed genes were defined as those genes with a log 2 -transformed median probe set intensity of o6 in 480% of male or female samples within the selected sample set, and were removed. Outlier samples were detected by evaluating inter-sample correlations and hierarchical clustering within each sex and within the complete data set, and samples with inter-sample correlation 42.5 s.d.'s from the mean were removed. Expression data for the remaining samples were quantile normalized. After these processing steps, 142 samples (43 from males and 99 from females) and 9,985 expressed genes remained. To balance the number of male and female samples for analysis, we then matched a subset of the female samples to the male samples on age and brain region, and again filtered for expressed genes. Differential expression analysis. Differential expression analyses for all data sets were performed using a linear mixed model and Bayesian t-tests as implemented in LIMMA 69 , a robust method for analysing small samples. For all analyses, the main contrast in the regression model was sex, and subject was included as a random effect to account for the non-independence of samples from the same individual brain (that is, different brain regions). Covariates were included, where available, in the model as fixed effects: RIN, age, PMI, cortical lobe and pH for the adult BrainSpan data; RIN, age, PMI and cortical lobe for the replication data; and RIN, age, PMI, cortical lobe and pH for the prenatal data. Per-subject average values were substituted for missing PMI and pH information. Genes with a FD magnitude of 1.2 or greater and an unadjusted P value of 0.005, 0.01 or 0.05 were called as differentially expressed by sex (sex-DE; Supplementary Data 1).
Annotation gene sets. ASD candidate genes were selected from the SFARI Gene Autism Database 32 and filtered to those genes classified as syndromic (category S) or with evidence levels between 1-4 for a set of 153 genes. To also investigate a risk gene set based on evidence from an unbiased, experimental screen, we used the set of genes with rare de novo variants (RDNVs) in sporadic ASD cases from exome sequencing of families from the Simons Simplex Collection 8 . All genes with RDNVs in autistic probands were compiled and classified as protein-disrupting (nonsense, splice site or frameshift mutations), missense or silent variants. Here we use the gene set with protein-disrupting variants (353 genes) and the expanded gene set with either protein-disrupting or missense variants (1,771 genes). We also evaluated the set of transcripts that are binding targets of FMRP, a functionally defined gene set that is enriched for ASD risk genes 70 . Here we tested the 725 human orthologues of FMRP target genes as characterized in mouse brain 33 (Supplementary Data 2).
Since gene expression patterns in the brain often reflect the transcriptional activity of distinct neural cell types 39,40 , we also culled gene sets marking different cell types from several studies in the literature. From a microarray study of sorted cell types in mouse forebrain 26 , we tested markers for neurons (1,489 genes), oligodendrocytes (1,626 genes) and astrocytes (1,968 genes). From a microarray study of human microglial cells in culture 25 , we tested genes with at least a twofold upregulation in activated, microglia-enriched, mixed glial cultures (B60% microglia) (773 genes). From a single-cell RNA-seq study of mouse somatosensory cortex and hippocampus 27 , we tested markers for CA1 pyramidal neurons (355 genes), S1 pyramidal neurons (235 genes), interneurons (319 genes), oligodendrocytes (397 genes), astrocytes (216 genes), microglia (368 genes), endothelial cells (312 genes), ependymal cells (402 genes) and mural cells (pericytes and vascular smooth muscle cells, 137 genes) (Supplementary Data 4).
Recent evidence has also suggested complementary roles for microglia and immune cells in mediating behaviour in male versus female animals 38 . To evaluate whether adaptive immune cells contribute to the sex-differential gene expression that we observe in the brain, we tested co-expression modules generated by the Immunological Genome Project from mouse haematopoietic cells that are associated with T-and B-cell lineage regulator genes 34 : T-cell module 18 (106 genes); gamma delta T-cell module 65 (30 genes); gamma delta, natural killer T and T4 module 56 (58 genes); alpha beta T-cell module 57 (52 genes); B-cell module 33 (125 genes); B-cell module 61 (38 genes); and B-cell module 76 (15 genes; Supplementary Data 5).
For the enrichment analyses, we used the following gene sets as background: for SFARI candidate genes, genes with RDNVs in ASD cases and activated microglial markers, we used expressed genes with a Gencode biotype annotation of 'protein coding'; for gene sets with ASD-associated expression patterns and for immune cell markers, we used expressed genes also tested in the corresponding source publication 23,24,34 ; and for FMRP target genes 33 and cell type markers from Cahoy et al. 26 and Zeisel et al. 27 , we used the genome-wide set of one-to-one human-mouse orthologues as background (Supplementary Data 8).
For all background and gene sets of interest, gene identifiers were converted to Ensembl Gene IDs in Gencode using the biomaRt package in R to allow for unambiguous comparisons between genes from different data sources. Gene set membership, background set membership and sex-DE categorization for all expressed genes tested for differential expression in the three data sets are recorded in Supplementary Data 9.
Over-representation analysis. To evaluate the enrichment of gene sets of interest among sex-DE genes, we applied a two-sided Fisher's exact test separately to sex-DE gene sets expressed more highly in males (male-DE) and in females (female-DE) at three P value thresholds (unadjusted Po0.005, 0.01 and 0.05, Supplementary Data 3, 6 and 7) in R. P values from the Fisher's exact tests run within each data set were adjusted for 62 tests performed against the 31 gene sets of interest (4 ASD risk gene sets, 7 ASD expression gene sets, 13 neural cell type marker sets and 7 adaptive immune cell marker sets) at each of the three significance levels for the sex-DE input genes.
To further investigate patterns of sexually dimorphic expression within each gene set of interest without applying arbitrary thresholds to define sex-DE genes, we also assessed the distribution of the genes in each set into two mutually exclusive categories: higher expression in males (positive log 2 (fold difference), at any P value); or higher expression in females (negative log 2 (fold difference), at any P value). We then applied a two-sided binomial test against the distribution of male-higher and female-higher genes in the corresponding background gene set (Supplementary Data 3, 6 and 7). P values from all binomial tests within each data set were Bonferroni-corrected for the 31 gene sets tested.