Atlantic herring is widespread in North Atlantic and adjacent waters and is one of the most abundant vertebrates on earth. This species is well suited to explore genetic adaptation due to minute genetic differentiation at selectively neutral loci. Here, we report hundreds of loci underlying ecological adaptation to different geographic areas and spawning conditions. Four of these represent megabase inversions confirmed by long read sequencing. The genetic architecture underlying ecological adaptation in herring deviates from expectation under a classical infinitesimal model for complex traits because of large shifts in allele frequencies at hundreds of loci under selection. Clupea harengus) constitutes the basis for one of the world’s most important commercial fisheries  was used as a closely related outgroup in the bioinformatic analysis. We pooled genomic DNA from 35 to 110 individuals per population, and conducted whole-genome resequencing to a minimum of 30 × coverage per population. In order to generate individual genotype data, we sequenced 12 fish from four localities to ~10 × coverage per individual. Together with data from previous studies  autumn- and (ii) spring-spawning herring from the brackish Baltic Sea, (iii) populations from the transition zone, close to the entrance to the Baltic Sea, spawning at lower salinity than in the Atlantic Ocean, (iv) Norwegian fjord populations, (v) populations around Ireland and Britain, (vi) autumn- and (vii) spring-spawning herring from the North Atlantic Ocean . This clto 0.061 .To explore the contribution of strongly differentiated loci to the observed population structure, we separated SNPs showing no significant genetic differentiation between populations from those showing strong genetic differentiation based on their standard deviation of allele frequencies across Atlantic and Baltic populations Methods; . We carrThe PCA analysis based on the differentiated SNPs revealed some intriguing results as regards population classifications . Two popTaken together, in Atlantic herring, a modest number of genetic markers showing strong genetic differentiation provide a much better resolution to distinguish population structure than a large number of random neutral genetic markers.2 test, corrected for inflation due to baseline differences, and used a stringent significance threshold . While exact numbers varied due to sample composition, all contrasts involved approximately six million SNPs.To explore the genetic architecture underlying ecological adaptation in the herring, we formed superpools of populations representing the major groups detected using the PCA analysis , and perLRRC8C   which encodes a volume-regulated anion-channel. Another locus that was highly significant in both replicate comparisons is PRLR (prolactin receptor) on Chr12 highlighted in PRLR  locus , which has a well-defined role in the pathway regulating seasonal reproduction in vertebrates , which regulates gonadotrophin-releasing hormone signaling via the MAPK pathway (SOX11B (SRY-Box Transcription Factor 11), which plays an essential role in sex determination in zebrafish  is a single-base change in a non-coding region located 39 kb upstream of SOX11B (ESR2A (Estrogen Receptor Beta) and SYNE2 (Spectrin Repeat Containing Nuclear Envelope 2), and these two genes are only 100 kb apart  populations from Baltic Sea and (ii) populations from the Northeast Atlantic Ocean. The spring-/autumn-spawning contrast involved 16 Baltic and 12 Northeast Atlantic populations, which yielded 31 and 13 significant loci, respectively . Only setebrates  and CALM pathway . Anotherebrafish . Notablyf SOX11B , suggestkb apart . In fact in mice , suggestMYHC (myosin heavy chain) gene family on Chr12, which may be related to a reported association between myogenesis and plasticity of seasonal development in herring (HERPUD2 (Homocysteine Inducible ER Protein with Ubiquitin-like Domain 2) on Chr19, a gene that has no known function in reproductive biology.In addition to the signals on Chr15, we also found other loci that are associated with adaptation to different spawning seasons, such as multiple members of  herring . AnotherTSHR, HERPUD2, etc.), as expected due to the difference in proportion of autumn-spawners (40% vs. 0%). However, four of the major loci on Chr6, 12, 17, and 23 span exceptionally large regions on four different chromosomes  haplotypes while N (North) haplotypes dominate in all other populations  value exceeded 50  and S haplotypes tend to be more variable than N haplotypes   . Four ofB2) −45; , suggestB2) −45; . HoweverAHR2B2 locus, we noted several other highly significant loci not identified in other contrasts. The most significant SNP on Chr7  member 2 (SLA12A2/NKCC1), a gene that shows altered expression in response to changes in salinity in spawning sea lamprey (THRB (thyroid hormone-receptor beta) on Chr19 encoding a medically important nuclear receptor. Mutations in THRB cause generalized thyroid hormone resistance in human  are fixed for an Atlantic haplotype whereas, with a few exceptions, a ‘Baltic’ haplotype, which must have been introgressed from the sister species Pacific herring, dominates in all populations from the Baltic Sea, the transition zone and Norwegian fjords  gene suggesting that the inversion might affect its expression pattern. It is a highly conserved gene in vertebrates and involved in bone development in human (PacBio long read sequencing of size selected fragments (>40 kb) from one male individual from the Celtic Sea was used in an attempt to validate candidate inversions on Chr6, 12, 17, and 23 . This inin human . CompletThe PacBio data only provided suggestive evidence for an inversion on Chr23. A proximal inversion breakpoint was indicated at 16,378,067 bp, but the characterization of the distal breakpoint was hampered because the individual used for the reference assembly  is most FST values and the one expected under neutrality implies that essentially all loci highlighted as highly differentiated in the present study are due to adaptation. Our data are consistent with a model where the Atlantic herring has a genomic ‘tool box’ of a few hundred major loci associated with ecological adaptation to local climate conditions such as water temperature, salinity, light conditions, and preferred spawning time. We propose that this genetic adaptation is related to life history parameters such as migratory behavior, timing of spawning, and ecological conditions during larval development. The Atlantic herring has a high fecundity where a female can release tens of thousands of eggs at spawning. A perfect match between genotype and environmental conditions gives potential for a highly successful reproduction.The first population genetic studies on Atlantic herring in the early 1980s were based on a dozen allozyme markers and revealed the unexpected result of no significant allele frequency differences even between Atlantic and Baltic herring considered as subspecies . SubsequAHR alone can efficiently distinguish the North Atlantic Ocean groups from all other groups of herring , and the general finding is that most traits are highly polygenic with large number of loci each explaining a tiny fraction of the genetic variance . This isThe genetic architecture underlying ecological adaptation detected here makes perfect sense in light of the ecological challenges involved. The most dramatic differences in biotic and abiotic factors occur between the marine Atlantic Ocean and the brackish Baltic Sea which differ in regard to salinity, variation in water temperature over the year , light crhodopsin (RHO), showing strong genetic differentiation between Atlantic and Baltic herring  gene. Thr346 must be the derived allele since all tested Pacific herring were homozygous Ser346. Furthermore, residue 346 is located in the highly conserved PAS-B domain and Ser346 is highly conserved among vertebrates  sequence variants of major importance, like Phe261Tyr in hodopsin , and  / (2 n + RD), where RD is raw read depth and n is the number of individuals in a given pool.The allele frequency of pool-seq data are calculated based on the counts of reference and alternate reads at each polymorphic site. However, using raw read count could introduce bias in particular population or genomic regions, due to varied sample size across the pools or varied coverage along the genome. To minimize the technical bias, we carried out the Nrrection  before t2p-values are somewhat inflated (λ in the range 1.55–1.92). However, as can be seen in Due to baseline differences in the contrasts, the χTo examine population structure and genetic differentiation among the pools, we performed principal component analysis (PCA) based on corrected allele frequencies of two sets of markers showing (i) no significant genetic differentiation and (ii) highly significant genetic differentiation. The two sets of markers were established based on the genome-wide distribution of the standard deviation (std) of allele frequencies across populations. Based on the genome-wide distribution, we defined SNPs with 0.02 ≤ std ≤ 0.08 and std ≥0.2 as undifferentiated markers and highly differentiated markers, respectively . Minor aAdditionally, we constructed a genetic distance tree based on ~3.2 million whole-genome SNPs after filtering out missing data, using PHYLIP package v3.696 . We randFST in 5 kb sliding windows was calculated using samtools . Bonferroni correction of the p values was calculated in each contrast, and adjusted p<1 × 10−10 was determined as the significance threshold. We clustered the signals as independent loci as described  have a minimal distance of 100 kb from the neighboring loci. We summarized the independent loci in each contrast, and intersected individual SNPs, in order to identify replicated signals between the two contrasts of adaptation to salinity and spawning season, respectively.To maximize the statistical power and minimize the within-population variance, we grouped populations into superpools according to their environmental variables or phenotype, and made contrasts between superpools . For eacescribed , by requDiagnostic markers at the four putative structural variants on Chr6, 12, 17, and 23 were selected for investigating haplotype frequencies across populations in pooled and individual sequencing data. Independent neighbor-joining trees were constructed based on all SNPs from each of the putative structural variants using PLINK v1.90b4.9  and neigA male Atlantic herring was captured in November 25, 2019 in the Celtic Sea  and flash frozen in liquid nitrogen. High molecular weight DNA was extracted from testis using the Circulomics Nanobind Tissue Big DNA Kit (NB-900-701-001). Size selection for molecules over 40 kb using BluePippin (SageScience), and libraries for PacBio sequencing was made using the manufacturer’s protocol. Sequencing was carried out on one PacBio Sequel II 8M SMRT Cell for 15 hr to generate 125 Gb CLR sequence data. Subreads were aligned to the herring reference assembly  using Mi In the interests of transparency, eLife publishes the most substantive revision requests and the accompanying author responses.eLife. Your article has been reviewed by two peer reviewers, and the evaluation has been overseen by a Reviewing Editor and Patricia Wittkopp as the Senior Editor. The reviewers have opted to remain anonymous.Thank you for submitting your article "Genetic architecture underlying ecological adaptation in Atlantic herring is not consistent with the infinitesimal model" for consideration by The reviewers have discussed the reviews with one another and the Reviewing Editor has drafted this decision to help you prepare a revised submission.eLife but that some conclusions require a modest amount of additional new data, as they do with your paper, we are asking that the manuscript be revised to either limit claims to those supported by data in hand, or to explicitly state that the relevant conclusions require additional supporting data.We would like to draw your attention to changes in our revision policy that we have made in response to COVID-19 (https://elifesciences.org/articles/57162). Specifically, when editors judge that a submitted work as a whole belongs in eLife, either of which would be linked to the original paper.Our expectation is that the authors will eventually carry out the additional experiments and report on how they affect the relevant conclusions either in a preprint on bioRxiv or medRxiv, or if appropriate, as a Research Advance in Title: We suggest changing the title to avoid raising expectations about dismissing an infinitesimal model. For example: The genetic architecture underlying ecological adaptation in Atlantic herring.Summary:This paper reports population sampling and a scan for selection in Atlantic herring. The importance of the work derives from the application of genetic results for assessing herring stock, and hence help safeguard sustainable fishing, from better understanding of the genetic changes associated with different marine environments (herring have adapted to brackish sea water) and with the herring's photoperiodic regulation of reproduction. The paper reports analysis of whole genome sequence data from 53 population samples, selected from the entire species distribution, and identifies multiple loci underlying ecological adaptation to different geographic areas and spawning conditions.Revisions for this paper:1) Calibrating the test statistics. The P-values for selection are not well-calibrated. The null hypothesis is that the allele frequencies are identical between subgroups, which is inappropriate because even under neutrality they will vary because of drift and shared ancestry between populations. The selection test needs to be corrected for this population structure. There are a number of approaches that could be used, e.g. post-hoc (e.g. genomic control), or model-based (e.g. a mixed model or including PCs as covariates).2) The paper does not make a convincing case that the findings are "in conflict with the infinitesimal model for complex traits". Overall the arguments presented are over-simplistic and fail to take into account the following:i) An important question about adaption is the distribution of selection coefficients across mutations, for example whether adaptation is driven by new beneficial mutations of large effects that are selected to fixation or if adaptation is polygenic . If the latter, then does it matter how “poly” polygenic is? In any case, even though the authors report a number of loci with large allele frequency shifts, can they actually reject an adaptation model with some loci with large effect sizes and many others with tiny effect sizes?ii) The "pure" infinitesimal model is something of a straw man, since we know that there are a finite number of causal variants, with substantial variation in effect size and that we expect the change in allele frequency of any variant to depend on effect size. Instead, the results from the herring analyses seem consistent with the observations made in many systems (e.g body size in dogs or skin pigmentation in humans) that strong selection can lead to rapid differentiation driven by large-effect variants, even if the within-population architecture remains relatively infinitesimal.iii) There is a distinction between the within-population variance , and the between-population variation, which may be driven by a small number of large-effect and highly differentiated variants. Imagine you had two populations with exactly the same infinitesimal genetic architecture, but that differed by a single fixed variant with large effect. Would you say that was "in conflict" with the infinitesimal model?3) It's possible that most, if not all, of the observed differentiation is due to adaptation. If Ne is very large, then natural selection and adaptation are efficient in eliminating deleterious alleles and fixing beneficial alleles. Do the authors have a model that is consistent with the observed presumed “neutral” variation? For example, the pairwise Fst values (0.01 to 0.06) are not small – are they consistent with the “long-term effective population size” that the authors hypothesise to be determined by periods of glaciation? Also, if short-term Ne is huge then why are the alleles under selection not swept to fixation? For a very large number of breeding individuals, Ne may be more limited by linkage than by demographic factors, a phenomenon that has been termed “genetic draft” .4) The authors' interpretation of the PCA results is open to question. The authors first estimate frequency differentiation on all polymorphisms, then select the least and most differentiated loci and perform PCA plots on the ascertained sets of loci . The authors contrast the variance explained by the first PCs and the resulting structure from the two sets of loci and claim that the set of highly differentiated loci reflect ecological niche adaptation, whereas the less differentiated loci reflect location. While it's reasonable to identify the highly differentiated variants as Ancestry Informative Markers, the comparison of the variance explained likely does not mean that much. In any dataset, if you select highly differentiated variables, you will explain more of the variance with the first PC just by construction. For almost any genomic dataset, you would be able to select a small number of SNPs such that you could cluster populations based on PCA of those SNPs, but it does not necessarily follow that those highly differentiated SNPs are actually under selection – that needs to be shown. A related question is whether the extra clusters that appear with the differentiated markers are actually visible in the higher PC of the undifferentiated markers. It would be helpful to show maybe PC 3,4 etc… for those data.5) The block-like structures in the selection scan are interpreted as inversions or structural rearrangements that are under selection. Inversions suppress recombination in the inversion, but not in the flanking regions, so if the inversion were under selection, you expect to see the normal decay of signal around the fringes of the inversion. Or is it just that the scale is different so you can't see the decay on the plots? Is it possible that the high differentiation in these regions is due to mapping errors in the rearranged regions? For example, a duplication would lead to apparently highly differentiated allele frequencies.6) A related concern to the first point is whether there are technical batch effects due to i) combination of data sequenced in different experiments (i.e. previously published) and ii) combination of pooled and individual sequencing data. It would be helpful to make sure that these do not further inflate the test statistics.7) Pooling errors. The authors use pools for sequencing and use a Neff allele count correction for read depth to minimise technical bias. They then use the estimated allele count in 2x2 tables to contrast allele frequencies between (super) pools, using an arbitrary p-value threshold of 1e-10. Not observing the actual allele count in the sample can lead to an increased variance and therefore a biased test for association.Revisions expected in follow-up work:1) P-value calibration. The selection scan uses an inappropriate null distribution and therefore all the P-values are poorly calibrated and thus uninterpretable. Whichever approach is chosen to calibrate P-values, please assess its performance and include QQ plots in the paper. Without this it's impossible to know how many of the selection hits are actually significant.2) Either remove the claim that the results are in conflict with the infinitesimal model ( our recommendation) or provide a more convincing case to support the claim.3) Please explain the extent to which the observed differentiation could be due to adaptation, dealing with the points we raised in point 3.4) Please respond to our criticism of your interpretation of the PCA results.5) Please defend your interpretation of the block-like structures in the selection scan, in response to our point 5.6) Include batch in the model and check that none of the PCs are predicting batch or data type. Make sure that these do not further inflate the test statistics.7) Provide data on how pooling errors might have affected your results. Please show Q-Q plots for their statistical test and estimate the sensitivity of your conclusions with respect to the chosen P-value threshold. Title: We suggest changing the title to avoid raising expectations about dismissing an infinitesimal model. For example: The genetic architecture underlying ecological adaptation in Atlantic herringWe have changed the title to Ecological adaptation in Atlantic herring is associated with large shifts in allele frequencies at hundreds of loci.Revisions for this paper:1) Calibrating the test statistics. The P-values for selection are not well-calibrated. The null hypothesis is that the allele frequencies are identical between subgroups, which is inappropriate because even under neutrality they will vary because of drift and shared ancestry between populations. The selection test needs to be corrected for this population structure. There are a number of approaches that could be used, e.g. post-hoc (e.g. genomic control), or model-based (e.g. a mixed model or including PCs as covariates).We have now included QQ plots, p-value vs δ allele frequency (DAF) plots and histograms of DAF for markers below and above the p-value theeshold for the various contrasts . In our view, these clearly illustrate that:i) While there is some inflation, it is marginal compared with the scale of the signals.ii) The p-values, in spite of the inflation, are a useful measure of increasing divergence.-10 p-value cutoff display a DAF distribution that is clearly distinct from the remaining marker set, indicating that it is a serviceable divider.iii) The markers above the 10We also believe that the numerus illustrations of pool-wise frequencies  provide an intuitive translation of the p-values into absolute divergence metrics.2) The paper does not make a convincing case that the findings are "in conflict with the infinitesimal model for complex traits". Overall the arguments presented are over-simplistic and fail to take into account the following:i) An important question about adaption is the distribution of selection coefficients across mutations, for example whether adaptation is driven by new beneficial mutations of large effects that are selected to fixation or if adaptation is polygenic . If the latter, then does it matter how “poly” polygenic is? In any case, even though the authors report a number of loci with large allele frequency shifts, can they actually reject an adaptation model with some loci with large effect sizes and many others with tiny effect sizes?In fact, our interpretation is that the genetic architecture is composed of hundreds of loci with major effects and many others with minor effects. This is what we wrote in the submitted version: “…there may be a large number of loci with tiny effects that also affect ecological adaptation”. But there should not be any loci with major effects under a “pure” infinitesimal model.ii) The "pure" infinitesimal model is something of a straw man, since we know that there are a finite number of causal variants, with substantial variation in effect size and that we expect the change in allele frequency of any variant to depend on effect size. Instead, the results from the herring analyses seem consistent with the observations made in many systems (e.g body size in dogs or skin pigmentation in humans) that strong selection can lead to rapid differentiation driven by large-effect variants, even if the within-population architecture remains relatively infinitesimal.We seem to agree that a pure infinitesimal model is not consistent with the genetic architecture for instance for body size in dogs or ecological adaptation in herring. We have now added citation to one paper supporting the view that many variants affecting complex trait in humans are affected by negative selection. Such variants contribute to standing genetic variation for complex traits but is unlikely to contribute to ecological adaptation. We also cite a paper on human skin pigmentation, a trait under selection and for which the underlying genetic architecture is similar to one for ecological adaptation in herring.iii) There is a distinction between the within-population variance , and the between-population variation, which may be driven by a small number of large-effect and highly differentiated variants. Imagine you had two populations with exactly the same infinitesimal genetic architecture, but that differed by a single fixed variant with large effect. Would you say that was "in conflict" with the infinitesimal model?In conclusion, we think we are essentially in agreement with the reviewers and editors concerning the interpretation of the genetic architecture underlying standing variation for complex traits versus ecological adaptation due to an evolutionary process. We still think it is important to highlight the difference between the two since you often come across papers where the authors assume that the genetic architecture underlying adaptation is expected to be highly complex with reference to human GWAS data. Furthermore, if there is one species where one could expect a good agreement with an infinitesimal model also for ecological adaptation, it should be the Atlantic herring. The census population size the last 10,000 years after the last glaciation has probably been of the order of 10e12, as it is now, which means that each site in the genome is mutated thousands of times each generation. Furthermore, if there are thousands of genes affecting body size in humans and body size is only one of many traits that show phenotypic differences between Atlantic and Baltic herring there was a possibility that genetic differentiation between these two populations would appear as small shifts in allele frequencies at a huge number of sites where causal alleles forms extreme haplotype diversity, but that is not at all the case and we think it is worthwhile to highlight this finding but we acknowledge the criticism and has softened the language.3) It's possible that most, if not all, of the observed differentiation is due to adaptation. If Ne is very large, then natural selection and adaptation are efficient in eliminating deleterious alleles and fixing beneficial alleles. Do the authors have a model that is consistent with the observed presumed “neutral” variation? For example, the pairwise Fst values (0.01 to 0.06) are not small – are they consistent with the “long-term effective population size” that the authors hypothesise to be determined by periods of glaciation? Also, if short-term Ne is huge then why are the alleles under selection not swept to fixation? For a very large number of breeding individuals, Ne may be more limited by linkage than by demographic factors, a phenomenon that has been termed “genetic draft” .We agree that genetic draft likely restricts nucleotide diversity in the Atlantic herring, in addition to the effects of demography. We have added a sentence pointing out that with reference to Bruce and Walsh. We have addressed the question whether most, if not all, differentiation is caused by adaptation in a previous study where we were compare the observed distribution of Fst values with the one expected under neutrality established by simulation . The conclusion is that essentially all loci showing strong genetic differentiation are due to adaptation. There is certainly a grey zone of loci showing modest genetic differentiation whether this is due to drift or selection, but we feel confident that the 100+ loci highlighted in the present study as highly differentiated are under selection. We have cited this previous study in the first paragraph of the Discussion.4) The authors' interpretation of the PCA results is open to question. The authors first estimate frequency differentiation on all polymorphisms, then select the least and most differentiated loci and perform PCA plots on the ascertained sets of loci . The authors contrast the variance explained by the first PCs and the resulting structure from the two sets of loci and claim that the set of highly differentiated loci reflect ecological niche adaptation, whereas the less differentiated loci reflect location. While it's reasonable to identify the highly differentiated variants as Ancestry Informative Markers, the comparison of the variance explained likely does not mean that much. In any dataset, if you select highly differentiated variables, you will explain more of the variance with the first PC just by construction. For almost any genomic dataset, you would be able to select a small number of SNPs such that you could cluster populations based on PCA of those SNPs, but it does not necessarily follow that those highly differentiated SNPs are actually under selection – that needs to be shown. A related question is whether the extra clusters that appear with the differentiated markers are actually visible in the higher PC of the undifferentiated markers. It would be helpful to show maybe PC 3,4 etc… for those data.The reviewers are absolutely right that the PCA analysis per se cannot be used as an argument that the loci showing strong genetic differentiation is under selection and that was not our intention in this section. Our writing is based on our previous analysis showing that the distribution of Fst values in Atlantic herring are strikingly different from the one expected under neutrality . However, to avoid any misunderstanding of this we have modified the title of this subsection to “Detection of population structure” and ends with the conclusion that a modest number of strongly differentiated markers provides a much better resolution of population structure than a large number of neutral genetic markers. This is in fact an important conclusion for future monitoring of stock development. In fact, the tight cluster of populations named as Atlantic Ocean in Figure 2A contains the most numerous stocks of Atlantic herring (about 90% of the world population) and these are separated into three distinct clusters when we use strongly genetically differentiated markers: spring-spawning herring from Atlantic Ocean, autumn-spawning populations from the Atlantic Ocean and populations from the water around Ireland and Britain. We highlight this observation in the revised text.PC:s 3 and 4 do not resolve any further groupings, in our view they mostly represent technical noise (see 5) The block-like structures in the selection scan are interpreted as inversions or structural rearrangements that are under selection. Inversions suppress recombination in the inversion, but not in the flanking regions, so if the inversion were under selection, you expect to see the normal decay of signal around the fringes of the inversion. Or is it just that the scale is different so you can't see the decay on the plots? Is it possible that the high differentiation in these regions is due to mapping errors in the rearranged regions? For example, a duplication would lead to apparently highly differentiated allele frequencies.This pattern is in fact a text-book example of the expected pattern for inversions maintained as balanced polymorphisms over thousands of generations or more (but it is not yet in the text books). The reason is that these are not recent selective sweeps but polymorphisms maintained over long periods of time which allow recombination to randomize the association between the inversion haplotypes and flanking SNPs. We have added text to explain this and cite our previous paper on a 4 MYR old inversion underlying alternative male mating strategies in the ruff that shows exactly the same pattern . We can exclude the possibility of a biased estimate of genetic divergence due to presence of duplications within the inverted regions based on normal sequence coverage and based on our PacBio data.6) A related concern to the first point is whether there are technical batch effects due to i) combination of data sequenced in different experiments (i.e. previously published) and ii) combination of pooled and individual sequencing data. It would be helpful to make sure that these do not further inflate the test statistics.It is hard to completely rule out batch effects. However, we do not believe that is a problematic issue in this dataset. Our reasons are the following:i) All contrasts have a very good signal to noise ratio, while batch effects should generate divergence across the genome.ii) The salinity and spawning time contrasts contain a mix of older and newer samples on either side, yet the results, in both pools and individuals, are highly consistent This view is supported by the results of the PCA analysis based on neutral markers. The tight cluster of herring from Atlantic Ocean  include herring from all our sequencing batches suggesting that batch effects are not a serious concern in this dataset.7) Pooling errors. The authors use pools for sequencing and use a Neff allele count correction for read depth to minimise technical bias. They then use the estimated allele count in 2x2 tables to contrast allele frequencies between (super) pools, using an arbitrary p-value threshold of 1e-10. Not observing the actual allele count in the sample can lead to an increased variance and therefore a biased test for association.While certainly a possibility, we do not think this is a major factor in this case, for reasons outlined in the responses to points 1 and 6. There is further support of the methodology  in Martinez-Barrio et al., 2016 and Pettersson et al., 2019.Furthermore, we have some replicates of presumed same populations that cluster well suggesting that pooling errors is not a serious error in the present study. For instance, samples 2 and 3 represent spring-spawning herring from the Gulf of Riga sampled 2014 and 2016 cluster closely to each other and as a group clusters with other spring-spawning herring from the Baltic Sea sampled during the period 1979 to 2012 . Similarly, samples 4 and 5 represent autumn-spawning herring from the Gulf of Riga sampled 2014 and 2015 and cluster closely and as a group clusters with other spring-spawning herring from the Baltic Sea collected during a period of more than 30-years.Revisions expected in follow-up work:1) P-value calibration. The selection scan uses an inappropriate null distribution and therefore all the P-values are poorly calibrated and thus uninterpretable. Whichever approach is chosen to calibrate P-values, please assess its performance and include QQ plots in the paper. Without this it's impossible to know how many of the selection hits are actually significant.p-values to DAF and the impact of the threshold on DAF-distribution. In our view, these clearly show that the results are not due to inflation and that the p-values are interpretable as a correlate of DAF. We have extended the Materials and methods section to describe these plots.We have now provided a set of plots for each contrast that shows the amount of inflation, links 2) Either remove the claim that the results are in conflict with the infinitesimal model ( our recommendation) or provide a more convincing case to support the claim.We have modified text and now states that the herring data are strikingly different from the genetic architecture underlying many complex traits in humans, for instance stature. We state that the result is a deviation from expectation under a pure infinitesimal model and we discuss why this is the case. In general, we agree with the reviewer’s views. See point 2 above.3) Please explain the extent to which the observed differentiation could be due to adaptation, dealing with the points we raised in point 3.See comments above.4) Please respond to our criticism of your interpretation of the PCA results.See our detailed response above.5) Please defend your interpretation of the block-like structures in the selection scan, in response to our point 5.Done, see point 5 above.6) Include batch in the model and check that none of the PCs are predicting batch or data type. Make sure that these do not further inflate the test statistics.See comments above.7) Provide data on how pooling errors might have affected your results. Please show Q-Q plots for their statistical test and estimate the sensitivity of your conclusions with respect to the chosen P-value threshold.See comments above.


IMPISH  which allows users to quickly and efficientlyimpute parental genotypes across the genome in large genome-wide datasets, andthen use these estimated dosages in downstream linear mixed model associationanalyses. We conclude that imputing parental genotypes from relative pairs mayprovide a useful adjunct to existing large-scale genetic studies of parents andtheir offspring.Indirect parental genetic effects may be defined as the influence of parentalgenotypes on offspring phenotypes over and above that which results from thetransmission of genes from parents to their children. However, given therelative paucity of large-scale family-based cohorts around the world, it isdifficult to demonstrate parental genetic effects on human traits, particularlyat individual loci. In this manuscript, we illustrate how parental geneticeffects on offspring phenotypes, including late onset conditions, can beestimated at individual loci in principle using large-scale genome-wideassociation study (GWAS) data, even in the absence of parental genotypes. Ourstrategy involves creating “virtual” mothers and fathers by estimating thegenotypic dosages of parental genotypes using physically genotyped data fromrelative pairs. We then utilize the expected dosages of the parents, and theactual genotypes of the offspring relative pairs, to perform conditional geneticassociation analyses to obtain asymptotically unbiased estimates of maternal,paternal and offspring genetic effects. We apply our approach to 19066 siblingpairs from the UK Biobank and show that a polygenic score consisting of imputedparental educational attainment SNP dosages is strongly related to offspringeducational attainment even after correcting for offspring genotype at the sameloci. We develop a freely available web application that quantifies the power ofour approach using closed form asymptotic solutions. We implement our methods ina user-friendly software package  Indirect parental genetic effects may be defined as the influence of parentalgenotypes on offspring phenotypes over and above that which results from thetransmission of genes from parents to children. Estimating indirect parentalgenetic effects on offspring outcomes at the genotype level has been challengingbecause it requires large-scale, individual level genotypes from both parentsand their offspring, and there is a paucity of cohorts around the world withthis information. Here we present a new approach to estimate indirect parentalgenetic effects without the requirement of physically genotyped parents. Ourmethod creates virtual parental genotypes based on the genotypes of offspringpairs, and then uses these virtual genotypes in downstream genetic associationanalyses. We developed a software package “IMPISH” that allows users to imputevirtual parental genotypes in their own genome-wide datasets and then use thesein downstream genome-wide association analyses, as well a series of powercalculators to estimate the power to detect indirect parental genetic effects onoffspring phenotypes. We apply our method to educational attainment data fromthe UK Biobank and show that indirect parental genetic effects are related tooffspring educational attainment even after correcting for offspring genotype atthe same loci. Indirect parental genetic effects may be defined as the influence of parentalgenotypes on offspring phenotypes over and above that which results from thetransmission of genes from parents to their children. This can include the effect ofmother’s genotype on the offspring phenotype  as well aseffects of the father’s genotype on the offspring phenotype . We use the term “indirect” in this context to highlight that the effectof the relevant parent’s genotype on the offspring phenotype is mediated by someknown or unknown parental phenotype regardless of whether this parental trait ismodelled explicitly in downstream analyses .There is increasing interest in estimating the indirect effect of parental genotypeson the phenotypes of their offspring –7. We anIn this manuscript, we describe a simple strategy for estimating indirect parentalgenetic effects on offspring phenotypes which is capable of leveraging theconsiderable information contained within large publicly available cohorts and thetens of thousands of individuals contained within twin registries and family studiesfrom around the world .BrieflyIMPISH that allows users toquickly and efficiently impute parental genotypes across the genome in largegenome-wide datasets, and then use these estimated dosages in downstream genome-wideassociation analyses (http://evansgroup.di.uq.edu.au/software.html). We investigate thestatistical power, type 1 error and bias associated with estimating parental andoffspring genetic effects via simulation and using closed form asymptotic solutions.We develop a series of freely available web applications  thatresearchers can use to estimate power to detect parental and offspring geneticeffects in studies of sibling or half sibling pairs, with or without parentalgenotypes. Finally, we apply our methods to educational attainment data from 19066sibling pairs from the UK Biobank Study .We.We24].c scores . We alsoIMPISH  which isfreely available on our website (http://evansgroup.di.uq.edu.au/software.html). IMPISH uses sourcecode adapted from the GCTA software package (version 1.26.0) that has beenmodified to impute parental genotype data given genotypes from sibling or halfsibling pairs [i, j) and  of the matrix if individuals i andj are from the same family, zeros elsewhere in the matrix)although this matrix will need to be constructed and input by the user.Currently, IMPISH only performs analyses on sibling pairs/half sibling pairsthat have had their parental genotypes imputed, and will remove otherindividuals from the analysis automatically.We have coded the parental imputation routines described above in a C++ softwarepackage called ng pairs . Users cIMPISH software,we simulated datasets that ranged in size from N = 1,000 to20,000 sibling pairs and M = 500,000 autosomal SNP markers. Thedatasets were simulated using an approach similar to that described above. Webenchmarked the running time and memory use of the IMPISH softwareby running simulations on these datasets. Reported runtimes are the medians offive identical runs in a computing environment with 256 GB memory and 1 CPU corewith solid-state disk in one compute node.To quantify the computational requirements of the ζ) of these distributions is equal to twice the differencein expected log-likelihoods between the full and reduced models. Given thenon-centrality parameter (ζ) of the statistical test, the powerto detect association (P) can be obtained by the formula: χ2 distribution withν degrees of freedom, andχ′2denotes a non-central chi-square distribution with non-centrality parameterζ and degrees of freedom ν. In the sectionbelow, we derive the expected covariance matrix of the residuals for eachstatistical model and its associated expected minus two log-likelihood. Fromthese values the non-centrality parameter and statistical power of the relevanttest of association can be calculated.Under full information maximum likelihood, all the tests of associationconsidered in this manuscript are distributed as non-central chi-squaredistributions under the alternative hypothesis of genetic association, withdegrees of freedom equal to the difference in the number of free parametersbetween full and reduced models. The non-centrality parameter. Similar derivations for siblingpairs at X chromosome loci and for half sibling pairs on the autosomes areprovided in the Xf and mother’s genotype dosageXm) are unavailable, mother’s and father’sgenotypic dosages are imputed from the genotype dosages of the sibling pairs as:To illustrate our derivations, we consider the case of sibling pairs withphenotype data Xm,Xf) = 0. The covariancesbetween genotype dosages are: We assume the model above for sibling pairs see  and randY) can bedecomposed as follows: The phenotypic variance in the offspring phenotype , The covariance between actual and imputed genotype is equal to the variance ofthe imputed genotype: When actual genotypes are available for the mother and father, the linear mixedmodel is: b, d, and fmay be estimated by generalised least squares (GLS), where the covariance matrixof random effects is: The fixed effects The inverse of the covariance matrix of random effects is: X is a 2 x k matrixconsisting of the genotypes of the offspring and/or the imputed or genotypedparents of offspring one and two (where k is the number ofregressors), and Y is a 2 x 1 matrix of offspring phenotypes [The asymptotic GLS estimates of a k x 1 vector of parameters enotypes .Σ),and subsequently the expected minus two log-likelihood (-2lnL) of the model perrelative pair [It is then possible to derive the residual covariance matrix (ive pair :E(−2lnLζ) for a test of the difference infit between a model and a nested sub model is equal to the difference inexpected minus two log-likelihoods between the models: F) and E(−2lnLN) representthe expected minus two log-likelihoods under the full and nested modelsrespectively.The non-centrality parameter , we consider the following models in the case of sibling pairs atautosomal loci  of the model per sibling pair istherefore: Xm,Xf,X1 andX2:Full Omnibus Model in sibling pairs  genetic effects substantiallyinfluence the offspring phenotype (blue and red lines d2 = 0.1%). Interestingly,paternal half sibling pairs who have not had their parents genotyped, providemuch less power to estimate maternal genetic effects and require even largernumbers .The lower power of the imputed half sibling analyses compared to the imputedsibling analyses partially reflects the fact that only two sources of variationare modelled in the imputed sibling models , whereas in the half sibling models, three differentsources of variation are modelled . If investigators believe that paternal genetic effects do notcontribute to offspring trait variation , then one option to increase power is to fix this path to zero in modelsinvolving half siblings. Interestingly, the presence/absence of other geneticeffects has little effect on power of the conditional tests of association forrealistic effect sizes when correctly modelled.Another goal investigators might be interested in is partitioning effects atknown genetic loci into direct offspring and indirect parental geneticcomponents. This may be of relevance if investigators want to prove theexistence of indirect maternal genetic effects on offspring phenotypes forexample. In order to put the above numbers in context, in the publicly available UKBiobank dataset , we estimate thatan autosomal parental genotype would need to explain ~0.2% of the variance inthe offspring phenotype in order to have 80% power to resolve an indirectparental genetic effect if parental genotypes need to be imputed  on statistical power was complicated andoften interacted with the level of other factors in the calculation . Allele G1 ∈ {0, 2} and femalegenotypes are coded G2 ∈ {0, 1, 2}.We also assume that the regression coefficient of offspring phenotype on(mother’s/father’s/offspring’s) genotype is the same in male and femaleoffspring. This means that male loci explain double the amount of variance inthe phenotype compared to females  so thatusers enter the variance in the offspring phenotype explained by mother’s,father’s and/or offspring genotypes at the locus. For offspring genetic effectsin opposite sex siblings, users enter the variance explained by male loci.Imputing parental genotypes on the X chromosome has the advantage that separatematernal, paternal and offspring genetic effects can be resolved for siblingpairs . We parameterize thestatistical model at X linked loci so that unstandardized male genotypes arecoded ales see . We haveThe results of the power analyses for sibling pairs on the X chromosome aredisplayed in When parental genotypes are present, male siblings also provide lower power todetect X linked loci (3 degree of freedom tests) compared to many of the otherstudy designs. The reason is the converse of the explanation above- paternalgenetic effects do not contribute to the covariance between male sibling pairs.Opposite sex sibling pairs also provide reduced power to detect loci (3 degreeof freedom tests), but this partly a consequence of how we parameterize themodel of association on the X chromosome . We choose not to compare results across the differentstudy designs when parental genotypes are imputed because the different modelsand their tests are usually not equivalent . These results are tabulated in We found that own educational attainment polygenic risk score and imputedparental polygenic risk score were strongly related to own educationalattainment .InteresIMPISH software in terms of CPU timesand time to perform genome-wide association. Our results show thatIMPISH can be used to impute parental genotypes from largenumbers of relative pairs and perform tests of association across the genome ina reasonable time frame. Note that IMPISH allows multi-threading so computationtime will decrease even further when running the software on multiplethreads.In this manuscript we have shown that it is possible to impute parental genotypesgiven genotype data on sibling and half sibling pairs and then subsequently use thisinformation to derive unbiased estimates of parental genetic effects. We are not thefirst to have developed methods for estimating genetic parameters in sibling pairswhen parental genotype data is missing –32, nor Our asymptotic calculations reveal that the power to partition known individual lociinto parental and offspring genetic effects using imputed parental genotypes is lowin general, and highlight the value in having parents genotyped if the interest isin resolving indirect parental genetic effects at known loci. In situations whereparental genotypes are unavailable, we show that indirect parental genetic effectscan still be estimated without bias, but very large numbers of sibling  pairs will be required . Whilst these sorts of numbers may be realistic in the case of siblings , most cohortscontain very few half sibling pairs. For these reasons we suggest our method maycurrently be more suitable as a complement to existing large-scale genetic studiesof parents and their children. For example, both the Norwegian MOBA and HUNT cohortsnot only contain tens of thousands of parent-offspring trios and duos, but alsolarge numbers of sibling pairs that could be combined with more traditionalparent-offspring analyses to further increase power to detect parental geneticeffects ,20.A key motivation for developing our approach was the realization that estimates ofparental genetic effects derived from imputed genotypes could also be used in twosample Mendelian randomization (MR) studies examining possible causal relationshipsbetween parental exposures and offspring outcomes . Whilst Besides low statistical power, there are a number of limitations with our approach.In the case of sibling pairs, different genotypes for mothers and fathers can beresolved at X linked  loci. However, for autosomal loci, theexpected dosage for parental genotypes is the same. This means that it is impossibleto distinguish different genotypes for mothers and fathers using data from siblingpairs alone. Thus, utilization of sibling pairs to detect indirect genetic effectsrequires the non-trivial assumption that either paternal  geneticeffects do not affect the offspring phenotype under study. Whilst this assumptionmay be justified for certain perinatal phenotypes where the contribution of thefather’s phenotype to trait variation in the offspring may be minimal (like birthweight), it may not be justifiable for other phenotypes. Sensitivity analyses couldbe performed by testing whether estimates derived from using sibling pairs areconsistent with those derived from e.g. parent-offspring trios or even half siblingpairs where estimates of maternal, paternal and offspring genetic effects can beestimated consistently.We have shown that for half sibling pairs, different genotype probabilities formothers and fathers (and therefore expected dosages) can be resolved at geneticloci. This means that, in principle, the half sibling pairs within large publiclyavailable biobanks could be leveraged to provide information on parental genotypesand consequently help obtain unbiased estimates of indirect parental genetic effectson offspring traits. This will be possible if there is explicit pedigree informationthat unequivocally identifies half sibling relationships. However, the task becomesmore challenging if half siblings have to be identified on the basis of geneticinformation alone. This is because half siblings share the same expected number ofalleles identical by descent as grandparent-grandchild pairs and avuncularrelationships, making it difficult to distinguish between these relationships givenonly genetic data. The majority of grandparent-grandchild pairs can bedifferentiated from half sibling pairs on the basis of age (i.e. the age differencein most grandparent-grandchild relationships will be >30 years). However, it ismuch more difficult to resolve half sibling from avuncular pairs. Half siblings andavuncular pairs can be partially distinguished by the former’s longer haplotypesharing. Intuitively, this is because any chromosome segments that half siblingsshare have only gone through a total of two meioses since their common ancestor. In contrast, any shared haplotype segmentshave gone through a total of three meioses since the last common ancestor in thecase of avuncular relationships (i.e. transmission from shared grandparent touncle/aunt and transmission from shared grandparent to parent to child). However,classification is imperfect –41, but Our approach of imputing parental genotypes and utilizing them in downstream analysesassumes that individual loci are in Hardy-Weinberg equilibrium and that parents materandomly with respect to the locus under consideration. Therefore, in theory, anyprocess that leads to deviations from Hardy-Weinberg equilibrium and/or randommating could affect the accuracy of our imputation and consequently asymptotic powercalculations, downstream type 1 error rates and parameter estimates. This includesprocesses producing missing data at genetic loci (i.e. genotypes at the locus underconsideration being related to missingness or selection into or out of the study),population stratification and non-random mating.APOE alleles in studies of elderlyindividuals).Our simulations show that our imputation procedure can produce moderately biasedestimates of parental and offspring genetic effects if parental genotype is stronglyrelated to missingness and deviations from asymptotic power under complete data.However, the vast majority of loci across the genome are not expected to exhibitstrong differential missing rates, and so for most genetic markers this possibilityis unlikely to be a major concern. Those loci that do exhibit strong associationswith missingness may also show departures from Hardy-Weinberg equilibrium andtherefore we recommend that users of our approach test markers for departures fromHardy-Weinberg equilibrium as a matter of routine. Our approach should not be usedfor markers that exhibit strong departures from Hardy-Weinberg equilibrium, and onlyused with caution at loci that are expected to show strong relationships withmissing rates . That being said, our softwarepackage IMPISH models cryptic and known relatedness between individuals in therandom effects part of the model ensuring that standard errors for tests ofassociation in empirical data are appropriately computed.Finally, we note that our analytical power calculations assume that trait errors arenormally distributed. Thus, our power calculations may not be accurate in the caseof data that are grossly non-normal and in these situations investigators may needto derive power estimates using simulation if an appropriate phenotypetransformation is not possible.There are several ways that our procedure could be improved/extended. First, we haveonly considered relative pairs in our derivations. Additional first degree relatives would enable bettergenotype imputation and therefore increased power to detect parental genetic effectson offspring phenotypes. It is also possible that more distant relatives may also beinformative for imputation, particularly if shared haplotypes could be identifiedwithin larger pedigree structures. Second, we have developed methods that areappropriate for the analysis of unselected normally distributed quantitative traits.Further work is required to generalize these approaches to the analysis of binarytraits and selected samples. Third, we have only considered one SNP at a time. It ispossible that the inclusion of haplotype information may increase imputationfidelity. Fourth we note that it is likely that family dynamics will alter thestrength of indirect parental genetic effects depending on the relationship ofoffspring to their parents. For example, the relationship between half siblings andtheir birth parents is likely to be qualitatively different to those of fullsiblings in nuclear families. Thus, for later-life phenotypes especially, parentalgenetic effect size estimates in half siblings may not be comparable to thoseestimated from full siblings. This may be perhaps less of an issue for maternalgenetic effects on perinatal phenotypes. Fifth we note that there are other ways toparameterize models of association on the X chromosome , and it In conclusion, we have developed a suite of online genetic power calculators andsoftware to assist researchers in detecting and partitioning loci that exhibitindirect parental genetic effects. We hope that our methods and utilities will formuseful adjuncts to large ongoing genetic studies of parents and their offspring.S1 Text(DOCX)Click here for additional data file.S1 Figb2 =d2 =f2 = 0.1%), a traitdecreasing allele frequency of p = 0.1, and shared residualvariance of φ2 = 0.2. For all simulations weused N = 2000 sibling pairs/half sibling pairs, and 1000 replications. Inthe case of autosomal loci, red lines indicate the expected betacoefficients for parental (c) and offspring genetic effects (b) in fullsibling pairs, and the expected beta coefficients for maternal (d), paternal(f), and offspring genetic effects (b) in half sibling pairs. Blue linesindicate the expected beta coefficients for paternal (f) and male fetal (b)effects at X chromosomal loci. Green lines indicate the expected betacoefficients for maternal (d) and female fetal (b) effect at X chromosomalloci. For opposite sex sibling pairs at X chromosomal loci, we simulated thefetal effect (b) to be the same for both siblings assuming using malegenotypes. The full omnibus model was simulated and fitted in allsimulations. R codes implementing the simulations are provided in the Comparison of maternal (d), paternal (f) and offspring (b) genetic effectsestimated using genotyped parental genotypes versus imputed parentalgenotypes in simulations. We simulated genetic effects accounting for 0.1%of the variance in the offspring trait((PNG)Click here for additional data file.S1 Table(DOCX)Click here for additional data file.S2 Table(DOCX)Click here for additional data file.S3 Table(DOCX)Click here for additional data file.S4 Table(DOCX)Click here for additional data file.S5 Table(XLSX)Click here for additional data file.S6 TablePower (a -d) and type 1 error rate (e—h) for tests involving sibling pairs onautosomes. Results of simulations compared to asymptotic calculations (α =0.05).(XLSX)Click here for additional data file.S7 TablePower (a -d) and type 1 error rate (e—h) for tests involving half siblingpairs on autosomes. Results of simulations compared to asymptoticcalculations (α = 0.05).(XLSX)Click here for additional data file.S8 TablePower (a -d) and type 1 error rate (e—h) for tests involving male siblingpairs on the X chromosome. Results of simulations compared to asymptoticcalculations (α = 0.05).(XLSX)Click here for additional data file.S9 TablePower (a -d) and type 1 error rate (e—h) for tests involving female siblingpairs on the X chromosome. Results of simulations compared to asymptoticcalculations (α = 0.05).(XLSX)Click here for additional data file.S10 TablePower (a -d) and type 1 error rate (e—h) for tests involving opposite sexsibling pairs on the X chromosome. Results of simulations compared toasymptotic calculations (α = 0.05).(XLSX)Click here for additional data file.S11 Table(XLSX)Click here for additional data file.S12 Table(XLSX)Click here for additional data file.S13 Table(XLSX)Click here for additional data file.S14 Table(XLSX)Click here for additional data file.S15 Table(XLSX)Click here for additional data file.S16 Table(XLSX)Click here for additional data file.S17 Table(DOCX)Click here for additional data file.S18 Table(DOCX)Click here for additional data file.


Mastitis is one of the most prevalent and costly diseases in dairy cattle. It results in changes in milk composition and quality which are indicators of udder inflammation in absence of clinical signs. We applied structural equation modeling (SEM) - GWAS aiming to explore interrelated dependency relationships among phenotypes related to udder health, including milk yield (MY), somatic cell score (SCS), lactose , pH and non-casein N , in a cohort of 1,158 Brown Swiss cows. The phenotypic network inferred via the Hill-Climbing algorithm was used to estimate SEM parameters. Integration of multi-trait models-GWAS and SEM-GWAS identified six significant SNPs for SCS, and quantified the contribution of MY and LACT acting as mediator traits to total SNP effects. Functional analyses revealed that overrepresented pathways were often shared among traits and were consistent with biological knowledge . In summary, SEM-GWAS offered new insights on the relationships among udder health phenotypes and on the path of SNP effects, providing useful information for genetic improvement and management strategies in dairy cattle. The use of SEM in the context of quantitative genetics was first described by Gianola and Sorensen3. SEM delivers an interpretation of results that is different from that of multi-trait models (MTM), which can only capture covariances and correlations among variables and do not consider the existence of recursive and feedback mechanisms4. In contrast to MTM, SEM explore functional links between variables in a phenotype network, in which one trait can be considered as a predictor of another trait5. In dairy cattle, some attempts have been made to describe the complex relationships and identify possible causal paths among traits related to calving6, health and fertility7, risk and tolerance to mastitis8, and milk composition10 using the SEM approach.Biological systems are pervaded by causal relationships among variables. Structural equation models (SEM)11 and beef cattle12, but to our knowledge, no study is available in dairy cattle.In genome-wide association studies (GWAS), SEM might offer a powerful and flexible tool to capture causal structures, which are missed through MTM-GWAS and, therefore, to more accurately describe the associations between traits and quantitative trait loci (QTL). In particular, SEM-GWAS is able to decompose single-nucleotide polymorphisms (SNP) effects on a trait into direct or indirect components  and also to identify genomic regions with pleiotropic effects explaining observed genetic correlations. This methodology has been applied to some economically important characteristics in broiler chickens13. In particular, sub-clinical mastitis represents a continuous risk of infection for the whole stock and can cause heavy financial losses and large nutritional and technological impacts14. Moreover, animal welfare aspects and the risk of antibiotic residues in dairy products are other important critical points15. The prevention or detection at an early stage is important for both animal welfare and human health. Milk somatic cell count (SCC) has been extensively considered as the most effective indicator of mastitis16 and it is included in sire genetic evaluation procedures in several countries17. However, inflammation occurring after the entrance and multiplication of pathogenic microorganisms in the mammary gland activates a complex series of events leading not only to an elevated SCC but also to a reduced synthetic activity and milk compositional changes18, which affect milk quality and hygiene and, indirectly, also its technological characteristics. For instance, intra-mammary infection causes enhanced leakage of lactose from milk to blood due to the damage of blood-milk barrier19. The increase in tight junction permeability is accompanied by a decrease in the rate of milk synthesis and secretion of the major specific milk constituents20. In particular, the concentration of caseins is reduced in infected quarters as a result of the reduced secretion and increased proteolysis21. As a consequence, the casein to total protein ratio is negatively affected due to the increase in non-protein N18. An increase in the concentrations of proteins of blood serum origin, including serotransferrin and albumin, was also detected in mastitic whey22. Changes in ionic equilibrium often due to increased amounts of sodium and chloride and reduced potassium ion concentrations in mastitic milk have been reported to explain the increase in milk pH23. Accordingly, the use of synthetic indices of udder health, which include not only SCC but also other indicator traits such as milk lactose and pH has been recently proposed25. The relationships among these phenotypes and between these phenotypes and udder health are therefore well-known but the existence of possible dependency paths has not been explored.In this study, we hypothesized that possible dependency relationships exist among a set of traits related to udder health. Mastitis is one of the most prevalent production diseases in dairy herds worldwideTherefore, the aims of this study were: (1) to use probabilistic graphical models for investigating the interrelationships among traits related to udder-health, namely milk yield (MY), lactose percentage (LACT), pH, non-casein N  and somatic cell score (SCS); and (2) to use the inferred network structure to estimate SEM parameters and carry out SEM-GWAS analysis to partition SNP effects into direct, indirect (i.e. mediated by an up-stream phenotype in the network), and total effects.Descriptive statistics for the traits investigated are reported in Table Bayesian network structure learning algorithms were applied to the vector of residuals from the Bayesian GBLUP analysis to identify putative dependencies among phenotypes free of “genomic confounders”. The results obtained with the HC algorithm are displayed in Fig. We modelled the inferred Bayesian network for MY, LACT, SCS, pH, and NCN Fig.  with a sFor each trait, SEM-GWAS allowed us to partition SNP effects into direct and one or more indirect effects. The Manhattan plots for SNP effect decomposition are displayed in Figs. In the case of MY, the Bayesian network algorithm did not identify any up-stream mediator trait Fig. . Therefo21(−0.065). The magnitude of this coefficient was relatively small, and so the contribution to SNP effects on LACT mediated by MY was trivial  with a structural coefficient λial Fig. .\documen32 (−0.632). The magnitude of this coefficient was moderate, which suggested that allelic substitutions in a QTL for LACT might affect SCS. The indirect path mediated by MY and represented by the product of the coefficients λ21 × λ32 (−0.065 × −0.632 = 0.041) gave a relatively small contribution to total SNP effects  LACT → SCS and (2) MY → LACT → SCS. LACT influenced SCS via an indirect path with structural coefficient λ43(0.057). LACT influence on pH was proportional to the product between the two coefficients λ32×λ43 (−0.632 × 0.057= −0.036). The third indirect path corresponded to the MY influence on pH which depended on the product between the three coefficients λ21×λ32×λ43 (−0.065 × −0.632 × 0.057=0.002). These relatively small values suggested that the contribution of SNP indirect effects to total SNP effects on milk pH was small  SCS → pH, (2) LACT → SCS → pH, and (3) MY → LACT→SCS → pH. SCS influenced milk pH via an indirect path depending on the structural coefficient λ52 (−0.262), suggesting that allelic substitutions in QTL for LACT have a moderate influence on NCN. MY contribution on the NCN total SNP effect was represented by the product of the coefficients λ21 × λ52 (−0.065 × −0.262= 0.017), and it was relatively small  LACT → NCN and (2) MY → LACT → NCN. LACT had an influence on NCN via an indirect with path coefficient λ2 > 0.90) with total SNP effects for all traits except for SCS (R2 = 0.64). The correlation between all indirect SNP effects on pH and LACT with total SNP effects was close to 0  was found for all the traits investigated between SNP effects detected with the two models which are based on the same multivariate approach and same covariances matrices  threshold (5.355). Six significant SNP were identified for SCS at suggestive significance log10(P) threshold (4.054)  Table . Five SNeshold 5.55. Six sSLC13A5, SLC4A4, SLC5A10, and SLC16A11, which are involved in the transport of citrate, sodium bicarbonate and sodium/glucose and monocarboxylic acid. We also found a functional link between MY and phospholipase D signaling pathway , G-protein coupled peptide receptor activity  and leukocyte chemotaxis . A functional group including protein dephosphorylation , peptidyl-tyrosine dephosphorylation  and phosphatase activity  was associated to milk pH. Several pathways and ontologies functionally connected with signal transduction and cell-cell signaling were enriched for milk components. In particular, the cell surface receptor signaling pathway was overrepresented for LACT , SCS , and NCN . Moreover, the Wnt signaling was enriched for SCS  and NCN . Finally, 188 genes  belonging to negative regulation of macromolecule metabolic process (FDR = 0.0363) were associated to NCN.Several ontologies and pathways were enriched (FDR < 0.05) for the traits investigated Fig. . For ins26. In this study, we explored the existence of putative dependencies among a set of five phenotypes related to udder health, including not only MY and SCS but also milk pH, LACT, and NCN, which are related to udder health status. The network structure identified by the HC Bayesian network algorithm was incorporated into a SEM-based GWAS model to decompose SNP effects into direct effects on the trait and effects mediated by up-stream traits in the phenotypic network.High MY is known to increase risk of clinical mastitis, and consequently increase SCS, which is an indicator of mastitis. Mastitis, in turn, will reduce MY in the remaining portion of lactation. Such relationships have been described previously by a model with a recursive effect from SCS to MY providing evidence for the possible existence of unfavorable effects between MY and SCS28. Regarding NCN, this trait corresponds to the sum of whey proteins and non-protein N percentages . Average values obtained in this study for NCN (21.96 ± 1.23%) are therefore coherent with values reported in the literature for casein index in Brown Swiss (76.76 ± 2.58%)29.Average phenotypic values obtained for MY, LACT, pH and SCS were in line with previous results reported for Brown Swiss cattle breed32, except for milk pH, which showed higher values. The only statistically relevant genomic correlation was found between LACT  and NCN (−0.280), which might support the hypothesis that non-protein N in milk might be considered as an indicator of mammary gland inflammation. Additionally, we previously found negative genetic correlations between serum proteins  and lactose percentage33.Genomic heritabilities estimated by the multi-trait Bayesian GBLUP for the investigated traits were in the range of genetic values obtained with univariate models34. Lactose is a β-galactoside consisting of galactose and glucose residues, and it is the main carbohydrate in mammalian breast milk. Galectins are a family of proteins that bind specifically to β-galactosides such as lactose and have regulatory functions in the immune system. The interaction of lactose with particular galectin members seemed to largely determine its anti- or pro- inflammatory effects35. It is possible that the leakage of lactose from milk to blood might have a chemotactic effect attracting macrophages and leukocytes from the blood to the mammary gland. This might also explain the negative sign of the path coefficient (−0.632). Monocyte and macrophages migrating to the inflammation site secrete inflammatory mediators, including proteinases such as plasminogen activators which can increase the level of plasmin activity in mastitic milk36. This might also support the role of LACT as an up-stream trait to NCN and the negative sign of the path coefficient (−0.262). On the other hand, the strength of edges between milk pH and the other traits in the network suggested this trait had a weak connectivity with MY, LACT and NCN. The only exception was the path between SCS and pH, which had strength values > 50%. Therefore, we used prior biological information to support the existence of a relationship between these traits and infer its possible direction. It is well-recognized that milk pH increases with elevated SCC due to changes in milk ionic equilibrium which results from the mammary tissue injury37. On the other hand, a possible dependency relationship with direction pH → SCS seemed to be much more difficult to envisage. However, the coefficient for this path (λ43=0.057) was small, suggesting that the role of SCS in mediating SNP effects on milk pH is marginal.The application of the HC algorithm allowed us to infer the network structure from a residual covariance matrix, after accounting for polygenic additive effects. New insights were provided on the relationships among traits related to udder health in dairy cattle. In particular, we found a putative mediation of LACT on SCS and NCN in our phenotypic network, which is supported by the magnitude of the path coefficients reflecting the strength of the dependency relationship. The relationships between lactose in milk and udder health or SCC have been widely investigated, and lactose percentage in the milk of mastitic animals was significantly below the average values of the healthy animalsSTEAP4, which is a metalloreductase involved in the control of systemic metabolic homeostatis by integrating inflammatory and metabolic responses. This gene was among the top 10 genes with the greatest increase in expression in milk somatic cells after intra-mammary infection with S. aureus in goat38. The marker rs110736919 corresponded to an intron variant of ADCY1. This gene codes for a calmodulin-sensitive adenylyl cyclase. According to GO annotations, ADCY1 seemed to have a role in several processes such as regulation of circadian rhythm, cellular response to calcium ion and neuroinflammatory response. We did not find any association between this gene and mastitis or mammary gland inflammation. However, SNP within or close to ADCY1 have been associated to fertility traits in dairy cows40. The marker rs41615292 corresponded to an intergenic variant, which mapped close to INHBA (~0.6 Mb). The INHBA is a member of the TGF-β superfamily41, which has a role in apoptosis. The damage induced by mastitis to the mammary tissue can be induced by apoptosis or necrosis42. Accordingly, Fonseca et al.43 found an increase in the expression of this gene in bovine mammary gland after experimental infection with Streptococcus agalactiae. The markers rs110854438 and rs110811284 mapped close to ADCY1 (~40 Kb) and at ~0.2 Mb from IGFBP3 and IGFBP1. It has been shown that lactoferrin specifically binds to extracellular IGFBP3 and plays a key role in the entry of IGFBP3 into mammary cells nucleus44. Lactoferrin has a well-known role in the modulation of inflammatory process since it prevents the release of cytokines from monocytes and regulates the proliferation and differentiation of immune cells45. Therefore, it has been considered as a good indicator of mastitis in dairy cows similarly to SCC46. Finally, the marker rs110490432 corresponded to an intergenic variant which mapped close (at ~76 Kb) to BTBD3. To our knowledge, no association of this gene to immune response has been previously demonstrated in dairy cows.By jointly applying MTM-GWAS and SEM-GWAS, we identified 6 suggestive significant SNP for SCS and we quantified the contribution of MY and LACT acting as mediator traits to total SNP effects. In particular, the contribution of the indirect path MY → LACT → SCS to total SNP effect on SCS was very small while LACT revealed to be a relevant mediator trait affecting total SNP effects, especially for marker rs41569794. Interestingly, marker rs41569794 mapped on BTA4 at ~0.1 Mb from 47. Moreover, Na+/H+ exchange and Na+/HCO3- cotransport is involved in the regulation of mammary cell pH48. This might explain the overrepresentation of pathways connected with membrane transport activity for both MY and pH. Genes involved in the Wnt signaling were associated to both SCS and NCN. Inflammatory epithelial cells were shown to induce changes in stromal fibroblast characteristics in bovine mammary gland with mastitis which are mediated by Wnt signal pathway components49. A clear connection between Wnt signaling and milk protein metabolism was not found. However, among the associated genes, there was GSKIP which is a negative regulator of GSK3β in the Wnt signaling pathway. Recently, it was reported that mTORC1 inhibition of GSK3β regulates the production of pro- and anti-inflammatory cytokines, which is in line with the involvement of Wnt sinaling in the control of inflammation. However, mTOR signaling pathway plays also an important role in milk protein synthesis50. Regulation of signaling pathway for LACT might further support for its putative chemotactic activity towards immune cells.Pathways enrichment analyses showed that variants associated to MY, LACT, SCS, pH, and NCN aggregated in various biological pathways, which were frequently shared among traits as further support for their intercorrelation. The secretion of milk depends on the activity of several membrane transport systems on mammary secretory cells51. SEM-GWAS might be therefore considered as an extension of MTM-GWAS which accounts for the network structure among phenotypes and is able to identify the contribution of direct and indirect effects on the total SNP effect. Caution must be used, however, when interpreting SEM as a causal model even if it is corroborated by the data, since causal pathways may be difficult to model in a multi‐trait framework in which many genes and interactions are involved52. Moreover, it is clear that omitting variables implicated in causal processes may distort views of the system53.This study represents the first application of SEM-GWAS in dairy cattle, in particular, to udder health traits. We showed that SEM is a flexible approach which allows to model the relationships among SNP and phenotypes including the contribution of potential mediator traits, which might be particularly useful especially in the case of highly interconnected phenotypes contributing to a final outcome through common or different pathwaysThe identification of indirect effects can provide a better understanding of outcome mechanisms and help in designing selection strategies and management decisions aimed at improving udder health in dairy cattle. Our results need to be validated on a larger population and using a database including repeated records along the lactation, together with records of clinical mastitis cases which might improve the accuracy for the detection of putative causal paths among the traits investigated.This study did not require any specific ethics permit. The cows sampled belonged to commercial private herds and were not experimentally manipulated. Milk samples were collected during routine milk recording coordinated by technicians from the Breeders Association of Trento Province .et al.54. Briefly, samples were obtained from cows reared in 85 herds with parities of 1 to 5 and days in milk ranging from 5 to 449. Individual milk samples were collected once during the evening milking and immediately refrigerated at 4 °C (without any preservative). One sub-sample  was transported to the Milk Quality Laboratory of the Trento Breeders Association. The second subsample  was transferred to the Milk Laboratory of the Department of Agronomy, Food, Natural Resources, Animals and Environment (DAFNAE) at the University of Padova 55. A detailed description of the genetic structure and connections between animals has been previously reported56.Individual milk samples were collected from 1,264 Italian Brown Swiss cows in commercial herds located in the Alpine province of Trento . Details of the animals used in this study and the characteristics of the area are reported in Bittante 57. An aliquot of each milk sample was analyzed for fat, protein, casein, and lactose (%) using a Milkoscan FT6000  at the Milk Laboratory of the Department of Agronomy, Food, Natural Resources, Animals and the Environment (DAFNAE), the University of Padua . NPN was calculated as the differences between total milk N and casein N and expressed as a percentage.The pH analysis was carried out using a Crison Basic 25 electrode . Somatic cell count values were determined by a Fossomatic FC counter (Foss) and SCS were obtained through logarithmic transformation [log2 + 3]P < 0.001, Bonferroni corrected). Missing genotypes were imputed by the Beagle software Version 3.3.258. After filtering, 1,011 cows and 37,519 SNPs were retained for subsequent analyses.The Illumina BovineSNP50 v.2 BeadChip  was used to genotype 1,152 cows . Quality control excluded markers with call rates <95%, minor allele frequencies <0.01 and extreme deviation from the Hardy-Weinberg equilibrium (https://github.com/QuantGen/MTM) to obtain posterior means of model residuals as input for inferring putative dependencies among traits according to the model:y is the vector of phenotypes (t = 5), X is the t × k incidence matrix of non-genetic effects; b is the k × 1 vector of the non-genetic effects including the intercept and the following: (i) days in milk of the cow (classes of 30 days each), (ii) parity of each cow , and (iii) herd-date effect (85 levels); Z is the n × m incidence matrix relating animals with additive genomic effects; g is the m × 1 vector of additive genomic effects, and e is the t × 1 vector of residuals. The g and e vectors were assumed to follow the independent multivariate Gaussian distributions G is the genomic relationship matrix for genetic effects, I is the identity matrix for residuals, Σg and Σe are the t × t variance-covariance matrices of genetic effects and residuals, respectively. Here, ⊗ indicates the Kronecker product. The G matrix was computed as W is an n × m matrix of centered SNP genotypes having values of 0−2pj for zero copies of the reference allele, 1−2pj for one copy of the reference allele, and 2−2pj for two copies of the reference allele59. Here, pj corresponds to the allele frequency at SNP j =1, …, m. Flat priors were assigned to the intercepts and to the vector of fixed effects. Independent multivariate normal priors with null mean and inverse Wishart distributions for covariances matrices were assigned to the vectors of random additive genomic effects and residual effects.A Bayesian multi-trait genomic best linear unbiased prediction (GBLUP) model was fitted to five udder health-related traits  using the R package MTM (P). All estimates with P greater than 95% were considered “relevant” correlations.Marginal posterior distributions were obtained using a Markov chain Monte Carlo (MCMC) approach with Gibbs sampling. We used a burn-in of 20,000 and from 150,000 MCMC samples we retained 75,000 MCMC samples . Chain lengths and burn-in period were assessed from visual inspection of the trace plots. Posterior means were used as point estimates for all parameters. Lower and upper bounds of the highest 95% probability density regions (HPD 95%) were obtained from the estimated marginal densities. For the correlations, in addition to the means of each marginal posterior distribution, we also estimated the probability of each mean being greater than 0 when the mean was positive, or lower than 0 when the mean was negative 61 implemented in the R package bnlearn62 to infer the structure of the Bayesian residual phenotypic network for the five udder health traits. We also computed the change in Bayesian information criterion (BIC) score after each edge removal in the algorithm to infer their relative contribution to the overall BIC score of the network. The edge strength and uncertainty of direction were estimated by a bootstrapping procedure  as described in Scutari and Denis63. An edge strength> 85% was used to select only high-confidence relationships.A Bayesian network is a probabilistic graphical model where nodes represent the phenotypes and edges represent probabilistic dependencies between them; the absence of an edge implies conditional independence between variables64 implemented in the mixed model package WOMBAT65, according to the following model, which did not consider the inferred network structure:y is the vector of scaled phenotypes (t = 5), W is the n × t by t matrix of genotype codes of SNP marker j, s is the t × 1 vector of additive effects for SNP marker j, and other terms were previously described. Variance-covariance structures were assumed the same as for Eq.  is its standard error. The P value threshold for declaring significant associations was determined calculating the effective number of independent tests according to Li and Ji66 using the R package poolR. A genome-wide significant threshold of log10(P)= 5.355 (0.05/11315) and a suggestive significant threshold of log10(P)=4.054 (1/11315) were adopted.MTM-GWAS analyses were conducted using the “SNP Snappy” strategymentclass2pt{minim64 implemented in the mixed model package WOMBAT65. The SEM model described in Gianola and Sorensen3 was extended for GWAS according to Momen et al.67:y is the vector of scaled phenotypes (t = 5) and Λ is a t × t matrix of regression coefficients  based on the learned structure from the Bayesian network using the residuals:SEM –GWAS analyses were conducted using the SNP Snappy strategyg and e were assumed to have a joint distribution The vectors The other terms were defined previously.We considered SEM residuals to be independent within individual, which is required to make the structural coefficients likelihood-identifiable. The structural coefficients represented the effect size of edges between phenotypes in the Bayesian network and they were used to develop a set of structural equations to factorize total SNP effects into direct and indirect components.69. The overall effect of a SNP on a specific trait is then the sum of all direct and indirect effects contributing to that trait.The important difference with respect to MTM in Eq.  is that P-value thresholds. The assumption is that these signals might be associated with genes participating in organized pathways or biological functions. We first selected “relevant” SNP from the MTM-GWAS results based on a nominal P-value (<0.05). Then, we used the R package biomaRt71 for mapping SNP to genes based on a distance of 15 kb according to the Ensembl Bos taurus UMD3.1 assembly72. For each trait, we carried out functional enrichment analyses on the list of significant genes using the Cytoscape plugin ClueGo73 to identify significantly overrepresented pathways and ontologies . We used all the SNP/genes in the chip as a background.Pathway enrichment analyses were carried out to identify weaker but related signals which were missed by GWAS analysis due to the stringency in Supplementary information.