Introduction

Chromosomal inversions have been an enduring focus of evolutionary biology. Dobzhansky’s demonstration of natural selection on inversions of Drosophila pseudoobscura1 was integral to the modern synthesis and inversions were routinely invoked in the extensive studies of ‘supergenes’ by the British ecological genetics school2,3,4. They can generate under-dominance for fertility if recombination within inverted regions generates genetically unbalanced gametes. Across both plants and animals, there is a remarkable association between inversions and meiotic drive5,6,7,8,9. Recent studies have implicated inversions in local adaptation10,11,12,13,14,15,16, accelerated speciation6,17,18,19,20,21,22,23,24,25,26, the evolution of migration and species ranges27,28, sexual selection and mate choice25,29,30, and sex-chromosome evolution29,31,32,33,34. Reviewing the literature, Faria et al.35 conclude that the fixation of inversions by positive selection is essential to the evolution of many species.

Despite many examples, we have no quantitative sense for the contribution of inversions to genetic variation. The argument that inversions are fundamental to adaptation is enormously burdened by ascertainment bias. Inversions have been studied when identified from conspicuous, often dramatic, phenotypic effects4,5,36,37,38,39,40. They are not scored like Single Nucleotide Polymorphisms (SNPs) where surveys provide an enumeration sufficient to test broad evolutionary hypotheses. For example, the relative frequency of synonymous versus non-synonymous SNPs can estimate the fraction of substitutions that are fixed by natural selection as opposed to genetic drift. In contrast, inversion studies tend towards depth—detailed investigation of individual variants—rather than breadth. In this investigation, we evaluate the quantitative importance of inversions by comprehensively enumerating variants among a random sample of ten genomes from one natural population.

A distinguishing feature of inversion polymorphisms is that the composition of alternative alleles changes through time. Upon emergence, the derived orientation is a single haplotype (nucleotide sequence), and in the short term, it is likely to remain internally homogeneous owing to suppressed recombination with the ancestral orientation. The ancestral orientation should be internally variable, composed of many different haplotypes. The amount and pattern of variation will change through time contingent on selection and the position-dependent rate of gene flux. Flux refers to the combined effect of double crossovers and gene conversion exchanging variation between orientations41,42,43. A suspension bridge pattern44,45, where divergence between inversion orientations is greatest at the breakpoints and gradually declines to its lowest value in the middle, is predicted if gene flux occurs most frequently in the middle of inversions42,46 or if there is epistatic selection on the breakpoints themselves47. To test these predictions, we score nucleotide sequence variation across inverted genome regions and compare the estimates within and between orientations to the genome wide pattern.

Nucleotide differences can reveal the historical signature of natural selection48,49, but they do not indicate how inversions generate phenotypic differences or how those phenotypic effects translate into fitness variation. Altered gene expression is frequently posited as the cause of phenotypic effects simply because the physical rearrangement of DNA can affect expression (a position effect). This is most likely for genes near the inversion breakpoints where rearrangement can move coding DNA away from regulatory elements such as promoters or enhancers. Alternatively, orientations may differ in gene expression because rearrangement captures pre-existing variation, e.g. SNPs or indels within the reversed sequence, and it is these variants that are responsible for expression differences. We test the breakpoint and capture hypotheses by reanalyzing data from a recently published eQTL mapping experiment. The eQTL experiment used the same collection of genomes that we score for inversions in the present paper enabling reanalysis of expression differences in direct relation to inversion genotype calls.

In this paper, we provide a comprehensive survey of inversion polymorphisms that segregate within a single natural population of M. guttatus. We interrogate 64 inversions, each of which contains at least two genes, for patterns of gene expression and nucleotide sequence variation. We test alternative hypotheses for how fitness variation emerges from inversions. The “breakpoint hypothesis” predicts elevated gene expression variation at genes neighboring inversion breakpoints, relative both to genes within the interior of inversions and the remainder of the colinear genome. We also expect higher sequence divergence close to breakpoints. The captured alleles hypothesis predicts no specificity to breakpoints (in either expression or sequence variation) but a non-random and asymmetric distribution of variation within and between ancestral and derived orientations. The selection regime almost certainly varies among loci in this population, but we find patterns that clearly favor the capture hypothesis over the breakpoint hypothesis.

