DOI: 10.5061/dryad.pc866t1v5
title: Dollo meets Bergmann: Morphological evolution in secondary aquatic mammals

description: Secondary transitions to aquatic environments are common among
 vertebrates, and aquatic lineages display several adaptations to this
 realm, some of which might make these transitions irreversible. At the
 same time, discussions about secondary transitions often focus only on the
 marine realm, comparing fully terrestrial with fully aquatic species.
 This, however, captures only a fraction of land-to-water transitions, and
 freshwater and semi-aquatic groups are often neglected in
 macroevolutionary studies. Here we use phylogenetic comparative methods to
 unravel the evolution of different levels of aquatic adaptations across
 all extant mammals, testing if aquatic adaptations are irreversible and if
 they are related to relative body mass changes. We found irreversible
 adaptations consistent with Dollo’s Law in lineages that rely strongly on
 aquatic environments, while weaker adaptations in semiaquatic lineages,
 which still allow efficient terrestrial movement, are reversible. In
 lineages transitioning to aquatic realms, including semiaquatic ones, we
 found a consistent trend toward an increased relative body mass and a
 significant association with a more carnivorous diet. We interpret these
 patterns as the result of thermoregulation constraints associated with the
 high thermal conductivity of water leading to a body mass increase
 consistent with Bergmann’s Rule and to a prevalence of more nutritious
 diets. 
description: # Dollo meets Bergmann: Morphological evolution in secondary aquatic
 mammals --- ## Description of the data and file structure
 "Farina_et_al_compiled_data.csv" contains species information.
 "Name" column is species name; "Order_Name" and
 "Family_name" columns provide taxonomic information;
 "source_IUCN" and  Source_phylacine" indicate from where
 the data came from. "Step" is the aquatic adaptation categories
 described in this study (A0: terrestrial; A1 and A2: semi-aquatic; A3:
 fully-aquatic); "Adaptation" column indicate which adaptation
 the species has (mainly applicable for A1 species for which active search
 was required) and "Reference" is from where the information came
 from; "Mass.g" is body mass data in grams (g);
 "Diet.Plant", "Diet.Vertebrate" and
 "Diet.Invertebrate" columns give information about diet for each
 species (proportion). ## Code/Farina\_et\_al\_scripts
 “Ancestral_reconstruction.R”: ancestral reconstruction analysis.
 “FossilBM_var_mu_var_rate.R”: empirical FossilBM analysis with mammals
 phylogeny, body mass data, and aquatic classification. We used variable
 trends and variable rates across the phylogeny.
 “FossilBM_HP_var_mu_var_rate.R”: empirical FossilBM analysis with mammals
 phylogeny, body mass data, and aquatic classification. HP means we added
 hyper-prior in the trend parameter. We used variable trends and variable
 rates across the phylogeny. “sim_no_trends.R” and “sim_no_trends_HP.R”:
 FossilBM simulations with no trends, HP means we added hyper-prior in the
 mu0. “sim_rnd_bg.r” and “sim_rnd_bg_HP.r”: FossilBM simulation with
 trends, but random evolution in the background. HP means we added
 hyper-prior in the mu0. “sim_neutral_bg.r” and “sim_neutral_bg_HP.r”:
 FossilBM simulation with trends, but neutral evolution in the background.
 HP means we added hyper-prior in the mu0. “simmap_count.R”: stochastic
 mapping using the mean best matrix from the ancestral reconstruction
 results. “simmap_per_clade.R”: stochastic mapping for each order of
 mammals. “calculate_effect_of_trends.R”: script used to calculate the
 relative change in body mass per million year “getAncRecData.R”: script
 used to save the ancestral reconstruction results.
 “calculate_error_sim.r”: calculate “no trend” simulation error.
 “calculate_coverage_sim.R”: coverage for rnd and neutral bg simulations.
 “Preparing_trees.R”: script used to drop, replace, compare and save que
 trees used in this study analyses. "dtest_phytools.R": script
 used to perform the D-test using previously made stochastic maps.
 "fossilbm_var_mu_const_rate.R": empirical FossilBM analysis
 using variable trends, but constant rates across the phylogeny.
 "fossilbm_const_mu_var_rate.R": empirical FossilBM analysis
 using using constant trend and variable rates.
 "fossilbm_const_mu_const_rate.R": empirical FossilBM analysis
 using using constant trend and constant rates.