Balancing selection via life-history trade-offs maintains an inversion polymorphism in a seaweed fly

How natural diversity is maintained is an evolutionary puzzle. Genetic variation can be eroded by drift and directional selection but some polymorphisms persist for long time periods, implicating a role for balancing selection. Here, we investigate the maintenance of a chromosomal inversion polymorphism in the seaweed fly Coelopa frigida. Using experimental evolution and quantifying fitness, we show that the inversion underlies a life-history trade-off, whereby each haplotype has opposing effects on larval survival and adult reproduction. Numerical simulations confirm that such antagonistic pleiotropy can maintain polymorphism. Our results also highlight the importance of sex-specific effects, dominance and environmental heterogeneity, whose interaction enhances the maintenance of polymorphism through antagonistic pleiotropy. Overall, our findings directly demonstrate how overdominance and sexual antagonism can emerge from a life-history trade-off, inviting reconsideration of antagonistic pleiotropy as a key part of multi-headed balancing selection processes that enable the persistence of genetic variation.


Statistics
For all statistical analyses, confirm that the following items are present in the figure legend, table legend, main text, or Methods section.

n/a Confirmed
The exact sample size (n) for each experimental group/condition, given as a discrete number and unit of measurement A statement on whether measurements were taken from distinct samples or whether the same sample was measured repeatedly The statistical test(s) used AND whether they are one-or two-sided Only common tests should be described solely by name; describe more complex techniques in the Methods section.
A description of all covariates tested A description of any assumptions or corrections, such as tests of normality and adjustment for multiple comparisons A full description of the statistical parameters including central tendency (e.g. means) or other basic estimates (e.g. regression coefficient) AND variation (e.g. standard deviation) or associated estimates of uncertainty (e.g. confidence intervals) For null hypothesis testing, the test statistic (e.g. F, t, r) with confidence intervals, effect sizes, degrees of freedom and P value noted Give P values as exact values whenever suitable.

For Bayesian analysis, information on the choice of priors and Markov chain Monte Carlo settings
For hierarchical and complex designs, identification of the appropriate level for tests and full reporting of outcomes Estimates of effect sizes (e.g. Cohen's d, Pearson's r), indicating how they were calculated Our web collection on statistics for biologists contains articles on many of the points above.

Software and code
Policy information about availability of computer code Data collection

Data analysis
For manuscripts utilizing custom algorithms or software that are central to the research but not yet described in published literature, software must be made available to editors/reviewers. We strongly encourage code deposition in a community repository (e.g. GitHub). See the Nature Research guidelines for submitting code & software for further information.

Data
Policy information about availability of data All manuscripts must include a data availability statement. This statement should provide the following information, where applicable: -Accession codes, unique identifiers, or web links for publicly available datasets -A list of figures that have associated raw data -A description of any restrictions on data availability Field-specific reporting Please select the one below that is the best fit for your research. If you are not sure, read the appropriate sections before making your selection. Simulation code is available at https://github.com/enormandeau/coelopa_fastsim with parameters files used to generate the simulated data.
All data were analysed using the software R 3.5.0.
Experimental data and simulated data used for all figures are available as an associated source file.

nature research | reporting summary
October 2018 For a reference copy of the document with all sections, see nature.com/documents/nr-reporting-summary-flat.pdf

Ecological, evolutionary & environmental sciences study design
All studies must disclose on these points even when the disclosure is negative. About a thousands flies were collected randomly with insect nets from a population over tens of thousands of flies.

Coelopa frigida flies
Wild samples were collected with nets and brought back to the lab for egg laying.
All flies were raised in controlled conditions in thermo-regulated chambers (25°C).
No ethical approuval was required for invertebrates