Results

Inversion discovery

We identify 64 distinct inversions (summarized in Supplementary Data 1) from ten whole genome assemblies of M. guttatus. Each assembly is from an unrelated plant derived from one natural population (Iron Mountain, hereafter IM50,51). Each inversion is characterized by a stretch of sequence that aligns negatively to the reference genome with high homology (IM767, one of the ten assemblies, is used as the reference). Thirty five of the 64 inversions are present in multiple alternative lines, exhibiting the same breakpoints relative to the reference genome. We treat these as distinct copies of the same alternative allele. The size of inversions ranges from 5 kb to 4.1 mb (median ≈ 100 kb) and the number of genes within inversions ranges from 2 to 791 (median = 9). Our criteria for calling inversions are conservative and many small rearrangements, particularly those outside of genic regions or encompassing fewer than two genes, are not included in our survey (see “Genome assemblies and inversion calling” section of the Methods).

We find two large inversions, on chromosomes 6 and 11, previously discovered from genetic mapping studies40,52, but the current genome assemblies reveal aspects of their morphology. inv_24 (on chromosome 6, 1.3 mb to 5.4 mb coordinates on the IM767 reference) appears to be a multi-part rearrangement involving at least three mutational changes from the ancestral sequence (Fig. 1a). The middle portion of inv_24 is colinear with the ancestral orientation, but the entire region shows complete recombination suppression in inversion heterozygotes52,53. We also find two cases of nested inversion: inv_6a/inv_6b (chromosome 1) and inv_10a/inv_10b (chromosome 2). For each, two alternative lines exhibit inversions from the reference genome within the same general region, but with distinct breakpoints in each alternative line. Thus, three distinct alleles segregated among ten lines for inv_6a/6b and inv_10a/10b. These cases contribute to the growing catalog of complex, multi-part inversions segregating in Mimulus54,55.

Fig. 1: The physical arrangement of DNA for the largest inversion and the distribution of nucleotide variation across all inversions.
figure 1

a Inv_24: Each exon of IM767 from the interval of 1 to 7 mb of Chromosome 6 was mapped to IM664 (y-axis): blue = forward alignments (+), red = reverse alignments (−). The inversion contains two distinct sections of negative alignment separated by a positive alignment. b The average (and distribution) of nucleotide diversity (π) is reported ancestral-ancestral (πAA), ancestral-derived (πAD), and derived-derived (πDD) comparisons for genes within inversion interiors (left), inside the breakpoints (middle), and immediately outside breakpoints (right). The dotted line is the mean π for genes across the colinear genome. Means were compared by ANOVA and the bands are 95% confidence intervals. Samples sizes for interior genes are n = 51, 51, and 26 for AA, AD, and DD, respectively. The corresponding n are 54, 53, 28 for inside breakpoints and n = 54, 53, 27 for outside breakpoints. The diversity statistics are reported as a function of (c) the frequency of the derived orientation within IM and (d) the physical size of the inversion. In c, no estimate is reported for πDD where q = 0.1, because interval variation cannot be calculated unless there are at least two lines carrying the orientation. Points have been ‘jittered’ slightly for q to reveal distinct observations. Source data are provided as a Source Data file.

Nucleotide diversity

To evaluate nucleotide diversity patterns, we scored genes within inversions distinguishing those closest to the breakpoints from those in the interior. These were compared to genes just outside the inversion as well as the remainder of the genome. Using genome assemblies from four outgroup species, we were able to polarize 54 of the inversions, calling the reference line orientation Ancestral or Derived. As expected from theory44,45, nucleotide diversity patterns differ substantially between Ancestral and Derived orientations (F2,335 = 143.77, p < 0.001). The average nucleotide diversity within the ancestral orientation (πAA) is nearly 4.6 times higher than within the derived orientation (πDD) and sequence divergence between arrangements (πAD) is about 60% greater than πAA (Fig. 1b). Importantly, πAA within/near inversions is equivalent to the genomewide average (horizontal in Fig. 1b); the inversion effect is evident only in πDD and πAD. Among the genes within inversions, there is no difference in genetic diversity between those close to the breakpoints and those to the interior. There is a significant attenuation of the differences (πAA > πDD and πAD > πAA) as we move to those genes nearest the breakpoints but outside the inversion (F4,335 = 2.86, p < 0.05).

