K−1) and the phenotypic variance are the main factors influencing the genetic variance and heritability (h2). These factors and h2 are also the main factors influencing the variance of EBVs. Pedigree- and genomic-based relationship matrices (A and G as K) and phenotypes on 599 wheat lines were used. Also, data were simulated, and a hybrid (genomic-pedigree) relationship matrix (H as K) and phenotypes were used. First, matrix K underwent a transformation (K* = wK + α11′ + βI), and the responses in the mean and variation of diag(K−1) and offdiag(K−1) elements, and genetic variance in the form of h2 were recorded. Then, the original K was inverted, and matrix K−1 underwent the same transformations as K, and the responses in the h2 estimate and the variance of EBVs in the forms of correlation and regression coefficients with the EBVs estimated based on the original K−1 were recorded. In response to weighting K by w, the estimated genetic variance changed by 1/w. We found that μ(diag(K)) − μ(offdiag(K)) influences the genetic variance. As such, α did not change the genetic variance, and increasing β increased the estimated genetic variance. Weighting K−1 by w was equivalent to weighting K by 1/w. Using the weighted K−1 together with its corresponding h2, EBVs remained unchanged, which shows the importance of using variance components that are compatible with the K−1. Increasing βI added to K−1 increased the estimated genetic variance, and the effect of α11′ was minor. We found that larger variation of diag(K−1) and higher concentration of offdiag(K−1) around the mean (0) are responsible for lower h2 estimate and variance of EBVs.This study investigated the main factors influencing the genetic variance and the variance of breeding values (EBV). The first is the variance of genetic values in the base population, and the latter is the variance of genetic values in the population under evaluation. These variances are important as improper variances can lead to systematic bias. The inverse of the genetic relationship matrix ( The inverses of these matrices are used in BLUP. Denoting A, G, and H as K, BLUP (in its simplest form) is written as:Best linear unbiased prediction BLUP,  segregatP GBLUP, , and H fssGBLUP, , where HX and Z are matrices relating phenotypes to fixed effects and individuals, respectively, y, λ is the residual to genetic variance ratio, equal to (1—h2)/h2, and h2 is the heritability of the trait. The greater the genetic variance, the lower the λ, and the wider the distribution of EBVs deviated from the mean. Matrix K and the phenotypic variance (within and across families) are other factors influencing the genetic variance and the variance of EBVs. The more related the individuals in a population, the less the genetic variation in that population. Genetic variance is a function of μ(diag(K)) − μ(offdiag(K)) = Dk (μ(K) is heavily ((1–1/n)%, where n is K’s dimension) influenced by μ(offdiag(K)). According to “the genetic variance is the variance of the genetic values of a set of individuals who constitute the reference, or base, population”, and it is a function of Dk. The higher the Dk value, the higher the genetic variance.where  = Dk , and μ, inaccurate estimates of unknown parent groups, and using outdated or improper genetic parameters as the main sources of bias in ssGBLUP evaluations. It is interesting to know which properties of K elements cause different estimates of genetic variance and distributions of EBVs for different K.For the same population, trait, and model, different variance , which cluations . TsurutaG is built and inverted for GBLUP, A−1 and H−1 are directly obtained without forming A and H. Matrix G−1 is needed as a part of H−1 , and the covariance made between phenotypes and genetic effects . However, the phenotypic variance, individuals on which phenotypes are recorded (viaZ), and other blocks of the mixed model equations, such as those corresponding to additional random effects (if any) also play a role in the proportion of total variance allocated to additive genetic effects, and the distribution of EBVs.The aim of this study is to find distribution properties of μ ± sd of 0 ± 1.The built-in data from R package BGLR  was usedμ ± sd of 48.08 ± 6.48.Data were simulated to test the hypotheses on more than the wheat data. The R package pedSimulate  was usedy = μ + Zu + e. There was no fixed effect other than the overall mean. Matrix G was formed using method 1 of G = WW′/2∑pl(1 − pl), and then combined with A as 0.95G + 0.05A, where pl is the marker allele frequency at locus l, and W is the centered and scaled genotype matrix. The wheat data underwent PBLUP and GBLUP, and the simulated data underwent ssGBLUP  were estimated using ASReml statistical software . BreedinK and the estimated h2 and the distribution of EBVs, matrix K underwent the following transformation.To study the relationships between the properties of w , α , and β  were tested on K, and the influences on the distributions of diag(K−1), offdiag(K−1), and the estimated h2 were studied. For PBLUP (K = A), α = –0.05 was not tested, as it was leading to negative offdiag(A) values. Similarly, α = 0 and β = –0.05 was not tested on A, as it was leading to diagonal values less than 1. One of the main characteristics of A as opposed to G (and H) is having a 1-tailed distribution with the minimum diagonal and off-diagonal values of 1 and 0, respectively.Different combinations of α and β re-base K and diag(K), respectively. Coefficient w weights K, which also changes μ(diag(K)) − μ(offdiag(K)), the variation in K elements, and the variation in diag(K) relative to the variation in offdiag(K).Coefficients K  was inverted, and then K−1 was transformed using K with K−1 in the equation). Different combinations of w, α, and β were tested on K−1 (same as those tested on K), and the influences on the h2 estimate, and the distribution of EBVs were studied. Distribution of EBVs were compared to those using the original K−1  by regressing the latter to the first, and estimating the Pearson correlation between the two sets of EBV. EBVs were predicted using the h2 estimate applying the original K−1vs.The original K and K−1 in the context of ssGBLUP  further than the mean of offdiag(K), and increased the variance of offdiag(K) further than the variance of diag(K).In animal populations, matrices ectively . The wheKviaα and w, and re-basing diag(K) viaβ, on the distribution (μ ± sd) of diag(K−1). The corresponding results for offdiag(K−1) are presented in w from 0.9 to 1.1, and β from –0.05 to 0.05 reduced both the mean and sd of diag(K−1). The reductions by the increase of β were more noticeable than the reductions by the increase of w. The effect of α was marginal. For the wheat data, reduction of β to –0.05 had severe consequences on the properties of K−1 as in some cases μ(diag(K−1)) became negative or largely positive, and sd(diag(K−1)) and sd(offdiag(K−1)) increased tremendously. This numerical instability can be due to K getting close to singular by the reduction of μ(diag(K)) − μ(offdiag(K)). The consequences were less severe for w = 1.1 and more severe for w = 0.9. The reason is again due to the change of μ(diag(K)) − μ(offdiag(K)) because of w. Like A, an A−1 in a good numerical condition is expected to have a minimum of diagonal values equal to 1 . Matrix A, which compared to G had 3.11 times μ(diag(K)) − μ(offdiag(K)), 0.611 times sd(diag(K)), and 2.893 times sd(offdiag(K)), showed μ(diag(K−1)) and μ(offdiag(K−1)) close to those for G, 1.750 times sd(diag(K−1)), and 1.887 times sd(offdiag(K−1)).w, α, and β on μ(offdiag(K−1)), sd(offdiag(K−1)), and μ(diag(K−1)) − μ(offdiag(K−1)) were similar to those for the mean and sd of diag(K−1)). For the simulated data, μ(offdiag(K−1)) remained –0.001, regardless of w, α, and β. For α = 0, μ(diag(K−1)) − μ(offdiag(K−1)) was slightly higher compared with α = –0.05 and α = 0.05, indicating a better numerical condition for K−1, since 11′ is completely singular.The effects of K can be decomposed to SQS, where S2 is a diagonal matrix of variances equal to diag(K), and Q is a correlation matrix. Adding α11′ + βI to K changes it to S*Q*S*, where α and negative β increase the absolute values in Q*. With the correlations getting closer to each other and to 1 or –1, the co-linearity in Q* increases and consequently K* becomes closer to singular. That would cause irregular and unstable distribution of the K−1 elements. When K reaches singularity and becomes non-positive-definite, it turns non-invertible. Also, wK is equivalent to multiplying S by Every covariance matrix 2 was estimated for the simulated data, before and after setting some pedigree information to missing , and the estimates were 0.2910 and 0.2600, respectively. The reduction in the h2 is expected as missing pedigree information makes A−1 sparser and closer to an identity matrix. w and β applied to K, on the h2 estimate. There was no h2 estimate for A, α = 0, and β = –0.05. The effect of α was minor and it did not change the h2 estimate rounded to four decimal points. The h2 estimate increased slightly by increasing β and largely by decreasing w. The estimated genetic variance changed 1/w times in response to w (results not shown). Multiplying K by w, is equivalent to multiplying the genetic variance by w. In response, the estimated genetic variance changed by 1/w. Similarly, increasing S to S* with a positive α + β is expected to increase the variances in K and reduce the estimated genetic variance and h2. However, change of the correlation matrix Q to Q* worked in the opposite direction. Consequently, no h2 change was observed by changing α, and the h2 estimate was even increased by increasing β. The correlations (Q) are expected to increase by increasing α. On the other hand, a positive β is expected to bring correlations closer to 0, and a negative β is expected to deviate correlations from 0.The h2 estimates were considerably lower for A than for G (for the wheat data). The results ) − μ(offdiag(K)) in the genetic variance ) − μ(offdiag(K)) was considerably higher than for G. The higher genetic variance imposed by A compared with G was compensated by a lower estimate of genetic variance and h2. Also, α did not make any change to μ(diag(K)) − μ(offdiag(K)), neither to the estimates of genetic variance and h2. Given the magnitude of β in changing μ(diag(K)) − μ(offdiag(K)), it played a small role in changing the genetic variance and the h2 estimate.The h results  confirmevariance . For A, A−1 and G−1 for their large h2 difference, and the results are presented in A−1) and diag(G−1) was small (A−1) had a wider range (0.5–540.490 vs. 3.324–303.766) compared with diag(G−1) (A−1) and offdiag(G−1) were also similar (A−1) had a wider range (–500 to 2.936 vs. –172.679 to 26.056) compared with offdiag(G−1)  were between –0.02 and 0.02, it was 6.37% for offdiag(G−1)  . The ave similar , but offag(G−1) . Both Aag(G−1) .A−1)) showed a lower mean and a higher sd compared with those for max(diag(G−1)), –0.904 ± 20.477 vs. –0.500 ± 9.064. Diagonal elements corresponding to min(offdiag(K−1)) were 590.490 and 500 for A−1, and 303.766 and 243.530 for G−1, all amongst the largest diagonal elements. Diagonal elements corresponding to max(offdiag(K−1)) were moderate to large, 7.666 and 9.089 for A−1, and 85.750 and 188.623 for G−1.Off-diagonal elements corresponding to max(diag(2 for PBLUP are due to the large ranges of diag(A−1) and offdiag(A−1), or due to the high concentration of A−1 elements ) and off-diagonal elements less than min(offdiag(G−1)) were discarded. Discarding 10 rows/columns of A−1 and their corresponding phenotypes changed the range of diag(A−1) to 0.5 and 259.224, and the range of offdiag(A−1) to –166.667 and 2.936. The h2 estimate changed from 0.3357  had a range of –1.45 to 2.62 for the off-diagonal elements, and 1 to 6.90 for the diagonal elements. 96.9% of the off-diagonal elements were between –0.02 and 0.02. The distribution of diag(H−1) is presented in H−1 corresponding to the largest diag(H−1) (ranging from 6.45 to 6.90) were discarded to study the effect of a lower range and variation of diag(H−1) on the h2 estimate. That reduced max(diag(H−1)) to 5.12. Also, μ(diag(H−1)) − μ(offdiag(H−1)) reduced from 2.808 to 2.801, but the range of offdiag(H−1) did not change. The h2 estimate increased from 0.2600 to 0.2637, which confirmed the results from the wheat data, where a lower variation in diag(K−1) resulted in a higher h2 estimate.The K , and the responses in the h2 estimate and EBV distribution were measured. The effects of w, α, and β applied to K−1 on the h2 estimate are presented in 2 estimate increased slightly by increasing w and largely by increasing β. The effect of α was insignificant. The h2 estimates were similar for α = –0.05 and α = 0.05. For the simulated data, α = 0 resulted in a slightly higher h2 estimate. For the wheat data and β = 0.05, α = 0 resulted in a slightly higher h2 estimate, but it was the opposite when β = –0.05. For both K and K−1, the increase of β resulted in a higher h2 estimate, and as expected the effect of w applied to K−1 on the h2 estimate was the opposite to that of K. The constant α almost had no effect on the h2 estimate when applied to K, and had a small effect on the h2 estimate when applied to K−1.The same transformations applied to K  were appK−1 and the original K−1  are presented in 2 estimate from the original K−1 was used for the EBV prediction in all the analyses, (1) to be able to distinguish between the effects of K−1 and h2 used in the mixed model equation, and (2) estimation of variance components is computationally intensive, and in routine genetic evaluations, usually, it is not affordable to update them regularly. Deviation of w from 1, and α and β from 0 reduced the EBV correlations. Differences in the correlations due to w and β were minor. Differences were also minor for α and the wheat data. However, deviation of α from 0 substantially reduced the correlations for the simulated data, which might be an indication of K−1 further inflicted by singularity than for the wheat data.Correlation coefficients between EBV from different K−1 on the EBVs using the original K−1  are presented in 2 estimate using the original K−1 was used for the EBV prediction in all the analyses. Increasing w and β and deviation of α from 0 reduced the regression coefficient, as a result of inflated evaluations. Where the regression coefficient is greater than the correlation coefficient, it means that the variance of EBVs has increased, and vice versa. Generally, decreasing w and β resulted in increasing the variance of EBVs. Unless K−1 has not inflicted by the singularity of α11′ , the role of α on changing the variance of EBVs was marginal.Regression coefficients of the EBVs using different w, α = 0, and β = 0, EBVs remained unchanged using the h2 estimate from the same K−1 rather than the original K−1 . Diagonal elements of A are twice the probability of two random gametes from an individual carrying identical by descent alleles, and offdiag(A) are equal to the numerator of the coefficients of relationship between pairs of individuals  between pairs of individuals increases, further by shared homozygosity for rare alleles. Following method 1 of G for individual i, and the off-diagonal element of G between individuals i and j equal:Different factors define the elements of ividuals . Diagona alleles . Off-diaMij is the genotype  of individual i at locus l, and n is the total number of genotype markers.Where A−1 increase by the number of individual’s progeny, known mates, and known parents (A−1) are those between mates, which increase as the number of their progeny increases, and negative offdiag(A−1) are those between parent and progeny. Individual i’s inbreeding coefficient adds to the elements of A−1 corresponding to its progeny and to Aii , and deducts from the elements corresponding to its mates (G−1. We found a correlation of 0.091 between diag(A) and diag(A−1), and –0.194 between diag(G) and diag(G−1).Diagonal elements of  parents . Considets mates . Little K and K−1 result in different h2 estimates and distributions of EBVs. We studied some distribution properties of K and K−1 elements to learn about the properties of the two matrices influencing the h2 estimate and the distribution of EBVs. Higher phenotypic variance and h2 result in higher genetic variance and the variance of EBVs. Furthermore, the distribution of K and K−1 elements are important as they directly and indirectly (via the estimated h2) influence the genetic variance and the variance of EBVs. Matrix K, which defines the genetic relatedness among individuals and the amount of inbreeding, underwent a combination of three transformations, each with three levels. Adding α11′ to K is equivalent to re-basing the base population to a former generation with a positive α ), and/or very large sd(diag(K−1)) and sd(offdiag(K−1)) are indirect indicators of K’s ill numerical condition.Different sitive α , which iβ, μ(diag(K)) − μ(offdiag(K)) or Dk is changed. A positive β means adding to inbreeding coefficients while keeping genetic covariances ) unchanged. It also means adding unstructured variance to the structured genetic variance, which resulted in the increase of the genetic variance, the h2 estimate, and the variance of EBVs. In inbred populations, offdiag(K) increase further than diag(K) by inbreeding. As a result of the reduced Dk, the genetic variance, and the variance of EBVs are expected to reduce. Weighting K by w, both the genetic variance and Dk are weighted. This weight is captured by the variance component estimation and in response to the genetic variance multiplied by w, 1/w of the genetic variance is estimated, which is equivalent to changing h2 from 1/(1 + λ) to w/(w + λ). Similarly, weighting K−1 by w, w times the genetic variance is estimated, which is equivalent to changing h2 to 1/(1 + wλ). Applying the weighted K−1 and its corresponding variance components in the form of h2, EBVs remained unchanged. This shows the importance of using variance components corresponding to the K−1 that is used in BLUP. Using improper or outdated variances is an important source of bias in genetic evaluations  should be avoided in BLUP using other K−1 . This study showed very different h2 estimates for the same population and trait, based on different K−1 .Depending on the sign of luations . VariancDk as a distribution parameter of K influencing the genetic variance. We studied μ(diag(K)) − μ(offdiag(K)) instead of Dk, however for large matrices like K , μ(K) is heavily defined by μ(offdiag(K)). Matrix K−1 underwent the same transformations as matrix K. Coefficient α re-bases the matrix, coefficient β re-bases the diagonal elements, and coefficient w inversely weights the genetic variance and changes the mean and the variance of the matrix, further for the diagonal elements, since those have larger mean and variance. We found that, w and β applied to K−1 influence the h2 estimate and the distribution of EBVs. The effect of α was marginal for both K and K−1, unless it inflicts them with singularity. We also found that lower variance of diag(K−1) can result in higher h2 and thus greater variance of EBVs. For the off-diagonal elements of K−1, more important than the variation of the elements, was how they are concentrated around their mean. For example, the h2 estimate by G−1 was considerably greater than for A−1, for the wheat data. Whereas the off-diagonal elements of G−1 showed a smaller range and variation, those were more widely centered around 0 than the off-diagonal elements of A−1.In agreement with previous studies, we found


