## Similar protocols

## Protocol publication

[…] All analyses were conducted using as a template the phylogenetic tree recovered by Bayesian analysis of mitochondrial and nuclear genes in . However, because the branch lengths of the original topology reflect rates of molecular rather than morphological evolution, we used the same molecular data (see for GenBank accession numbers) to generate a set of ultrametric trees in which internodal lengths reflect time and lengths of all root-to-tip pathways were equal . Ultrametric trees were constructed using **BEAST** v1.7.1 assuming a Yule speciation process prior. The data matrix was divided into three partitions—mitochondrial DNA, 28 S rDNA and elongation factor 1-α—analyzed simultaneously using separate GTR+I+Γ models. Ultrametric branch lengths were calculated using unlinked and uncorrelated log-normal relaxed clocks separated by partition . Two independent tree-searching analyses each ran for 100 million iterations, where one configuration was sampled per 1000 generations with the default 10% burn-in (Data deposited in the Dryad on-line repository: (http://dx.doi.org/10.5061/dryad.79d15).The program TRACER v1.5 was used to ensure that effective sample sizes of the posterior distribution were greater than 1000 for each independent analysis. To achieve a more conservative burn-in of 30%, we discarded an additional 20% of sampled trees using LogCombiner v1.7.1 . The posterior distributions of the two analyses were pooled to yield 1000 trees. Multiply represented taxa were pruned to one population per species (see for localities) by list-applying (command ‘lapply’) the “drop.tip” function to the entire set of trees in the **ape** package available through the R statistical computing language . To ensure consistency with the branching pattern of the original Bayesian tree , the posterior distribution was filtered using a rooted backbone constraint tree () in **PAUP*** v4.0b which preserved well-supported clades (i.e., posterior probabilities >0.95) while allowing for variation in the placement of poorly supported clades and species. This resulted in a distribution of 431 trees that was used in all analyses of character evolution. [...] Males of each species were assigned one of three combinations of penile-sac (S) and pedipalpal (P) features. Species with bilateral penile cuticular sacs that convey a nuptial gift and simple “female-like” pedipalps were coded as S+P−; species that lack penile sacs and have simple pedipalps were coded as S−P−; and species that lack sacs but have pedipalps heavily modified for clasping () were coded as S−P+ (). States were determined for all species by original observations of anatomy. No species is known to have both penile sacs and modified pedipalps, so this combination of traits was not coded. That this combination is unobserved gives strength to our alternative model of male reproductive evolution, so we chose to ignore it, although alternative approaches might include the combination .The ancestral male morphology was determined using parsimony reconstructions with **Mesquite** v. 2.75 and with **BayesTraits** Multistate –. The latter was accomplished by comparing marginal likelihoods of two models: a 6-rate model in which all transitions between character states were possible, and a model that differs only in that state 0 (i.e., no penile sacs, simple pedipalps) was assigned to the root. As these models are not nested, they were compared using Bayes factors .To assess the direction of change in male morphology, two potential models of male character evolution were compared: the 6-rate model representing the possibility for transitions between all three character states (), and a 2-rate model restricting transitions to the loss of penile sacs (S+P−→S−P−) followed by the gain of modified pedipalps (S−P−→S−P+) (). The 2-rate model is an evolutionary trajectory wherein each transition is consistent with escalation in intersexual antagonism during mating. Changes from S−P+→S−P−→S+P−, possible in the 6-rate model, suggest decreasing precopulatory antagonism and/or an increase in reliance on courtship (i.e., female appeasement by the male). [...] Each species was assigned one of two discrete states for each character. The penis was coded as having either a bilateral pair of cuticular sacs that convey a nuptial gift (S+) or as lacking sacs (S−); the female genital operculum was coded as either unarmed (B−) () or as elaborated to form a pregenital barrier (B+) (). States were determined for all species by original observations of anatomy. We interpreted the evolutionary changes S+→S− and/or B−→B+ as evidence for an increase in precopulatory antagonism and/or a decrease in female appeasement by the male and change in the opposite direction as a decrease in precopulatory antagonism and/or an increase in female appeasement by the male.Ancestral states were determined for each character using parsimony and a hierarchical Bayesian method implemented in **SIMMAP** v. 1.5 . In the Bayesian approach, each character was modeled separately in accordance with standards outlined in ; we used either an empirical character-bias prior derived from the frequency of terminal states or a β-distribution prior where the best-fit α-shape value was derived from Markov chain Monte Carlo (MCMC) sampling . The overall evolutionary rate for each character set was modeled using a Γ-tree prior obtained via MCMC sampling for the α-shape parameter and β-rate parameter . Analyses were replicated with and without outgroup taxa to assess outgroup effects on the relative rates of character change. Root states were inferred from the marginal posterior probabilities for each state across all sub-sampled, outgroup-rooted trees (n = 431) with fixed branch lengths for each character.We determined whether state changes in the penis and female genital operculum were correlated using the Discrete module in BayesTraits . This was done by comparing the marginal likelihoods of two models: an independent 4-rate model in which state changes in the penis and female genital operculum were estimated separately () and a dependent 8-rate model () in which single-step changes between the four penis-operculum combinations (S+B−, S+B+, S−B+, S−B−) were estimated. Thus a comparison of log likelihoods that favors the 4-rate model indicates no association between state changes, and a comparison that favors the dependent model indicates correlated change between the penis and female genital operculum.SIMMAP was also used to test for correlations between male and female genital morphology across the posterior tree distribution using predictive sampling and stochastic character mapping via a continuous-time Markov chain . The overall evolutionary rate for each character set was modeled with the Γ-distribution prior used in the ancestral state reconstructions, and bias priors for male and female characters were modeled either as β-distributions or empirical priors as in the ancestral state reconstruction analyses. Bayesian parametric bootstrapping was conducted by sampling each tree 10 times with 10 prior draws for a total of 43,100 samples for all model parameters. Results were summarized as M-values (i.e., the correlation between the histories of two characters across the phylogeny) and p-values (i.e., the probability that an association between penis state and female barrier presence/absence as extreme as observed could arise simply by chance).In contrast to parsimony, likelihood- or Bayesian-based trait-evolution methods can potentially assess whether change in one state is more likely to precede change in another—even along the same branch—by assigning different rates to these changes. Those states with higher rates are more likely to occur before changes in states with lower rates . Assuming character dependence, it is therefore possible to test whether one character state change (e.g., penis loses sacs) promotes a different character state change (e.g., female gains pregenital barrier). We tested whether nuptial sac loss or pregenital barrier gains were significantly different by using the Discrete module in BayesTraits by comparing a dependent, “precedence-possible” 8-rate model in which transitions between the four penis-operculum combinations were estimated simultaneously () to a dependent 7-rate model () wherein gain of the pregenital barrier (S+B−→S+B+) and loss of penile sacs (S+B−→S−B−) were assumed to occur at the same rate. A comparison of log-likelihoods that favors the dependent, “no precedence” 7-rate model would indicate that the rates of increased antagonism from the ancestral condition are equivalent between the sexes, whereas a comparison favoring the 8-rate model indicates a difference between the rates of escalation between the sexes. In the event the 8-rate model is favored, the mean and variance of rates of escalation can be further compared between the sexes. The sex that was most likely to have initiated the escalation can then be determined by its significantly higher mean rate of morphological change. […]

## Pipeline specifications

Software tools | BEAST, APE, PAUP*, Mesquite, BayesTraits, SIMMAP |
---|---|

Application | Phylogenetics |

Organisms | Ilex paraguariensis |