Diversity patterns also depend on the relative frequencies of the two orientations (Fig. 1c) and the size of the inverted region (Fig. 1d). For both frequency (F2,130 = 4.03, p = 0.02) and size (F2,130 = 3.08, p = 0.05), there is significant slope heterogeneity, but the regressions for individual components (πAA, πDD and πAD) are only marginally significant or non-significant. Intra-orientation variation appears positively correlated with population frequency (Fig. 1c), but only the πAA regression is significant when considered in isolation. This may just reflect lower power for πDD; there are fewer estimates for this contrast because it can be calculated only when the derived orientation is carried by at least two lines (28 of 54 cases). Both πDD and πAD decline with inversion size and the πDD reduction is probably stronger than evident in Fig. 1d. The largest inversion, inv_24 (Fig. 1a), does not yield a πDD for the present analysis because it is carried by only one of the ten lines. However, a previous survey of this genomic region revealed complete internal homogeneity (πDD \(\approx\) 0) of inv_24 over its entire 4.1 mb length52.

The equivalence of diversity in the interior of inversions with genes neighboring the breakpoints suggests that divergence is not elevated at breakpoints. However, Fig. 1b–d are based on genes and the breakpoints generally reside in intergenic regions. To evaluate diversity in intergenic regions, we calculated statistics within 2 kb windows across each inversion including 20 kb beyond each breakpoint. Four examples are reported in Fig. 2, the full set as Supplementary Figs. 163. These trajectories are routinely incomplete, broken in places where reliable sequence alignments between lines are impossible owing to the very high sequence and insertion/deletion variation that segregates in M. guttatus. Despite these difficulties, the overall pattern is clear: Nucleotide diversity fluctuates idiosyncratically across inversions. There is no consistent tendency for πAD to peak at or near breakpoints.

Fig. 2: Nucleotide diversity by position across four inversions.
figure 2

The trajectories for πAA, πAD, and πDD are reported over the genomic regions containing inversions (a) 16, (b) 25, (c) 27, and (d) 36. The vertical broken lines indicate the estimated breakpoints for each inversion. There is πDD trajectory for inv_36 because the derived orientation is carried by only one line.

The window-based diversity calculations also indicate the respective effects of mutation and gene flux in generating variation within the derived orientation (πDD). Both processes will increase πDD but they yield different spatial signals. Mutation will randomly distribute differences across an inversion while flux should generate localized introgression tracts. The latter are evident as highly localized peaks in πDD trajectories, particularly in cases where the derived orientation harbors little variation on average (e.g. inv_16 and inv_27 in Fig. 2). Mutation will introduce variation in a statistically homogeneous way across the derived orientation. In the short term, this corresponds to a Poisson expectation for SNPs per window. The observed distribution is much ‘clumpier’ than Poisson suggesting that gene flux is the primary source of variants for πDD (Supplementary Figs. 163).

Gene regulation

We find no evidence that the overall genetic variance in gene expression is inflated by inversions. The ten genomes characterized here for inversions were recently used in a multi-parental eQTL mapping experiment53. Each of the nine ‘alternative’ genomes was crossed to IM767 and each of these nine F1 plants was self-fertilized to produce F2 plants. Each F2 was measured for gene expression in leaf tissue (n = 1588). This experiment produced estimates for the genetic variance in expression for nearly 13,000 genes and for the proportion of that variation at each gene that is generated by the DNA surrounding the gene, i.e. the cis-eQTL. Locating genes inside/outside inversions, we find no difference between genes within inversions versus those in colinear portions of the genome, not for the overall genetic variance nor for the cis component of that variance. There is no difference between genes in the interior of inversions relative to those close to the breakpoints (Supplementary Fig. 64).

Despite the negative result on magnitude, there is clear evidence that inversions ‘partition’ expression variation. This can be shown by reanalyzing the eQTL data in direct relation to our inversion calls of each line for each inversion (see “Gene expression calculations” section of the Methods). In each of the nine F2 populations (Fig. 3a), we can score each plant at the cis-locus of any expressed genes as 0, 1, or 2, depending on how many copies of the alternative line allele they carry. The regression of expression onto allele count is the ‘average effect’ of the alternative allele56 in that particular cross. These regressions are reported for one gene across all nine F2 populations in Fig. 3b. The cis locus at each of the nine alternative genomes could differentially affect expression relative to IM767, and in principle, each may do so in differing ways. The eQTL mapping experiment demonstrated that cis eQTLs are usually allelic series with 3–5 distinct alleles53.