Clunio marinus (Diptera) from Roscoff (France) differ in lunar reproductive timing. One type reproduces at full moon, the other at new moon, controlled by a circalunar clock of yet unknown molecular nature. Lunar reproductive timing is a magic trait for a sympatric speciation process, as it is both ecologically relevant and entails assortative mating. Here, we show that the difference in reproductive timing is controlled by at least four quantitative trait loci (QTL) on three different chromosomes. They are partly associated with complex inversions, but differentiation of the inversion haplotypes cannot explain the different phenotypes. The most differentiated locus in the entire genome, with QTL support, is the period locus, implying that this gene could not only be involved in circadian timing but also in lunar timing. Our data indicate that magic traits can be based on an oligogenic architecture and can be maintained by selection on several unlinked loci.The evolutionary trajectories and genetic architectures underlying ecological divergence with gene flow are poorly understood. Sympatric timing types of the intertidal insect  We recently discovered that in Roscoff (France) FM and NM timing types occur in sympatry, largely separated by reproductive timing, but still connected by gene flow Notably, low tide water levels follow a bimodal distribution across a lunar month, with minima at both full moon and new moon. These minima are ecologically equally suitable for ST = 0.028). Principal component analysis (PCA) and ADMIXTURE identify one individual as a migrant in time, which was caught at full moon among FM type individuals, but genetically clearly is of NM type . The resulting set of 721,000 genetic variants  indicated limited genetic differentiation between the FM and NM types , and heterozygotes for the inversion (SI1). Genotype assignments are confirmed by local admixture analysis  and three clusters of heterozygotes . Individuals that are I1I1 genotypes in the 2.7–4.4 Mbp and 11.3–18.7 Mbp windows , In(1b) and In(1c), leading to four distinct haplotypes of chromosome 1  and In(1b), both of which are supported by inverted marker order on the genetic linkage map . Marker 2 and I1I2  and period is a core circadian clock gene. The QTL at the end of chromosome 1, outside the inversion system, also shows a single strong divergence peak  and Basque Coast (Jean-2NM) strains During the last ice age, the English Channel did not exist period as the most differentiated locus between NM and FM types, overlapping with a QTL for lunar reproductive timing, suggests that this circadian clock gene might also be involved in lunar time-keeping. The other prominent candidates, plum, cask, and stat1 are involved in neuronal or synaptic development and plasticity. Notably, cask is a direct interaction partner of CaMKIIClunioClunio strains, for which genomic analysis of the loss of lunar rhythms also implied circadian GO terms as the top candidates for affecting circalunar time-keeping, followed by GO terms involved in nervous system development The detection of Laboratory strains for crossing experiments and field samples for whole genome sequencing of 48 individuals were available from a previous study cat function. Adapters were trimmed with Trimmomatic --emitRefConfidence GVCF -stand_call_conf 30, recalibration of base qualities using GATK BaseRecalibrator with ‘-knownSites’. Preparing recalibrated BAM files with GATK PrintReads using -BQSR. Recalling of genotypes using GATK HaplotypeCaller with previously mentioned parameters. Individual VCF files were combined into a single file using GATK GenotypeGVCFs.DNA from the 48 field caught individuals were subject to whole genome sequencing in the Max Planck Sequencing Centre (Cologne) on an Illumina HiSeq3000 according to standard protocols. Independent sequencing runs were merged with the ST) was estimated using vcftools parameters --weir-fst-pop--fst-window-size 1--fst-window-step 1.The vcf file containing GATK-called SNPs and small indels from 48 Ros-2FM and Ros-2NM males was filtered with vcftools version 0.1.14 --r2--inter-chr. The large LD file was then sorted into 3 files, one for each chromosome. Breakpoints of large chromosomal inversions were approximated by plotting r2 and manually looking for obvious breaks in the r2 scores  of 20, maximum missing genotypes per site of 20% leaving 344,331 variants. The same was done for the 24 Ros-2NM individuals resulting in 352,915 variants. The filtered vcf files were converted to plink input files and plink version 1.90 beta 2 scores .--nonfounders --pca var-wts--chr-set3 no-xy no-mt. Windowed PCA: In order to investigate regions of the genome with unusual degree of variance, PCA was run in windows along the three chromosomes. Vcf files were subdivided into vcf files containing variants that belong to 500 kb sliding windows with 100 kb steps. They were further used to calculate PCA values for each window as noted above. Local PCA: To get the genotype-estimate of the identified inversions (see long-range disequilibrium section), we subdivided vcf files according to the estimated inversion breakpoints , and for windows corresponding to the inversions . The vcf file containing GATK-called SNPs and small indels from 48 Ros-2FM and Ros-2NM males was filtered with vcftools version 0.1.14 akpoints , and calAncestry and relatedness of the 48 individuals of Ros-2FM and Ros-2NM population were investigated with admixture version 1.3.0 --het flag. Proportion of observed heterozygosity was calculated for each file by dividing the number of observed heterozygotes with the number of variants. Patterns of heterozygosity along the chromosomes were assessed based on the vcf files containing variants that belong to 500 kb sliding windows with 100 kb steps (see PCA and admixture section). Finally, in order to calculate observed heterozygosity of the chromosomal inversions, observed heterozygosity was calculated per inversion window for each individual  according to the manufacturer’s instructions. The two parents were subject to whole genome sequencing with 2x150 bp reads on an Illumina HiSeq2000 according to standard protocols. Read mapping and genotype calling were performed as described above. Microsatellite and indel genotypes were obtained by custom parsing of the vcf files. PCR primers  and distribution of alleles (checkAlleles) were assessed to confirm the quality of the input data. The correct marker order was inferred by rippling across all markers of each chromosome (ripple). Missing data (countX0) and error load (top.errorload) were assessed. Then the best model was obtained in a stepwise selection procedure (stepwiseqtl). Additional interactions were checked for in a two QTL scan (scantwo), but were negligible and not considered in the final model. Finally, a model with 4 non-epistatic QTL was subject to model fitting for Multiple QTL Mapping (fitqtl) and the QTL’s 95% Bayesian confidence intervals were estimated (bayesint). Composite Interval Mapping was performed in QTLcartographer Linkage analysis and QTL mapping were based on a set of F2 families derived from a single pair of parents. Analyses were performed in R/qtl according to the script in -- min_het_af 0.1 and –genotype. SVIM v1.2.0 lr -y pb -q 20--svtype  and the output VCF files per SV type were merged with a custom script. The resulting VCF files were then sorted using vcf-sort and filtered for quality “PASS” using a custom bash script. SURVIVOR v1.0.6 --Ivcf option and --min_support 5 (minimum number of reads supporting a SV). Finally, SURVIVOR merge (same parameters as above) was used to merge the re-genotyped SVs detected in Ros-2NM and Ros-2FM. SV support was reported in PacBio long read data was obtained for pools of 300–500 individuals from laboratory strains of Ros-2NM and Ros-2FM . DNA was extracted as above and sequenced with standard protocols on a PacBio Sequel II at the Max Planck Sequencing Facility in Cologne, Germany. Raw long-reads of Ros-2FM and Ros-2NM were mapped against the reference CLUMA 2.0 (publication in preparation) using NGM-LR v.0.2.7 period locus was genotyped. The fragment was PCR amplified (primers: 5’-GAATACTGAGTGTAAGACTTGGC and 5’-ACAACGTGACCTGTGACAAT) and run and scored on 1.5% agarose gels.An insertion-deletion (indel) mutation in the Requests should be addressed to Tobias S. Kaiser (kaiser@evolbio.mpg.de). This important article provides solid evidence for an apparent oligogenic architecture of an ecologically relevant trait, the circalunar reproduction of marine midges, which contributes to assortative mating, is likely under divergent selection, and supports reproductive isolation in sympatry. public reviews designed to be posted alongside the preprint for the benefit of readers; (ii) feedback on the manuscript for the authors, including requests for revisions, shown below. We also include an acceptance summary that explains what the editors found interesting or important about the work.Our editorial process produces two outputs: (i) Decision letter after peer review:eLife. Your article has been reviewed by 2 peer reviewers, and the evaluation has been overseen by a Reviewing Editor and Detlef Weigel as the Senior Editor. The reviewers have opted to remain anonymous.Thank you for submitting your article "An oligogenic architecture underlying ecological and reproductive divergence in sympatric populations" for consideration by The reviewers have discussed their reviews with one another, and the Reviewing Editor has drafted this to help you prepare a revised submission. As you will see, both expert reviewers like the topic and the system you have established, but have also significant concerns, mostly about interpretation, but some also regarding technical issues.Essential revisions:Please be more stringent in your discussion and interpretation of 'magic traits' and their genetic basis, and especially how they can be differentiated from related genetic and evolutionary phenomena.State clearly that the conclusions are drawn from a single cross rather than population-wide linkage mapping and that it cannot be excluded that the species-wide genetic architecture of the trait of interest is more complex than suggested here.Temper your claims of genomic regions of high differentiation being the causal drivers of the ecological differentiation.Add technical detail, as outlined in the individual reviews.Reviewer #1 (Recommendations for the authors):This manuscript describes a very interesting set of experiments on co-located populations of marine midge that emerge either at full or at new moon. There are several aspects of the study that will attract broad attention: the genetic architecture of a trait involved in reproductive isolation, the role of chromosomal inversions in population divergence and the link between the circadian and circalunar clocks. The authors choose to focus on 'magic traits'. This is not a straightforward idea. For a broad audience, it is important that the idea is explained carefully and I do not think that the current Introduction provides such a clearly-argued context. I have made specific comments by line numbers below. A related issue is whether the timing difference is actually under divergent selection. Probably it is but this is important for the argument in the manuscript and so reasons for expecting divergent selection and the likely nature of the selection should be described.The experiments and analyses generally appear robust and appropriately interpreted. I have some reservations that are detailed below but I doubt any of them will influence the major conclusions. Data are not presented for long-read detection of SVs. There is generally some uncertainty about the interpretation of inversions, but this is handled well. The inversion genotypes of individuals used in the QTL mapping crosses were not determined (or at least they are not presented). This influences the direct interpretation of the crosses but it may also influence the larger picture because the mapping cross is just between two individuals. If these individuals were homozygous for the same arrangement of a given inversion, the cross might give a very different outcome from one between individuals homozygous for different arrangements. This is a particular case of the general problem of interpreting a cross between two individuals as if it represents the genetic basis of the difference between two populations.More specific comments follow by line number:30-32 – this is not a great summary because it starts by contrasting two extremes and then effectively says that there is evidence for some kind of intermediate. It is surprising that Coyne and Orr's book is not cited since it is probably the best summary of the debate up to 2004.33 – 'mechanisms' is not a good choice of word here since it implies something that is fabricated by selection for the purpose of isolation34-36 – also cite Felsenstein 1981. Note that 'ecological divergence' is a component of 'reproductive isolation' and so the wording here is problematic. It should be something like 'ecological divergence and other components of reproductive isolation'. This applies at multiple points in the manuscript.37 – while ref. 8 is the origin of the term 'magic trait', ref. 13 provided an important discussion of the idea and ref. 6 provided an alternative terminology as well as clarifying the relationship with pleiotropy. If the magic trait/multiple-effect trait idea is central to this manuscript, some of this literature should be cited.41 – see ref. 6 for a view on the role of pleiotropy. In my view, nothing in the magic trait idea implies a small number of genes: the point is that the trait contributes to multiple components of reproductive isolation and this can be true regardless of its genetic basis. This is part of the reason why confounding the idea with pleiotropy is unhelpful.42-44 – the theoretical basis for this claim should be supported with citations, as well as giving examples in the next sentence.65 – actually, this is not enough to meet the magic trait definition because there also need to be evidence for 'ecological divergence': the FM and NM types need to be locally adapted to their niches in some sense. Alternatively, hybrids might suffer a fitness cost – a form of incompatibility. This would fit the multiple-effect trait definition advanced by ref. 6 but not the definition of magic traits used here .72 – I think the authors probably mean 'linkage disequilibrium' here, rather than 'genetic linkage'.91-2 – some caution is needed here since F1 and BX hybrids alone do not represent gene flow. A plot of heterozygosity against hybrid index, or an analysis using NewHybrids would help to show whether later generation hybrids occur. However, caution is also needed because of segregation of structural variants that might be shared between ecotypes and can distort Fst and admixture analyses.98-100 – meaning 'polymorphic in both timing types', I assume. It seems that the data behind the SV calls in figure 1C are not shown anywhere.Figure 1 and S4 – running the windowed PCA and the PCAs in Figure 1 without the 4 outlying FM individuals might well give clearer patterns. The rationale behind the grouping into genotypes in Figure 1 is not clear.134-140 – support for I3 is relatively weak, but that is clear from the text.141-6 – this partly answers the question about assignment to genotypes – it uses more than just the PCA shown in Figure 1. At present, this is all quite hard to access, even though I am used to plots of this type.150-2 – it may be worth noting that this helps to explain the LD patterns in Figure S2: because NM segregates only for I1 and I2, there is LD only in the I2 region (the only region where recombination is suppressed). In FM, recombination is suppressed over the length of I1, but we might expect more gene flux in the area of I2 because it is collinear in SI2 individuals. However, this is all without thinking about gene flow between FM and NM. The strong differences in LD seem quite surprising to me, given the previous inference of extensive gene flow.Table S1 gives the margins of the area of SD (with surprisingly high precision). Since LD can extend well beyond breakpoints it may be better not to think of these as estimated breakpoint positions.158 – again, SV calling data are not shown.Figure 3 – it is unfortunate that the 'peaks around day 20' overlap with the 'natural' distributions, and no single cut-off can separate them. Do points around day 25 belong to the 'spurious' distribution? Are conclusions about QTL sensitive to decisions about boundaries?168 – maybe 'at least four QTL' since it is impossible to exclude the presence of other loci or of more loci under the broad peaks observed .Figure 4A,B – it is not clear why two lines are plotted in 4A for Chr1. The inference that the gene order is 'reversed' in I1 and I2 is relative to the reference genome . Importantly, there is no evidence of recombination suppression in the cross analysed, which implies that the FM and NM parents were homozygous for the same (inverted) arrangement. This is actually quite surprising, given the arrangement frequencies inferred from Figure 1. However, it is unclear whether the methods used would have picked up partial recombination suppression due to heterozygosity in the grandparents .185 – does 'largely additive' mean that dominance effects were small or not significant? In Table S4d, the dominance effects look non-significant but there is no comparison of models with or without dominance. Fig, S7B,C have not come through well in my PDF. Here the tests for epistasis seems to exclude dominance.187-90 – this, of course, confirms that other loci are likely to contribute.193-5 – see comments above on Figure 4A,B. It needs to be clear what the inferred inversion genotypes of the parents and F1 were in these crosses. This influence interpretation substantially.199 – but these inversions were also apparently not segregating in the cross families.207 – Figure 4B does not make this clear because it does not show Fst for each inversion, only for SNPs within inversion. Also note that a new inversion is typically fixed for one allele at any locus where the ancestral arrangement is polymorphic. There are then many combinations of inversion and SNP frequencies in two populations for which Fst is higher for the SNP than for the inversion, without any requirement for gene flux (as suggested on line 209). Gene flux is needed for cases where both arrangements carry both alleles .217-8 – there is no expectation that differentiation at a single locus will be protected by an inversion so it would help to reword this sentence a bit. I think the authors mean that differentiation at period is not enhanced by association with other locally-adaptive variants that is maintained by an inversion.250-1 – this comes back to issues in the Introduction with the 'magic trait' idea. The basis of this idea is that recombination is less important because recombination cannot separate the two (or more) components of reproductive isolation influenced by the trait. If one component of isolation is local adaptation (as proposed here but not directly established) then each locus influencing the trait will be under divergent selection. An inversion might be favoured because it maintains advantageous combinations of these loci (the Kirkpatrick-Barton mechanism) but this is different from the case where assortative mating (for example) is not under direct selection and so only evolves in response to indirect selection .251-3 – this is a slightly odd distinction. I think it needs to be explained a bit more fully and, ideally, related to relevant models for the spread of inversions.265-7 – this comment about what is 'generally assumed' should be supported by citations. It reflects a view in the Introduction that 'magic traits' are expected to have a simple genetic basis, a view that I consider incorrect (see earlier comments).272-3 – I am not sure that it is helpful to introduce the idea of 'evolutionary branching' here without further discussion. It would be more in line with the rest of the manuscript to say that the timing ecotypes might accumulate other components of reproductive isolation and eventually complete speciation.287-8 – in line with previous comments, I think that describing the genetic basis of a putative ‘magic trait’ is a valuable contribution but does not require any re-evaluation.Methods328-30 – this identifies the margins of the region of LD, which do not necessarily correspond to breakpoints.372-3 – this does not provide sufficient information – see comments on the Results.384-5 – this analysis used all F2 families derived from one pair of grandparents, I believe. This should be made explicit. The inversion genotypes of the parents should be determined , because the parents may have been heterozygous and so the F1 may have varied.389-90 – so far as I can see this was without formal testing for dominance effects.395-413 – it seems that the results of these analyses are not available anywhere.Reviewer #2 (Recommendations for the authors):This study system promises to hold exciting insights into the genetic basis of ecological traits but there are limitations in the analyses and interpretation that temper my overall enthusiasm for the paper. These are included in my public review but I list them with specific analysis suggestions below:1) The QTL mapping relies on a modest number of individuals and there are important details missing. The authors should provide the overall heritability of the trait, which can be estimated from their parental and offspring data with some assumptions. For the estimates of QTL effect sizes from such small samples, there is a common issue known as the Beavis effect that can inflate the effect size of individual QTL. Related to this, the total effect size of the QTL reported is extremely high and the authors should consider (e.g. with simulations) that the effect size is substantially inflated. The authors should report individual effect sizes and explore their power to detect QTL with different effect sizes given their study design. I think that consideration of heritability and overall power will help with interpretation of this result.2) My major issue with the paper is the interpretation of divergence within the inversion as linked causally to the genes underlying ecological divergence. As the authors observe, divergence will vary within an inverted region. This can be traced to myriad factors, including variation in mutation rate, variation in constraint, patterns of ancestral polymorphism within this region, and variation in gene conversion within the inversion. Given this, I do not think it is valid to interpret the regions of high differentiation as the causal drivers of the ecological differentiation. In my view, the results need to be reframed in the context of ecological adaptation dependent on large inversions and potentially interesting candidate genes, without a claim that the results can be narrowed to individual genes.3) The authors imply in the discussion based on historical results that the ecotype evolved in situ in the last ~60 years. This speculation should be removed as it seems much more likely that the ecotype was either missed in sampling or a recent migrant introduced it to the area in the recent past. Essential revisions:Please be more stringent in your discussion and interpretation of 'magic traits' and their genetic basis, and especially how they can be differentiated from related genetic and evolutionary phenomena.We have completely rewritten the introduction as well as the discussion, in order to now make a clear distinction between magic traits, pleiotropy and genetic linkage as mechanisms for coupling different components of reproductive isolation.State clearly that the conclusions are drawn from a single cross rather than population-wide linkage mapping and that it cannot be excluded that the species-wide genetic architecture of the trait of interest is more complex than suggested here.We have included respective statements in the results , discussion (lines 386-398) and method sections (lines 481-482).Temper your claims of genomic regions of high differentiation being the causal drivers of the ecological differentiation.We tempered our wording and now speak of “potential candidate genes” which “may” point to specific molecular mechanisms to be involved in ecological divergence.Add technical detail, as outlined in the individual reviews.We have added technical detail in many sections, as requested by the reviewers (for details see specific replies below).Reviewer #1 (Recommendations for the authors):This manuscript describes a very interesting set of experiments on co-located populations of marine midge that emerge either at full or at new moon. There are several aspects of the study that will attract broad attention: the genetic architecture of a trait involved in reproductive isolation, the role of chromosomal inversions in population divergence and the link between the circadian and circalunar clocks.We thank the reviewer for this positive assessment of our work.The authors choose to focus on 'magic traits'. This is not a straightforward idea. For a broad audience, it is important that the idea is explained carefully and I do not think that the current Introduction provides such a clearly-argued context. I have made specific comments by line numbers below.We have entirely revised the introduction in order to provide a clearer context (lines 30-62), based on the very helpful detailed comments that the reviewer gave below.A related issue is whether the timing difference is actually under divergent selection. Probably it is but this is important for the argument in the manuscript and so reasons for expecting divergent selection and the likely nature of the selection should be described.We have inserted the reasoning for why divergent selection is expected (lines 75-88).The experiments and analyses generally appear robust and appropriately interpreted. I have some reservations that are detailed below but I doubt any of them will influence the major conclusions. Data are not presented for long-read detection of SVs. There is generally some uncertainty about the interpretation of inversions, but this is handled well. The inversion genotypes of individuals used in the QTL mapping crosses were not determined (or at least they are not presented). This influences the direct interpretation of the crosses but it may also influence the larger picture because the mapping cross is just between two individuals. If these individuals were homozygous for the same arrangement of a given inversion, the cross might give a very different outcome from one between individuals homozygous for different arrangements. This is a particular case of the general problem of interpreting a cross between two individuals as if it represents the genetic basis of the difference between two populations.We appreciate that the reviewer considers our analyses robust and appropriately interpreted. Nevertheless, the reviewer makes very detailed and helpful suggestions, which clearly improve our manuscript, even though the major conclusions are indeed not influenced. We thank the reviewer for these comments. As all of the points raised here are detailed below, we respond to them one by one below.More specific comments follow by line number:30-32 – this is not a great summary because it starts by contrasting two extremes and then effectively says that there is evidence for some kind of intermediate. It is surprising that Coyne and Orr's book is not cited since it is probably the best summary of the debate up to 2004.We have revised this section and inserted the citation (lines 30-34).33 – 'mechanisms' is not a good choice of word here since it implies something that is fabricated by selection for the purpose of isolationWe have replaced “mechanism” with “component” (line 36).34-36 – also cite Felsenstein 1981. Note that 'ecological divergence' is a component of 'reproductive isolation' and so the wording here is problematic. It should be something like 'ecological divergence and other components of reproductive isolation'. This applies at multiple points in the manuscript.We have inserted the citation and changed the wording as suggested (lines 37-39).37 – while ref. 8 is the origin of the term 'magic trait', ref. 13 provided an important discussion of the idea and ref. 6 provided an alternative terminology as well as clarifying the relationship with pleiotropy. If the magic trait/multiple-effect trait idea is central to this manuscript, some of this literature should be cited.We have changed the citations as requested and introduced a clear distinction between pleiotropy, magic traits and genetic linkage (lines 39-59).41 – see ref. 6 for a view on the role of pleiotropy. In my view, nothing in the magic trait idea implies a small number of genes: the point is that the trait contributes to multiple components of reproductive isolation and this can be true regardless of its genetic basis. This is part of the reason why confounding the idea with pleiotropy is unhelpful.We agree with this comment and have inserted a statement that the concept of a magic trait does not include an assumption on the genetic basis of the trait and should not be confused with pleiotropy (lines 44-46).42-44 – the theoretical basis for this claim should be supported with citations, as well as giving examples in the next sentence.We have inserted both a citation and examples (lines 51-59).65 – actually, this is not enough to meet the magic trait definition because there also need to be evidence for 'ecological divergence': the FM and NM types need to be locally adapted to their niches in some sense. Alternatively, hybrids might suffer a fitness cost – a form of incompatibility. This would fit the multiple-effect trait definition advanced by ref. 6 but not the definition of magic traits used here .We have inserted an explanation of how and why the FM and NM types are expected to be under divergent ecological selection (lines 75-84). Interestingly, it is also true that hybrids are expected to suffer a fitness cost. We have inserted this as a second component of reproductive isolation (lines 84-88).72 – I think the authors probably mean 'linkage disequilibrium' here, rather than 'genetic linkage'.We replaced 'genetic linkage' with 'linkage disequilibrium' (line 95).91-2 – some caution is needed here since F1 and BX hybrids alone do not represent gene flow. A plot of heterozygosity against hybrid index, or an analysis using NewHybrids would help to show whether later generation hybrids occur. However, caution is also needed because of segregation of structural variants that might be shared between ecotypes and can distort Fst and admixture analyses.We have rephrased the section to be more cautious about the issues the reviewer is raising here (lines 115-117).98-100 – meaning 'polymorphic in both timing types', I assume. It seems that the data behind the SV calls in figure 1C are not shown anywhere.We have inserted that inversions are ´polymorphic´ (lines 123-126). The results of SV calling are now given in a new Supplementary File 1 and the sequence data behind it are included in our ENA submission PRJEB54033.Figure 1 and S4 – running the windowed PCA and the PCAs in Figure 1 without the 4 outlying FM individuals might well give clearer patterns. The rationale behind the grouping into genotypes in Figure 1 is not clear.We have performed PCA without the 4 outlying FM individuals, but the overall picture did not get clearer. Therefore, we decided to show the full dataset. The rationale behind the grouping into genotypes is explained in the text (lines 132-168).134-140 – support for I3 is relatively weak, but that is clear from the text.As the reviewer considers weak support for I3 to be clear from the text, we did not make any changes.141-6 – this partly answers the question about assignment to genotypes – it uses more than just the PCA shown in Figure 1. At present, this is all quite hard to access, even though I am used to plots of this type.Yes, we also relied on heterozygosity and admixture analyses. In order to make this clearer, we rewrote the corresponding section of the results (lines 145-149) and inserted a new “Figure 2—figure supplement 2” with the local admixture analysis.150-2 – it may be worth noting that this helps to explain the LD patterns in Figure S2: because NM segregates only for I1 and I2, there is LD only in the I2 region (the only region where recombination is suppressed). In FM, recombination is suppressed over the length of I1, but we might expect more gene flux in the area of I2 because it is collinear in SI2 individuals. However, this is all without thinking about gene flow between FM and NM. The strong differences in LD seem quite surprising to me, given the previous inference of extensive gene flow.Table S1 gives the margins of the area of SD (with surprisingly high precision). Since LD can extend well beyond breakpoints it may be better not to think of these as estimated breakpoint positions.We inserted the explanation of the LD blocks based on the distribution of haplotypes (lines 188-192). We also think of the margins of LD as approximations of the inversion breakpoints and state this clearly in Supplementary File 2, as well as in the methods (line 420-423).158 – again, SV calling data are not shown.We have inserted the SV calling data and now refer to it in the text (lines 123-126). See comment above.Figure 3 – it is unfortunate that the 'peaks around day 20' overlap with the 'natural' distributions, and no single cut-off can separate them. Do points around day 25 belong to the 'spurious' distribution? Are conclusions about QTL sensitive to decisions about boundaries?It is indeed unfortunate that the spurious peaks do partially overlap with the natural distribution of the parental strains. However, QTL analysis solely relies on the phenotype distribution of the F2. Therefore, a single cut-off for all distributions is not required. In the F2 the spurious peak and the actual peak are separated by at least 1 day without any emergence. Hence, the decision about the boundaries is clear and we did not have to test different boundaries in QTL mapping.Individuals emerging around day 25 indeed belong to the spurious peak. We have adjusted the figure accordingly .168 – maybe 'at least four QTL' since it is impossible to exclude the presence of other loci or of more loci under the broad peaks observed .We have changed the wording to at least 4 QTL (lines 209-210). We also noticed that CIM in Figure 5—figure supplement 2  suggests multiple loci under some peaks, but these patterns change with size of the exclusion window in CIM, so we decided not to mention them in order not to over-interpret the CIM.Figure 4A,B – it is not clear why two lines are plotted in 4A for Chr1. The inference that the gene order is 'reversed' in I1 and I2 is relative to the reference genome . Importantly, there is no evidence of recombination suppression in the cross analysed, which implies that the FM and NM parents were homozygous for the same (inverted) arrangement. This is actually quite surprising, given the arrangement frequencies inferred from Figure 1. However, it is unclear whether the methods used would have picked up partial recombination suppression due to heterozygosity in the grandparents .There are two lines for Chr1 because two QTL were detected in Multiple QTL Mapping, and then the LOD profiles for both QTL are plotted along the chromosome. Indeed, the inference that the gene order is reversed is relative to the reference genome.2 and I1I2  and these genotypes explain the partial recombination suppression in the F1 generation.Regarding recombination suppression, there is partial recombination suppression in Chr1. Note that the genetic distance on the linkage map between markers C1M7 and C1M5 is much smaller on the genetic map compared to the corresponding sequence in the reference genome. We have now determined the inversion genotypes for the parents of the cross to be SI185 – does 'largely additive' mean that dominance effects were small or not significant? In Table S4d, the dominance effects look non-significant but there is no comparison of models with or without dominance. Fig, S7B,C have not come through well in my PDF. Here the tests for epistasis seems to exclude dominance.fitqtl function (see Supplementary File 5d) are small. The tests for epistasis (scantwo) in “Figure 5—figure supplement 1”  did not produce significant dominance interactions either. In scantwo there was a significant interaction for two loci (c1:c2), but in the model selection procedure implemented in stepwiseqtl this interaction did not significantly improve the full model and was therefore dropped again from the analysis.Indeed, the dominance effects given by the 187-90 – this, of course, confirms that other loci are likely to contribute.Yes, indeed. We included this statement (lines 239-240).193-5 – see comments above on Figure 4A,B. It needs to be clear what the inferred inversion genotypes of the parents and F1 were in these crosses. This influence interpretation substantially.2 and I1I2 , so that we can expect partial recombination suppression in the F1. This information was inserted in the Results section .The inversion genotypes of the parents were determined to be SI199 – but these inversions were also apparently not segregating in the cross families.Here the parental inversion genotypes were SI and II or both SI respectively, again resulting in partial recombination suppression in the F1. We have inserted this information in the Results section (lines 253-255).207 – Figure 4B does not make this clear because it does not show Fst for each inversion, only for SNPs within inversion. Also note that a new inversion is typically fixed for one allele at any locus where the ancestral arrangement is polymorphic. There are then many combinations of inversion and SNP frequencies in two populations for which Fst is higher for the SNP than for the inversion, without any requirement for gene flux (as suggested on line 209). Gene flux is needed for cases where both arrangements carry both alleles .ST values for inversions 2L, 2R, 3L and 3R and added them to Figure 3 . In the text we now refer to both figures 3 and 5 (previously 2 and 4), to make the comparison (lines 263-266). We are aware that a new inversion is usually fixed for one inverted allele, while the ancestral arrangement is polymorphic, allowing for FST values of polymorphic SNPs within the inversion to exceed the FST values of the inversion. This implies that individual SNPs within the ancestral arrangement are strongly differentiated between the timing types . We have included this possibility in the text (lines 267-269). Our test for the period locus then shows that there is not just differentiation in the ancestral arrangement, but gene flux between the arrangements (lines 273-284).We have calculated the F217-8 – there is no expectation that differentiation at a single locus will be protected by an inversion so it would help to reword this sentence a bit. I think the authors mean that differentiation at period is not enhanced by association with other locally-adaptive variants that is maintained by an inversion.We agree with the reviewer and have reworded the sentence accordingly (lines 281-284).250-1 – this comes back to issues in the Introduction with the 'magic trait' idea. The basis of this idea is that recombination is less important because recombination cannot separate the two (or more) components of reproductive isolation influenced by the trait. If one component of isolation is local adaptation (as proposed here but not directly established) then each locus influencing the trait will be under divergent selection. An inversion might be favoured because it maintains advantageous combinations of these loci (the Kirkpatrick-Barton mechanism) but this is different from the case where assortative mating (for example) is not under direct selection and so only evolves in response to indirect selection .We have completely rewritten this paragraph (lines 321-337). Having now introduced a clear distinction between genetic linkage, magic traits and pleiotropy in the introduction, we here argue that given our data we don’t think genetic linkage is the mechanism for coupling the components of reproductive isolation. We elaborate on why recombination is not important for a magic trait and that we expect divergent selection on all loci affecting the magic trait. We conclude that selection on these loci might favor the spread of certain inversion haplotypes and that this creates a new substrate for additional, genetically linked components of reproductive isolation to evolve.251-3 – this is a slightly odd distinction. I think it needs to be explained a bit more fully and, ideally, related to relevant models for the spread of inversions.In course of rewriting the whole paragraph (see comment above), we no longer make this distinction. We now explicitly refer on how natural selection might drive the spread of certain inversions (lines 328-333).265-7 – this comment about what is 'generally assumed' should be supported by citations. It reflects a view in the Introduction that 'magic traits' are expected to have a simple genetic basis, a view that I consider incorrect (see earlier comments).We agree with the reviewer that magic traits do not need to have a simple genetic basis. Therefore, we have removed the respective section from the discussion.272-3 – I am not sure that it is helpful to introduce the idea of 'evolutionary branching' here without further discussion. It would be more in line with the rest of the manuscript to say that the timing ecotypes might accumulate other components of reproductive isolation and eventually complete speciation.We have rewritten the entire paragraph based on comments from the other reviewer. As a consequence, the idea of evolutionary branching is no longer mentioned. The idea that timing ecotypes might accumulate other components of reproductive isolation and eventually complete speciation was added to the paragraph above (lines 328-337).287-8 – in line with previous comments, I think that describing the genetic basis of a putative ‘magic trait’ is a valuable contribution but does not require any re-evaluation.We agree with the reviewer and have rewritten the sentence accordingly (lines 378-380).Methods328-30 – this identifies the margins of the region of LD, which do not necessarily correspond to breakpoints.We are fully aware that the region of LD can only approximate the breakpoints and have changed the wording accordingly (lines 420-423).372-3 – this does not provide sufficient information – see comments on the Results.We inserted a statement of how the peaks are delineated (lines 466-469).384-5 – this analysis used all F2 families derived from one pair of grandparents, I believe. This should be made explicit. The inversion genotypes of the parents should be determined , because the parents may have been heterozygous and so the F1 may have varied.The information that it was a single pair of parents was already given in the section above (lines 463-466). For clarity, we have repeated it in the section on QTL mapping (lines 481-482). We did determine the inversion genotypes of the parents and have inserted the information in the text . Indeed, the F1 likely varied for inversion genotypes, leading to recombination suppression in some families, but not others, i.e. partial recombination suppression overall.389-90 – so far as I can see this was without formal testing for dominance effects.fitqtl) includes the calculation of dominance effects, which are given in Supplementary File 5d (previously Supplementary Table 4). We wrote that the model we used (y = Q1 + Q2 + Q3 + Q4) consisted of “four additive QTL” as a contrast to putative epistatic effects, not as a contrast to dominance effects. In order to avoid the confusion, we have replaced “additive” with “non-epistatic” (lines 489-491).The R/qtl function we used  and the sequence data behind it (ENA accession PRJEB54033). We did not include a detailed analysis of all SV calls, because we consider it distracting from the story presented here. A full account of the SV calls will be given in a separate manuscript.Reviewer #2 (Recommendations for the authors):This study system promises to hold exciting insights into the genetic basis of ecological traits but there are limitations in the analyses and interpretation that temper my overall enthusiasm for the paper. These are included in my public review but I list them with specific analysis suggestions below:1) The QTL mapping relies on a modest number of individuals and there are important details missing. The authors should provide the overall heritability of the trait, which can be estimated from their parental and offspring data with some assumptions. For the estimates of QTL effect sizes from such small samples, there is a common issue known as the Beavis effect that can inflate the effect size of individual QTL. Related to this, the total effect size of the QTL reported is extremely high and the authors should consider (e.g. with simulations) that the effect size is substantially inflated. The authors should report individual effect sizes and explore their power to detect QTL with different effect sizes given their study design. I think that consideration of heritability and overall power will help with interpretation of this result.We appreciate these comments but we are not sure how they would affect our overall conclusions. Heritability is evidently dependent on the environmental conditions, which would be rather different in nature, compared to the laboratory conditions. It is not clear what we would gain by calculating a heritability for our QTL experiment. Additionally, even if we make the assumption that environmental variance is equal in the F1 and F2 generations and thus calculate the genetic variance as the difference between the variances in the F1 and the F2, we are still lacking an independent estimate of environmental variance and we can still not calculate broad sense heritability. We do not see which additional reasonable assumptions we can make in order to obtain an estimate of heritability. But we provide now the individual effect sizes for the QTLs in the text (they were previously somewhat hidden in the suppl. tables). In addition, we point out that they could be overestimated about 3-fold, due to the Beavis effect (lines 236-240). Given that all evidence points to an oligogenic architecture, an overestimate of effect sizes is actually a conservative assumption.Similarly, we think that performing simulations to estimate the power of our QTL mapping approach would not help the overall argument . We expect that we are likely missing QTL with minor effects and state so in the revised manuscript (lines 239-240).2) My major issue with the paper is the interpretation of divergence within the inversion as linked causally to the genes underlying ecological divergence. As the authors observe, divergence will vary within an inverted region. This can be traced to myriad factors, including variation in mutation rate, variation in constraint, patterns of ancestral polymorphism within this region, and variation in gene conversion within the inversion. Given this, I do not think it is valid to interpret the regions of high differentiation as the causal drivers of the ecological differentiation. In my view, the results need to be reframed in the context of ecological adaptation dependent on large inversions and potentially interesting candidate genes, without a claim that the results can be narrowed to individual genes.We agree that divergence peaks can be traced to many different factors. We were not intending to make the claim that all genes underlying these divergence peaks are identical with the genes underlying ecological divergence. But we do think that the divergent genes are good candidates for being ecologically relevant. In the end, we have tempered our wording – as suggested by the editor and the reviewer – and now speak of “potential candidate genes” which “may” point to specific molecular mechanisms underlying ecological divergence .ST values now in Figure 3  in order to underline there is no differentiation. We have therefore not followed this suggestion.We don’t think that we can make the alternative claim suggested by the reviewer, namely that adaptation is dependent on the large inversions. Firstly, the inversions cover the largest part of the genome so that some QTL will necessarily overlap with them. Secondly, except for chr1 there is no differentiation of inversions between ecotypes. We have given the F3) The authors imply in the discussion based on historical results that the ecotype evolved in situ in the last ~60 years. This speculation should be removed as it seems much more likely that the ecotype was either missed in sampling or a recent migrant introduced it to the area in the recent past.We were not intending to imply that the ecotype necessarily evolved in situ. We have therefore re-written the entire paragraph to include an alternative time-frame  and to explicitly refer to the possibility of introgression (while we explicitly do not refer to evolution in situ). See lines 363-368.


