Both pleiotropic connectivity and mutational correlations can restrict the divergence of traits under directional selection, but it is unknown which is more important in trait evolution. In order to address this question, we create a model that permits within-population variation in both pleiotropic connectivity and mutational correlation, and compare their relative importance to trait evolution. Specifically, we developed an individual-based, stochastic model where mutations can affect whether a locus affects a trait and the extent of mutational correlations in a population, under the corridor selection model (some traits under directional selection and others under stabilizing selection). We modified the individual-based, forward-in-time, population genetics simulation software Nemo (v2.3.46) (Guillaume and Rougemont 2006) to allow for the evolution of pleiotropic connectivity and mutational correlations at two quantitative loci affecting four traits. Mutations at the two QTL appeared at rate \(\mu\) with allelic effects randomly drawn from a multivariate Normal distribution with constant mutational allelic variance \(\alpha^2\)=0.1 and whose dimensions and covariance depended on individual-based variation in the pleiotropic connectivity of the QTL and in the loci coding for mutational correlations. This was done by implementing the capability for the pleiotropic connections between loci and traits in diploid individuals to be removed or added at a rate given by the pleiotropic mutation rate (\(\mu_{pleio}\)), which determined whether a trait-specific allelic effect of one of the QTL was added to a trait value in that individual. Each individual had a separate set of six quantitative loci, each affecting the mutational correlation between one pair of traits and which mutated at a rate given by the pleiotropic mutation rate (\(\mu_{mutcor}\)) . The two allelic values at those loci were averaged to give the covariance between the allelic effects of a pleiotropic mutation at the QTL affecting the traits. Therefore, whenever a mutation occurred at one of the two pleiotropic QTL, the mutational allelic effects were determined from the individual-specific connectivity matrix and mutational effects variance-covariance matrix M that gave the parameter values for the multivariate Normal distribution. Mutational effects were then added to the existing allelic values. To understand the impact of directional selection on the structure of genetic architecture, simulations were run with a population of individuals that had two additive loci underlying four traits. The initial conditions were set to full pleiotropy (each locus affecting every trait) and strong mutational correlations between trait pairs (\(\rho_{\mu}\) =0.99). This way, mutational effects in phenotypic space were highly constrained to fall along a single direction. The genotype-phenotype map was thus fully integrated, without modularity. Traits all began with a phenotypic value of 2 with equal value of 0.5 at each allele of the two causative QTL (loci are purely additive). Gaussian stabilizing selection was applied and determined the survival probability of juveniles, whose fitness was calculated as \(w=\exp\left[-\frac{1}{2}\left((\mathrm{\mathbf{z}}-\mathbf{\theta})^{\mathrm{T}}\cdot\mathbf{\Omega}^{-1}\cdot(\mathrm{\mathbf{z}}-\mathbf{\theta})\right)\right]\), where z is the individual trait value vector, \(\theta\) is the vector of local optimal trait values (all values initialized at 2), and \(\Omega\) is the selection variance-covariance matrix (n x n, for n traits) describing the multivariate Gaussian selection surface. The \(\Omega\) matrix was set as a diagonal matrix with diagonal elements \(\omega^2\)=5 (strength of selection scales inversely with \(\omega^2\)), and off-diagonal elements set for modular correlational selection with no correlation between modules (\(\rho_{\omega13}\) = \(\rho_{\omega14}\) = \(\rho_{\omega23}\) = \(\rho_{\omega24}\) = 0) and strong correlation within modules (\(\rho_{\omega12}\) = \(\rho_{\omega34}\) = 0.9). Divergent directional selection proceeded by maintaining static optimal trait values for traits 3 and 4 (\({\theta}_3\) = \({\theta}_4\) = 2) and increasing the optimal trait values for traits 1 and 2 by 0.001 per generation for 5000 generations, bringing the trait optima to \({\theta}_1\) = \({\theta}_2\) = 7 (corridor model of selection). In order to compare the differential effects of evolving pleiotropic connections and evolving mutational correlations on trait divergence, nine different simulations were run with all combinations of three different rates of mutation in pleiotropic connections and mutational correlations (\(\mu_{pleio}\) and \(\mu_{mutcor}\) = 0, 0.001 or 0.01) representing no evolution, and mutation rates below, at and above the allelic mutation rate (\(\mu\) = 0.001), respectively. Simulations were also run with initial mutational correlations between all pairs set to 0 (\(\rho_\mu\) = 0) to compare highly constrained genetic architecture to ones with no constraints in the direction of mutational effects. Unless otherwise specified, each simulation was run with 500 initially monomorphic (variation is introduced through mutations) individuals for 5000 generations of divergent, directional selection on traits 1 and 2 (followed by 5000 generations of stabilizing selection) in order to observe general patterns of average trait value divergence, population fitness, genetic correlation, pleiotropic degree and mutational correlation. In the case of pleiotropic degree, the two loci affecting trait values were sorted into a high and low pleiotropic degree locus for each individual before averaging over populations or replicates so that differential effects of the two loci were not averaged out in the final analysis. Individuals were hermaphrodites mating at random within a population, with non-overlapping generations. Statistics were averaged over 50 replicate simulations of each particular set of parameter values., Included here are the init files for Nemo as well as the output files of the simulation. Nemo source code can be found at: https://github.com/jmchebib/nemo_evolving_pleio, {"references":["Frédéric Guillaume, Jacques Rougemont, Nemo: an evolutionary and population genetics programming framework, Bioinformatics, Volume 22, Issue 20, 15 October 2006, Pages 2556–2557, https://doi.org/10.1093/bioinformatics/btl415"]}