Fig. 3: The effect of inversions on gene expression variation.
figure 3

a The estimation of inversion effects on gene expression is illustrated using data from an exocyst complex protein gene (MgIM767.06G148700). This gene resides within inv_25 which is carried by five alternative lines (155, 444, 909, 1034, and 1192) which makes five of the F2 populations segregating. b The linear regression of gene expression level onto alternative allele count is reported for each of the nine F2 populations. Expression levels have been standardized to a mean value of 1 within each population. c The average pairwise distance is reported for four categories. The p-values refer to comparisons between versus within cross type (left) and within-Ancestral versus within-Derived (right). 932 genes assayed for between/within cross types, 872 for within-Ancestral, and 168 for within-Derived. The 95% confidence bands are from averages across genes, while the test p-values were obtained by permutation. d The results of permutation for between cross-type (orange) and within cross-type (blue) reveal the observed pairwise distances (indicated by arrows) to be well outside the null distribution. Source data are provided as a Source Data file.

To assess inversion effects, we partition the full set of estimates (the regression slope from each cross) based on whether each alternative line shares the same inversion orientation as the reference genome (homogenous crosses) or carries the inverted orientation (segregating crosses). If the inversion is inconsequential for expression (our null hypothesis), average effect estimates should be no more similar within cross types than between cross types. Figure 3b illustrates a gene that exhibits an inversion effect. Those lines that share the reference orientation tend to reduce expression while the lines carrying the inversion (and thus differ in orientation from the reference) increase expression. Consequently, the average pairwise difference within cross types (0.236) is much lower than between cross types (0.960). Applying this calculation across all genes within inversions, the average between cross types is significantly greater than within (p < 0.0001, Fig. 3c left). Significance was established by permuting estimates across the inversion classification of lines within genes. The permutation distributions for each statistic (histograms in Fig. 3d) do not encompass the observed values (arrows in Fig. 3d): cis-eQTL effects are strongly predicted by inversion status (p < 0.0001).

A second notable feature of the distribution of expression variation is revealed by the subset of inversions where both Ancestral and Derived orientations are carried by at least two lines. For these inversions, we can subdivide the intra-cross divergence into within-Ancestral and within-Derived components (Fig. 3c, right). We observe greater similarity of genetic effect estimates within the Derived orientation than within the Ancestral (p < 0.0001 from permutation, Supplementary Fig. 65). This pattern is also evident in the specific case of MgIM767.06G148700 (Fig. 3b) where the derived orientation alleles not only have a different average effect than ancestral orientation alleles, but the lines are more consistent in their effect. As a final analysis, we ignored the inversion classification and considered the average pairwise difference for genes within the inversion to those throughout the rest of the genome. We find no difference in the magnitude of differences (Supplementary Fig. 64) for genes within inversions versus the remainder of the colinear genome. This confirms the negative result—the genetic variance in expression is not greater within inversions than across the colinear genome—that we obtained by classifying estimates taken direct from the eQTL mapping experiment.

Discussion

The major fitness effects hypothesized to emerge from inversions are (a) meiotic aberrations produced by inversion heterozygotes, (b) position effects of sequence rearrangement, and (c) the collection of coadapted alleles into recombination-suppressed haplotypes44. We cannot test whether the production of genetically unbalanced gametes (hypothesis a) is important from the present experiment, but the accumulation of evidence in Mimulus is not supportive. Eight large inversions, previously mapped within the M. guttatus species complex, have been implicated in the full array of ‘inversion phenomena’ including meiotic drive7,57, local adaptation and speciation58,59,60,61,62,63, and the persistence of fitness variation within natural populations40,52. There is no evidence for underdominance owing to meiotic imbalances. Even for the traits most prone to this effect (e.g. pollen viability), inversion heterozygotes have intermediate phenotypes52 or the heterozygotes resemble the more fit homozygote40,64. Here, we present results for a new collection of inversions, only 2 of 64 known previously. Both sequence evolution and gene expression variation at these loci favor hypothesis (c) over (b); the internal content of inversions appears to be more evolutionarily important than their breakpoints.