Drosophila suzukii as a model system to evaluate the relative influence of genetic and plastic effects on the match of populations to environments with periods of stability from three to four generations. This invasive pest insect can develop within different fruits, and persists throughout the year in a given location on a succession of distinct host fruits, each one being available for only a few generations. Using reciprocal common environment experiments of natural D. suzukii populations collected from cherry, strawberry, and blackberry, we found that both oviposition preference and offspring performance were higher on medium made with the fruit from which the population originated than on media made with alternative fruits. This pattern, which remained after two generations in the laboratory, was analyzed using a statistical method we developed to quantify the contributions of local adaptation and adaptive plasticity in determining fitness. Altogether, we found that genetic effects  dominate over plastic effects (adaptive phenotypic plasticity). Our study demonstrates that spatially and temporally variable selection does not prevent the rapid evolution of local adaptation in natural populations. The speed and strength of adaptation may be facilitated by several mechanisms including a large effective population size and strong selective pressures imposed by host plants.Both local adaptation and adaptive phenotypic plasticity can influence the match between phenotypic traits and local environmental conditions. Theory predicts that environments stable for multiple generations promote local adaptation, whereas highly heterogeneous environments favor adaptive phenotypic plasticity. However, when environments have periods of stability mixed with heterogeneity, the relative importance of local adaptation and adaptive phenotypic plasticity is unclear. Here, we used  Adaptation is common when environments change over multiple generations, whereas plasticity is common when environments change over an individual's lifetime. However, it remains unclear whether plasticity or adaptation is more vital to maintaining performance when environments change at an intermediate pace. Drosophila suzukii is well‐suited to evaluating the relative importance of plasticity and adaptation in response to an intermediate pace of environmental change. This invasive pest species experiences an environment that shifts every one to four generations as host fruits change over time and space. Here, we studied natural populations of D. suzukii collected from different hosts. Using reciprocal common environment experiments, we evaluated their performance on their source and alternative hosts. Drosophila suzukii populations were most fit on their source host, successfully tracking an intermediate pace of environmental change. We developed a statistical method to quantify the contributions of adaptive plasticity and local adaptation in determining performance. We found that performance was mainly maintained through local adaptation to each new host in succession. This study highlights that spatially and temporally variable selection does not prevent local adaptation and, on the contrary, illustrates how rapid the adaptive process can be. It also provides a novel statistical tool that can be applied to other systems.Natural populations often exhibit good “fit” to the environment they are in. However, environments change over time and space, and following change, the fit between a population and its environment may be poor. A question of long‐standing interest is how do populations track changing environments to maintain performance? Two main mechanisms are known: , Fragaria × ananassa Duch (strawberry), and Rubus fruticosus (blackberry). We chose these fruit species to represent agronomically important crops  and a wild host fruit considered to be an important reservoir . Populations hence likely evolved on the sampled host for several generations. In addition, if we happened to sample offspring of recent immigrants, that would merely weaken our ability to detect patterns of local adaptation, and thus any such bias would be in a conservative direction. Field‐collected fruits of each population were brought back to the laboratory and kept at 21°C, 65% relative humidity, and an 18:6 (L:D) hour cycle in large plastic cages (volume ∼90 L) until adult D. suzukii flies emerged. This sampling scheme was used consistently throughout the entire experiment. Only the sites from which more than 150 individuals emerged were included in the experiments, leaving a total of 25 sites out of the original 47 .Between May 2018 and October 2018, we collected fruits from a total of 47 sites in the South of France Fig. . The samWe measured female preference, fecundity, and offspring performance of field‐collected flies and lab‐reared flies on purees made from original fruits Fig. .4, 0.05% of CaCl2, and 16 mL antimicrobial solution . See Olazcuaga et al. , we prepared media using frozen purees of each of the three fruits rather than whole fruits. Batches of media were made with 600 mL of each fruit puree, supplemented with 400 mL of sterile deionized water, 1% (wt/vol) of agar, 6% of inactive malted brewer's yeast, and 1.5% of yeast extract. We then added an antimicrobial solution, which consisted of 6 mL of 99% propionic acid, 10 mL of 96% ethanol, and 0.1% of methylparaben sodium salt. For the common environment, we used a standard laboratory fly food  including 1000 mL of sterile deionized water, 1% (wt/vol) of agar, 6% of dextrose, 3% sucrose, 8% of inactive malted brewer's yeast, 2% of yeast extract, 2% of peptone, 0.05% of MgSOa et al.  for prodD. suzukii individuals and discarded other Drosophila species . We performed reciprocal common environment experiments in the laboratory using (i) 7‐day‐old (±2 days) G0 adults that emerged from field‐collected fruits and (ii) 7‐day‐old (±1 day) G2 adults obtained after two generations of maintenance in a common environment . Unlike an experiment where all populations would grow under controlled conditions in all test environments and then be measured in each test environment , the two‐generation experimental design we used enabled us to detect potential adaptive phenotypic plasticity in responses to environmental cues that are independent of the fruit itself . Using a two‐way experimental design by rearing laboratory flies on different fruits for two generations under laboratory conditions could have decreased our power to detect adaptive plasticity. For each population, we estimated female preference and offspring performance in artificial fruit media (hereafter test fruit) composed of either the fruit from which the population was sampled  or two other alternative fruits. We measured oviposition preference and fecundity on each test fruit (see below) in G0 and G2, as proxies for female preference, and we measured egg‐to‐adult survival in G1 and G3, as a proxy for offspring performance.We collected adult flies from the field‐collected fruits after the peak of emergence . We kept only s Hauser . We placD. suzukii hosts that are present in the region from which wild populations were collected, expanding the inference space in which we measure oviposition preference. The detection of the oviposition preference for a fruit in these arenas is conservative, because the preference in a choice environment of 12 fruits would likely be present in a choice environment containing only three of these fruits. In addition, this experimental design has been used in other studies  distributed randomly into 12 compartments .For each trait and each generation separately, we tested whether populations had a higher preference for or performance in their original fruit than in alternative fruits. First, to visualize the patterns, we plotted the average trait in the medium corresponding to alternative fruits against the same average trait in the medium corresponding to the original fruit for each population. In addition, we computed the weighted correlation coefficient between the average trait in alternative fruits and their average in the original fruits, using the total number of vials for each population as weight, and estimated its 95% confidence interval using the D. suzukii  detailed in Blanquart et al. . Unlike SA, which indicates whether the test fruit is the original (sympatric) fruit or an alternative  fruit. The significance of the SA effect is tested using an F‐test where the ratio evaluates the variation due to SA over the total variation minus that due to habitat and population quality , test fruits , and an interaction between original fruits and test fruits. The model also includes a factor, called To evaluate the relative contributions to preference and performance of local adaptation and adaptive phenotypic plasticity, it was necessary to analyze the data across the G0/G1 and G2/G3 generations. When measured on adults that emerged from field‐collected fruits (G0/G1), phenotypic differences among populations can be driven both by genetic differences among populations  and by plastic responses to the natural environment . When measured on adults after two generations of common environment (G2/G3), phenotypic differences among populations are likely to have a genetic basis, as potential maternal and grand‐maternal environmental effects are standardized across populations. Although transgenerational plasticity and other nongenetic factors such as vertically transmitted symbionts can still be present, we use the term “genetic effects” hereafter for the sake of brevity. To evaluate the relative contributions to preference and performance of local adaptation and adaptive phenotypic plasticity, we developed new approaches to visualize and test for genetic and plastic effects. Briefly, by using a custom model that compares the results of the two trials, the G0/G1 generation and the G2/G3 generation, we estimated the variance components and effects that could be attributed to local adaptation and adaptive phenotypic plasticity.To visually illustrate genetic and plastic effects in preference, we estimated the mean of genetic effects based on preference data from G2 and the mean of plastic effects as the difference in preference between G0 and G2, after controlling for other sources of variation, including variation in quality among test fruits and among populations, as well as variation among arenas for oviposition preference or among vials with different egg densities for offspring performance (Appendix S3). Similarly, for performance, we estimated the mean genetic effects from G3, and the mean of plastic effects as the difference between G1 and G3.geneticF and plasticF; see Appendix S4 for details). We performed computer simulations to assess the general properties of our method. We found that both genetic and plastic effects can be reliably detected using our method under both balanced and unbalanced experimental designs, with a false positive rate for the detection of genetic and plastic effects <3%  to account for differences in quality among populations, the jth fruit media estimated in G2  to account for differences in quality among test fruits, the interaction between the jth test fruit and the kth original fruit that is observed in both G0 and G2 , and the plastic difference of these effects in G0 relative to the same effects in G2 . Fixed effects also included two SA effects, which indicated whether the test fruit was the original, sympatric fruit or was an alternative, allopatric fruit in either G0 or G2 (G0G2_jkSAgenetic) and in G0 (G0_jkSAplastic). Hence, G0G2_jkSAgenetic measures local adaptation in both G0 and G2 and G0_jkSAplastic measures adaptive phenotypic plasticity in G0 . The model also included the fixed effect of the mth arena in G0 and G2  to account for differences among arenas and a random error to account for the variation among observations from the same arena . As with the original SA method, this new method detects if there is a significant difference when the test fruit is the original fruit versus an alternative fruit. A significant difference in the associated F‐test with a positive estimate of G0G2SAgenetic and G0SAplastic provides support in favor of local adaptation and adaptive phenotypic plasticity, respectively. We either analyzed the entire dataset (12 fruits) or focused on a smaller dataset with the three fruits of interest . Results were similar in both analyses, so we only present the results with only the three fruits of interest.For oviposition preference, we fitted the following ANOVA model on the log‐number of eggs, meggs).For fecundity, we fitted the same model but without the arena effect. For offspring performance, we fitted the same model with G1 and G3. Offspring performance increases with egg density and levels off at high egg densities Fig. . To accogeneticφ based on the proportion of variance of the interaction test_fruit×G0G2_jkoriginal_fruit explained by G0G2_jkSAgenetic:To estimate the level of local adaptation, we designed a new variable plasticφ was estimated based on the proportion of variance of the interaction test_fruit×G0_jkoriginal_fruit explained by G0_jkSAplastic:Similarly, the level of adaptive phenotypic plasticity Because we did not detect any significant adaptive phenotypic plasticity (see results), we retrospectively performed a simulation‐based analysis to estimate our power to detect the presence of adaptive phenotypic plasticity with our experimental design (Appendix S5).sjstats package .We tested for two sets of correlations. First, we evaluated whether there is a correlation in oviposition preference, fecundity, or offspring performance of populations between generations (Appendix S6). Second, we examined whether the evolution of preference and performance traits is independent or rather if they coevolve. Specifically, we tested for a significant correlation between oviposition preference and offspring performance between G0 and G1, and between G2 and G3 (Appendix S7). In each of these two cases, we estimated correlations using the total number of vials for each population as a weight and estimating its 95% confidence interval using the ρG0 = 0.54 and ρG2 = 0.22; Fig. ρG0 = 0.58 and ρG2 = 0.74; Fig. ρG1 = 0.67 and ρG3 = 0.55; Fig. Across the three traits of interest  and for each generation separately, populations with higher trait values in their original fruit generally had higher trait values in alternative fruits Fig. . Indeed,F1,3 = 106.02, P = 0.002; Fig. F1,3 = 11.55, P = 0.043; Fig. F1,3 = 1.11, P = 0.37; Figs. In G0 and G1, the values of the three traits of interest did not significantly differ between original and alternative fruits Figs. , S5A,C,EP = 0.037 with a positive estimate of G0G2SAgenetic; Table G0G2SAgenetic) explained 74.64% of the variance of the genetic interaction between the test and original fruits in G0 and G2. Although phenotypic plasticity was in the maladaptive direction .When analyzing G0 and G2 data together Fig. , our newP = 0.26 and P = 0.39, respectively; Table For fecundity, the absence of pattern in G0 and G2 when analyzed independently Fig.  was confP = 0.024, with a positive estimate of G1G3SAgenetic; Table G1G3SAgenetic) explained 80.9% of the variance of the genetic interaction between the test and original fruits in both G1 and G3. Although phenotypic plasticity was in the adaptive direction for this trait .The higher performance of the flies on their original fruit media Fig.  had a siWe tested for a correlation between oviposition preference and offspring performance, after controlling for other sources of variation, including variation in quality among test fruits and among populations, as well as variation among arenas for oviposition preference or among vials with different egg densities for offspring performance (see Appendix S7 for details). We found that oviposition preference in G0 was positively correlated with offspring performance in G1, and oviposition preference in G2 was positively correlated with offspring performance in G3 Fig. . The corD. suzukii to evaluate the roles of local adaptation and adaptive phenotypic plasticity in driving fitness adjustment to changes in the environment occurring over an intermediate pace of three to four generations. We focused on three key traits: oviposition preference, fecundity, and offspring performance. We found local adaptation for oviposition preference and offspring performance, but not for fecundity. Females preferred their original fruits, and their offspring performed better on those fruits. We did not find any signature of adaptive phenotypic plasticity for any of the three traits. If adaptive phenotypic plasticity plays a role in the fit to the environment, that role is small enough to be masked by the effects of non‐adaptive plasticity and local adaptation.We used natural populations of D. suzukii populations displayed consistent correlations between the original and test fruits. Some populations had the stronger preference or performance across tested fruits, highlighting the high variation in intrinsic quality among populations. Drosophila suzukii population quality may be related to various ecological and historical factors, as well as their genetic background, with some populations having, for instance, low genetic load and others having higher genetic load. The level of inbreeding depression, which depends on the level of genetic load, is indeed known to vary among wild populations and influences life‐history traits  shapes the way organisms improve the match between their phenotypic traits and their local environment. Based on the period of availability of each host fruit, average temperatures in the studied areas, and the generation time estimates in the laboratory  in succession  Oviposition preference , (B) fecundity , and (C) offspring performance  measured in the D. suzukii inbred line WT3 for each date of reciprocal transplant experiments.Figure S2. Residuals of (A) Oviposition preference, (B) fecundity, and (C) offspring performance, measured in the Appendix S2: Testing for a pattern of local adaptation by considering the variation in intrinsic quality among test fruits and among populations.D. suzukii natural populations for each combination of original fruit and test fruit.Figure S3. (A‐B) Oviposition preference , (C‐D) fecundity , and (E‐F) offspring performance  of Figure S4. Difference in (A‐B) oviposition preference , (C‐D) fecundity , and (E‐F) offspring performance  between original and alternative fruits for each population in generations G0 or G1 (left panels) and G2 or G3 (right panels).D. suzukii natural populations for each combination of original fruit and test fruit either before  or after the common environment .Figure S5. Residual variation after statistically controlling for intrinsic differences in environment and population quality of (A‐B) oviposition preference, (C‐D) fecundity, and (E‐F) offspring performance of Figure S6. First and second axes of the Principal Component Analysis (PCA) of all populations across the three test fruits for (A‐B) oviposition preference, (C‐D) fecundity, and (E‐F) offspring performance in generations G0/G1 (left panels) and G2/G3 (right panels).Appendix S3: Estimation of genetic and plastic effects for each combination of test fruit x original fruit.geneticF and plasticF tests.Appendix S4: Statistical power of a new test to detect local adaptation and adaptive phenotypic plasticity based on the Table S2. Parameters values for the different distributions.F‐test based on an ANOVA model. LMM: F‐test based on a Linear Mixed Model (LMM).Figure S7. Power analyses for the tests on both genetic and plastic effects for balanced and unbalanced designs for each of three data distributions: Normal, Poisson and Binomial distribution of data. Anova: Figure S8. Power analyses for the tests on both genetic and plastic effects with an arena random effect (Poisson distribution of data).G0G2SAgenetic and G0SAplastic for each of the three distributions of data.Table S3. False positive rates for the tests of G0G2SAgenetic for each of the three distributions of data.Table S4. False positive rates for the test of G0SAplastic with each of the three distributions of data.Table S5. False positive rates for the test of Appendix S5: Statistical power to detect adaptive phenotypic plasticity with our experimental setup.G0SAplastic values under our experimental design (X1) and under larger designs  using simulated data.Figure S9. Estimation of the power of detecting plastic effects for different Appendix S6: Correlation across generations for each trait.Figure S10. Relationship between (A) oviposition preference in G0 and G2, (B) fecundity in G0 and G2, and (C) offspring performance in G1 and G3 across the three test fruits.Appendix S7: Test of the “Mother knows best” hypothesis.Figure S11. Correlation between oviposition preference and offspring performance (A) in generation G0/G1 and (B) in generation G2/G3.D. suzukii populations collected in the wild that were subsequently analyzed in the laboratory.Table S6: Key information about the 25 Figure S12. Effect of egg density on offspring performance for each test fruit.Click here for additional data file.Supporting informationClick here for additional data file.