Considering gene sequence evolution, Berdan et al.44 recently reviewed theoretical predictions for the evolution of πAA, πAD, and πDD over the genomic span of inversions. When a sequence is initially inverted by mutation, and shortly thereafter, we statistically expect πDD = 0 and πAA = πAD, with the latter diversity statistics equaling the genome average. However, the way that these statistics change as the inversion ages should be different depending on whether selection acts mainly on the breakpoints or on loci to the interior. If the selection maintaining the inversion is focused on the breakpoints, a suspension bridge pattern is predicted for πAD, greatest at the breakpoints with a gradual decline to its lowest value in the middle. In contrast, if genes to the interior are the actual targets of selection, πAD peaks should not be specific to the breakpoints. For the Mimulus inversions, the average πAD for genes close to the breakpoints is indistinguishable from the average of the interior (Fig. 1b) and peaks of divergence occur idiosyncratically across the sequence space from one breakpoint to the other (Fig. 2). The haphazard location of πAD peaks suggests that selection is acting more on the variants captured by inversions, which will naturally vary in location, than by breakpoint effects.

The variation internal to the ancestral orientation, πAA, is equal (on average) to the overall nucleotide diversity (π) in colinear parts of the genome (dotted line in Fig. 1b). In contrast, variation within the derived orientation (πDD) is much lower, which suggests that most inversions segregating in the IM population are evolutionarily young (Fig. 1b). Despite their apparent youth and the effect of gene flux, most inversions exhibit substantially elevated sequence divergence between orientations relative to ancestral (πAD > πAA). This πAD > πAA tendency should emerge through time, because we expect πAD ≈ πAA when an inversion is first produced by mutation. The spatial scale of sampling is a critical consideration here. The ten genomes of this study are from unrelated plants within one natural population (IM). Our estimates for πAA and genomewide π are within this population. M. guttatus exhibits substantial variation among populations with Fst ranging from 0.1 to 0.5 depending on geographical distance62. The mean πAD (0.029) for inversions is a moderate value for nucleotide diversity between gene sequences from different populations. It is possible that inversion orientations are sampled from this larger pool of variation with derived orientation introduced to IM through gene flow. In this model, where geographical variation in selection is essential to inversion persistence10,54, πAD > πAA should emerge early in the lifetime of polymorphisms.

Nucleotide diversity within inversion orientations is correlated with their physical size and population frequency (Fig. 1c, d). The slight tendency towards lower variation within the less common orientation could reflect a population size effect. An inversion effectively splits the overall population of alleles into two sub-populations based on orientation. These subpopulations are genetically connected (gene flux is analogous to gene flow) but drift might remove variation more rapidly from the smaller subpopulation, i.e. the less frequent orientation. Alternatively, the decline of πAA with derived orientation frequency (Fig. 1c) might result because the latter quantity is correlated some other critical variable such as inversion age.

The decline of both πAD and πDD with inversion size (Fig. 1d) is notable because it suggests a relationship between inversion size and age. Previous studies7,52 on two of the largest inversions (inv_48 which is part of the meiotic drive locus on chromosome 11 and inv_24 on chromosome 6) had concluded recent origin based on very low interval variation combined with limited geographic spread. Both inversions are maintained at intermediate frequencies in IM owing to conflicting selection pressures. A recent theoretical study65 suggests that small rearrangements are likely to be fixed by selection, while intermediate-to-large inversions are more likely to be maintained as balanced polymorphisms through associative overdominance. Associative overdominance is entirely plausible for both inv_24 and inv_48, but an incisive test of the model based on a survey across inversions will require information on the rate that inversions of different sizes are produced by mutation.

The breakpoint hypothesis for inversions makes a clear prediction for gene expression. If the physical reversal of the DNA sequence affects fitness by disrupting gene regulation, we expect that breakpoints should emerge as cis-eQTLs, i.e. loci that affect the expression of proximal genes66. Breakpoints clearly are cis-eQTLs in Mimulus, but this is not compelling evidence that they are causal to variation. In the IM population, nearly all genes exhibit cis-regulatory variation, oftentimes as an allelic series with three to five distinct alleles53. A random partitioning of ten genomes into two groups (simulated inversion orientations) will usually yield a difference in mean expression between partitions. When we ask the more informative question of whether the genetic variance is elevated in breakpoint-proximal genes, the result is negative (Supplementary Fig. 64). Breakpoint genes are not more variable in expression than those to the interior of inversions or throughout the rest of the genome.

If an inversion is favored because the derived orientation captures pre-existing variation in expression, there will be no immediate effect on the overall expression variance in the population. Incremental shifts in the genetic variance in expression are likely to occur subsequently as orientations change in frequency, but these shifts can have positive or negative effects on the overall variance. The capture model does predict a partitioning of expression variation between inversion types, which is strongly supported by the Mimulus data (Fig. 3c, d). Moreover, the partitioning is predicted to be asymmetric. The derived orientation should contain less variation than the ancestral orientation, particularly when most genes have multiple cis-regulatory alleles segregating in the population and only a single allele is captured by the inversion. The predicted asymmetry in internal expression variability (ancestral versus derived) is confirmed by these inversions (Fig. 3c, right).

In summary, both aspects of the data—sequence and expression variation—support the captured alleles hypothesis for inversions. Peaks of divergence between orientations are idiosyncratically distributed across inverted regions for both features. Of course, the selection regime is likely heterogeneous across inversions and breakpoint effects may be critical for some loci. More generally, the actual selection regime acting on alleles to the interior of inversions are not identified by these patterns. Polymorphism can be maintained locally, because each orientation is subject to conflicting costs and benefits within the IM population. The meiotic drive locus (associated with inv_48) is an example where conflicting gametic and zygotic selection make the polymorphism locally stable7,40. Alternatively, varying selection across the range of a species could maintain polymorphism because the inversion captures alleles co-adapted for local environmental conditions10. A large inversion on chromosome 8 is associated with inter-population difference in life history, specifically the annual/perennial phenotypic polymorphism of M. guttatus58. The ‘perennial’ orientation at this locus does occur in annual populations67, but that may be due to recurrent immigration rather than local advantage. The selection pressures acting on inversion polymorphisms are most directly estimated by measuring survival and reproductive success of alternative genotypes under natural conditions. Field studies assessing inversion effects on survival and reproductive success have historically focused on individual inversions. An important step for future studies will be to develop and implement methods to dissect fitness effects owing to multiple loci given that inversions are likely to segregate at many positions across the genome.

Methods

Genome assemblies and inversion calling

The 10 genomes are derived from a large panel of lines, each created by single seed descent from an independent maternal family. These families were sampled from the Iron Mountain population50 of M. guttatus (syn Erythranthe guttata) in central Oregon, U.S.A. (44.402217 N, 122.153317 W). We assembled genomes for IM155, IM444, IM502, IM541, IM664, IM909, IM1034, and IM1192 by first extracting high molecular weight DNA from each line. These lines had been confirmed to be individually homozygous and unrelated to each other through previous Illumina sequencing68. The assemblies are haploid (given line homozygosity). The University of Georgia genomics facility made Sequel II CLR libraries and sequenced each using PacBio according to the manufacturer’s instructions. Each line was sequenced to ~250–300x coverage. We assembled sequence contigs using canu 2.1.169, which yielded contigs 4–15 mb in size. Next, we used genetic mapping data53 to order and orient the contigs into pseudo-chromosomes. Importantly, all the inversions identified below are within contigs and thus inference does not depend on the ordering of contigs from mapping data. The other two genome assemblies (IM767 and IM62) were produced by the Joint Genome Institute70 from DNA extracted with the same protocol as the other lines. The IM767 and IM62 assemblies are used with permission.

After testing many bioinformatic tools, we identified inversions from the synthesis of results from three distinct analyses. Sequence variation is remarkably high in Mimulus, and the abundance of point mutations and insertion/deletions makes alignment very difficult outside of genic regions. We first applied AnchorWave71 to detect inversions by aligning each alternative genome, chromosome by chromosome, to IM767. This program, which was designed for highly variable organisms like corn (or Mimulus), establishes ‘anchors’ as colinear blocks of sequence between aligned chromosomes. Coding sequences are the primary building blocks of these anchors. Anchors can be positive or negative alignments between assemblies; inversions are called from negative alignments. We implemented AnchorWave, chromosome by chromosome, using custom Python scripts. We used default parameter values except for “I” which we reduced from 2 to 1. This code and all other python programs described below, are publicly accessible on github (https://zenodo.org/records/14013030) with documentation explaining their use.

AnchorWave detected 178 inversions across the nine alternative lines relative to IM767. Oftentimes, the same inversion was detected in multiple lines, and after distilling these cases, we identify 64 non-redundant inversions. To refine the location of inversion breakpoints (which emerge as inter-anchor intervals from AnchorWave), we mapped exon sequence from all genes annotated in the IM767 assembly (our reference) to each alternative genome using Minimap272 with settings updated to account for the high variation present even in coding sequences. Treating exons as genetic markers, we confirmed the reversal of both order and mapping orientation (positive or negative) of markers within the Anchorwave predicted inversions. We could resolve breakpoint regions to smaller intervals for many inversions using the exon mappings. For the third analysis, we applied ‘pipeline 3’ from Zhou et al.73 mapping each chromosome of each alternative genome to IM767 using Minimap2 followed by inversion calling using Syri74. This method, which is not explicitly focused on coding sequences, identified 715 total inversions. This reduces to 400 non-redundant inversions across lines (reported as Supplementary Data 2). We find that pipeline 3 usually ‘captures’ Anchorwave inversions (those in the set of 64 are contained with the larger collection). Syri identified many additional inversions, but these are typically small and most do not contain even a single complete gene. While many of the pipeline 3 predicted variants may be real, we do not consider them further in this study. Our focus here is on sequence divergence within, and expression of, genes (Figs. 13). The pipeline 3 calls corresponding to AnchorWave inversions were used to refine breakpoint estimation. Since Syri yields a point estimate instead of a range for breakpoints, we accepted the Syri estimate whenever it fell within the interval predicted by the two previous methods. When there was no estimate from Syri, we chose the center of the range from exon mapping as the putative inversion breakpoint.

For a subset of loci, we used the long read data to confirm that putative inversions were not due to contig assembly error. Using Minimap2, we mapped the original PacBio long reads from several of the lines, first to the IM767 reference genome and then to the alternate lines carrying the alternative orientation. With IM767 as the mapping reference, we confirmed that the long reads from IM767 DNA aligned in fully colinear way to the IM767 assembly across the predicted inversion breakpoints. We confirmed that long reads from the alternative line did not, either because they did not map at all or because only one end the long read mapped (the remainder ‘soft clipped’ and not aligned). For these partially mapped sequences, we split the original long read (usually 10–50 kb in length) into two fasta files, breaking the sequence beyond the mapped portion. We then remapped the two ends as distinct sequences. Routinely, we were able get the split reads to map, each to one end of the inversion with the predicted change in alignment direction. We repeated this procedure with the long-read mappings to the alternative genome assembly. Here, we obtained the same outcome except that splitting was necessary on the long reads from the IM767 DNA.

We polarized inversion orientations by inspecting inverted regions in genome assemblies from more distantly related Mimulus genomes. We used AnchorWave and exon mapping to align M. tilingii, M. nasutus, M. cardinalis and M. lewisii to IM767. M. tilingii and M. nasutus are close relatives of IM M. guttatus, each about twice as sequence divergent from IM as IM sequences are to each other. M. cardinalis and M. lewisii are more distantly related75. For most inverted regions, we could identify the homologous sequence region in multiple outgroups and the ancestral orientation was unambiguous: All outgroup species shared the same orientation and it matched either IM767 or the alternative line. In some cases, the orientation of M. tilingii or M. nasutus differed from the other groups, suggesting that (a) the inversion segregated within the common ancestor of IM and the outgroup species, or that (b) the inversion was produced by mutation within one of the descendant lineages but has since introgressed into the other lineage. In these cases, we assigned orientation based on the most distantly related, aligned outgroup (M. cardinalis and/or M. lewisii). Ten of the 64 inversions could not be polarized because the close relatives differed from each other in orientation and extensive structural changes made the alignments to M. cardinalis and M. lewisii unintelligible.

Nucleotide diversity calculations

For nucleotide diversity estimation (and testing), we distill observations from each inversion into a single collection of values (πAA, πAD, and πDD) and then averaged over genes within the inversion. We then average estimates across inversions, which guarantees an equal contribution of each inversion to the overall results (distinct inversions are the units of replication). We used Mummer 3.076 and SVMU77 to call SNP variants across positions that were reliably aligned between IM767 and the other genome assemblies. Using custom python scripts, we determined π between each pair of lines for each gene (from start to stop codon) across the genome. Genes were classified as (a) in the interior of inversions, (b) within the inversion but nearest the breakpoints, (c) nearest to breakpoints but outside an inversion, or (d) residing in the remainder of the (colinear) genome. For the 54 of 64 inversion that could be polarized as ancestral or derived, we assigned the intra-orientation nucleotide diversity estimates as πAA or πDD. The inter-orientation diversity, πAD, could be assigned to all inversion related genes.

We tested for differences in diversity statistics using a two factor ANOVA with location-relative-to-inversion (interior, inside breakpoint, or outside breakpoint) as one factor and contrast (πAA, πAD, or πDD) as the second factor (Fig. 1b). The genomic background estimate for π is reported as a constant (the confidence interval is miniscule because it is based on thousands of genes). We used a general linear model with contrast as a categorical factor and either derived frequency (Fig. 1c) or Log-transformed inversion size (Fig. 1d) as a continuous predictor. This model included an interaction to test for slope heterogeneity. Given significant heterogeneity for both, we performed separate linear regressions to estimate the distinct responses of πAA, πAD, and πDD to each predictor. We also calculated πAA, πAD, and πDD in 2 kb windows across each inversion without consideration of gene boundaries. These traces were initiated 20 kb upstream of the left breakpoint of each inversion and terminated 20 kb downstream of the right flank (Fig. 2, Supplementary Figs. 163). These calculations could only be performed where homologous sites could be confidently aligned between genomes. Consequently, π trajectories through intergenic regions routinely have gaps.

Gene expression calculations

For the first analysis, we directly extracted estimates for the genetic variance in expression per gene, and the cis-component of that variance, from Supplementary Table 4 of the eQTL paper53. This analysis was limited to the 12,987 genes that could be ascertained in all ten genomes and that passed other filters. We reanalyzed the data here to include more genes, all with estimates from at least 5 of the 9 crosses. For determining the average level of expression of each genotype in each F2 panel (homozygous for the IM767 allele, heterozygote, or homozygous for the alternative line allele), we started with the raw RNAseq read counts for each gene53. We then normalized for the total number of RNAseq reads per plant, which gives expression levels at each gene in Counts per Million (CPM). We excluded genes with an average CPM < 0.5. Next, we standardized each gene by dividing individual plant expression levels by the CPM of that gene so that the average is 1.0 across all F2 plants. We applied linear regression to each gene within each cross with standardized expression as the dependent variable and the alternative allele count (0, 1, or 2) as the independent variable. The regression slope is the average effect56 of the alternative allele in that cross for that gene. Given our standardization, an average effect of 0.1 means that heterozygotes have ≈ 10% higher expression than the IM767 homozygote. Applied to all ascertained genes, we find that the mean average effect is close to zero (a mixture of positive and negative values across genes and crosses). The mean absolute value for the average effect (horizontal dotted line in Fig. 2B) was 0.182 (S.E.M. = 0.00056).

The genetic variance in expression, Vg, and the cis-component of that variance, Vg(cis), were treated as the dependent variable in an ANOVA with gene location (outside flanking, inside flanking, inversion interior, or background genome) as the predictor (Supplementary Fig. 64). We performed a similar test on the reanalysis of the data on the effect estimates (regression slopes) for each gene within each cross. For this, we calculated the average pairwise difference between estimates for each gene and tested whether this was affected by gene location (Supplementary Fig. 64). Next, we considered only genes within inversions and partitioned pairwise differences statistics within and between cross types (Fig. 3c). For the subset of inversions with more than one line carrying both the Ancestral and Derived orientations, we partitioned the within-cross type statistic into Ancestral and Derived components. To test for differences (within versus between and Ancestral-within versus Derived-within) we permuted inversion orientation versus genetic effect estimates within genes. We then compared the observed differences (Fig. 3c) to the distribution of differences for each contrast across 10000 permuted datasets (Fig. 3d, Supplementary Fig. 65).

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.