Orbit verticality and body size as predictors of vertical pupils in nocturnal mammals
Data files
Nov 05, 2026 version files 1.18 GB
-
Parsons_Morris_2026_pupil_shape_data.zip
1.18 GB
-
README.md
73.28 KB
Abstract
Vertically elongated (vertical) pupils in mammals have long been regarded as adaptations for protecting nocturnal species’ retinas from bright light and, more recently, for enhancing depth perception in ambush predators. However, these explanations are based on limited taxonomic sampling and have not been tested across representative samples of mammals. Here, we used phylogenetic comparative methods to evaluate these hypotheses across 19 terrestrial mammal orders. We found no association between vertical pupils and ambush predation or exposure to bright light in nocturnal species. Instead, vertical pupils were strongly associated with dim-light-adapted species with high orbit verticality and small body size. Optical ray tracing on a schematic domestic cat eye indicates that vertical pupils may enhance peripheral brightness along the horizontal plane under dim light. These findings are consistent with the interpretation that vertical pupils are associated with dim-light vision in nocturnal mammals with specific morphological features. More broadly, our results suggest that interactions between morphology and visual ecology play a central role in shaping pupil form and provide a revised framework for understanding the adaptive significance of vertical pupils in mammals.
Authors:
- Jesse John Parsons
- John G. L. Morris
Contact: Jesse J. Parsons, jessejparsons97@gmail.com
Description of the data and file structure
What this dataset is
This dataset contains the trait data, phylogenetic trees, raw skull measurements, analysis
code and model outputs behind a phylogenetic comparative study of pupil shape in
721 mammal species. The study asks whether two features of a species, how vertically its
eye sockets (orbits) are oriented and how large its body is, predict whether the species
has a vertically elongated pupil, after accounting for activity period (day, night or in
between) and foraging mode (herbivore, active predator or ambush predator).
Terms used throughout, in plain language:
- Pupil shape. The shape of the constricted pupil: circular, vertical slit, vertical
subcircular (taller than wide but not a slit) or horizontal. - Orbit verticality. The angle, in degrees, between the plane of the eye-socket rim and
the palate (Heesy 2005). Higher values mean a more upright eye socket. - Diel activity. When a species is active: by day (diurnal), by night (nocturnal),
irregularly through both (cathemeral) or at twilight (crepuscular). - Phylogenetic analysis. Statistics that treat species as related through an
evolutionary tree. Each model was fitted on 25 alternative published trees and the
results were pooled. - MCMC (Markov chain Monte Carlo). The Bayesian method used to fit the models. Results
are summarised from long chains of random draws. - Observed versus imputed. Orbit verticality is measured for 368 of the 721 species.
"Observed" analyses use only those species; "imputed" analyses fill the gaps with values
predicted from close relatives on the tree. - Models 1 to 3. The three statistical models, defined under "Key to models and model
terms". - Ray tracing. A small optical simulation of a cat eye comparing how much light enters
through vertical and round pupils.
File tree
All files are supplied in one archive, Parsons_Morris_2026_pupil_shape_data.zip, which
unzips to the folder shown below: 65 files in 7 top-level items, about 1.1 GB in total. Almost all of the size is the six
.rds files of fitted models (1.13 GB together); everything else is under 10 MB.
README.md this file
Results.output/ model outputs and tables (30 files)
├── Model1_all_pooled_results.csv
├── Model1_imputed_pooled_results.csv
├── Model1_observed_pooled_results.csv
├── Model2_all_pooled_results.csv
├── Model2_imputed_pooled_results.csv
├── Model2_observed_pooled_results.csv
├── Model3_all_pooled_results.csv
├── Model3_imputed_pooled_results.csv
├── Model3_observed_pooled_results.csv
├── pupil_summary_workbook.xlsx
├── diagnostics/ MCMC convergence summaries (4 files)
│ ├── model1_imputed_diagnostics_summary.csv
│ ├── model1_observed_diagnostics_summary.csv
│ ├── model2_diagnostics_summary.csv
│ └── model3_diagnostics_summary.csv
├── imputation_justification/ checks on the imputation (10 files)
│ ├── section1_phylo_signal.csv
│ ├── section2_complete_case_bias.csv
│ ├── section2_missingness.csv
│ ├── section2_missingness_vs_bodysize.csv
│ ├── section2_sample_sizes.csv
│ ├── section3_crossval_summary.csv
│ ├── section4_accuracy_by_order.csv
│ ├── section4_accuracy_by_pupil.csv
│ ├── section5_observed_vs_imputed.csv
│ └── section6_imputed_value_realism.csv
├── model1.imputed/
│ └── model1.imputed_all_results.rds 372 MB
├── model1.observed/
│ └── model1.observed_all_results.rds 110 MB
├── model2.all/
│ ├── model2.imputed_all_results.rds 287 MB
│ └── model2.observed_all_results.rds 110 MB
└── model3.all/
├── model3.imputed_all_results.rds 174 MB
└── model3.observed_all_results.rds 81 MB
Supplementary_Data_Files/ the four tables cited as electronic supplementary data (4 files)
├── Supplementary_Data_S1_missingness_by_order.csv
├── Supplementary_Data_S2_imputation_accuracy_by_order.csv
├── Supplementary_Data_S3_MCMC_convergence.csv
└── Supplementary_Data_S4_per_tree_estimates.xlsx
data/ inputs to all models (2 files)
├── Mammal_PupilTraits.csv the species trait table (721 species)
└── Upham2011_sample25_binom.nex 25 phylogenetic trees
orbit.measurements/ raw skull landmark data (3 files)
├── Landmark_coordinates.csv
├── Landmark_coordinates_README.txt
└── Specimen_sources_and_credits.csv
ray.tracing/ optical simulation (10 files)
├── README_ray_tracing.txt
├── code/
│ └── Ray_Tracing_Pipeline.R
├── inputs/
│ ├── Cat_Schematic_Eye.OPT
│ ├── Chief_Rays.RAY
│ ├── Chief_Rays.xlsx
│ ├── Ray_Tracing_Main.RAY
│ ├── Ray_Tracing_Main.xlsx
│ └── Vertical_vs_Round_Pupil_Diameter.xlsx
└── outputs/
├── Lens_Metrics_by_Angle.csv
└── Vertical_vs_Round_Differences.csv
scripts/ R code for the comparative analysis (15 files)
├── 0_trees/
│ └── sample_posterior_trees.R
├── 1_models/
│ ├── model.2.observed.and.imputed.r
│ ├── model.3.observed.and.imputed.r
│ ├── model1_imputed.R
│ └── model1_observed.R
├── 2_pooling_summaries/
│ ├── Model.summaries.r
│ └── pool_posteriors_from_combined.R
├── 3_diagnostics/
│ ├── model1_diagnostics.R
│ ├── model2_diagnostics.R
│ └── model3_diagnostics.R
├── 4_imputation_validation/
│ └── imputation_justification.R
├── 5_figures/
│ ├── MCC_Tree_colours.r
│ ├── publication_figures.R
│ └── trait_trees.R
└── 6_other/
└── pupil_summary_script.R
Conventions used in every file
- Missing values are written
NAin all CSV files. - Species names follow the tip labels of the Upham et al. (2019) mammal phylogeny,
writtenGenus_specieswith an underscore (columnUpham_TipLabel). The landmark files
useGenus specieswith a space. - CSV files are comma-separated, UTF-8, with a single header row. Text fields that
contain commas are enclosed in double quotes. - File naming.
Model1,Model2,Model3identify the statistical model;
observedandimputedidentify which version of the orbit-verticality data was used;
allmeans the observed and imputed results are stacked in one file.section1to
section6inimputation_justification/refer to the six sections of the script that
produces them, not to sections of the manuscript. - Standardised predictors. Continuous predictors were converted to z-scores (mean 0,
standard deviation 1) within each model's dataset before fitting. Column or term names
beginningz_are these standardised variables. Model coefficients for them are per
standard deviation of the predictor, not per degree or per gram. - Scale of model coefficients. All models are categorical (logistic) MCMCglmm models
with the residual variance fixed, so coefficients are on the latent logit (log-odds) scale and are
large in absolute value. Their sign and whether the 95% credible interval excludes zero
are the quantities of interest; magnitudes are not directly comparable to ordinary
logistic-regression coefficients.
Key to models and model terms
All three models are Bayesian phylogenetic mixed models fitted with the R package
MCMCglmm (family categorical), with the phylogeny as a random effect, fitted separately
on each of the 25 trees in data/Upham2011_sample25_binom.nex.
| Model | Response (pupil categories; first listed is the reference level) | Species included | Predictors | Species, observed / imputed |
|---|---|---|---|---|
| Model 1 | Pupil3: Circular, Vertical (slit and subcircular pooled), Horizontal |
all diel categories | z_orbit (or z_orbit_imp), z_logMass, Diel3 |
364 / 712 |
| Model 2 | binary: Circular (0) vs Vertical (slit and subcircular pooled) (1) | non-diurnal species only; horizontal pupils excluded | z_orbit (or z_orbit_imp), z_logMass, Diel_Walls, Foraging3 |
254 / 436 |
| Model 3 | Pupil3: Circular, Vertical.sub, Vertical.slit |
non-diurnal species only; horizontal pupils excluded | as Model 2 | 254 / 436 |
MCMC settings: Model 1 observed, Model 2 and Model 3: 400,000 iterations, burn-in
100,000, thinning 150, giving 2,000 retained posterior draws per tree and 50,000 pooled
draws across 25 trees. Model 1 imputed: 200,000 iterations, burn-in 50,000, thinning
100, giving 1,500 draws per tree and 37,500 pooled.
Term codes that appear in the term, Parameter (raw) and Parameter columns of the
results files:
| Term code | Meaning |
|---|---|
(Intercept) |
Model 2 only: log-odds of a vertical pupil for a species at the reference level of every factor (strict nocturnal herbivore) with average orbit verticality and body mass |
traitPupil3.Vertical, traitPupil3.Horizontal |
Model 1: intercept for that pupil category relative to Circular |
traitPupil3.Vertical.sub, traitPupil3.Vertical.slit |
Model 3: intercept for that pupil category relative to Circular |
z_orbit |
Observed orbit verticality, standardised |
z_orbit_imp |
Orbit verticality after phylogenetic imputation of missing species, standardised |
z_logMass |
log10 of body mass in grams, standardised |
Diel3Intermediate |
Model 1: cathemeral or crepuscular, relative to diurnal |
Diel3Nocturnal |
Model 1: nocturnal (strict or flexible), relative to diurnal |
Diel_WallsFlex |
Models 2 and 3: flexibly nocturnal, relative to strictly nocturnal |
Diel_WallsIntermediate |
Models 2 and 3: cathemeral or crepuscular, relative to strictly nocturnal |
Foraging3Active |
Models 2 and 3: active forager (predator), relative to herbivore |
Foraging3Ambush |
Models 2 and 3: ambush predator, relative to herbivore |
traitPupil3.X:Y |
Models 1 and 3: the effect of predictor Y on the log-odds of pupil category X versus Circular (a colon joins the category and the predictor) |
In Supplementary_Data_S3_MCMC_convergence.csv and Supplementary_Data_S4_per_tree_estimates.xlsx
the same terms are also written out in words, e.g. Vertical: Orbit verticality for
traitPupil3.Vertical:z_orbit, and Diel - Cathemeral/crepuscular for Diel3Intermediate
or Diel_WallsIntermediate.
data/
data/Mammal_PupilTraits.csv
The species trait table used by every model and figure. One row per species, 721 rows,
20 columns. Species belong to 19 orders and 84 families. All 721 species have a pupil
shape, diel category, foraging category, body mass and diet; 368 have a measured orbit
verticality and 353 have NA.
| Column | Type | Description |
|---|---|---|
Upham_TipLabel |
text | Species name as it appears in the Upham et al. (2019) phylogeny, Genus_species. Unique within the file; the key for joining to the trees. |
Order |
text | Mammalian order. |
Family |
text | Family. |
Genus |
text | Genus. |
Species |
text | Specific epithet only. |
Foraging |
category | Foraging mode, following the scheme of Banks et al. (2015). Herbivore = not classified as a predator, the reference level in the models (511 species; for 510 of them the next column reads Surmised from diet (Phylacine 1.2), meaning the PHYLACINE 1.2 diet is at least 50% plant material); Active = active forager: a generalist, cursorial (running) hunter or insectivore (142); Ambush = ambush predator: a pounce or sit-and-wait hunter (68). Predator assignments come mainly from CarniTraits version 1.5.3, supplemented by species-specific sources. |
Foraging type: link to reference |
text | Source for Foraging. Surmised from diet (Phylacine 1.2) means the species was classed as a herbivore because its PHYLACINE diet percentages are plant-dominated; otherwise a citation, URL or database name: Banks et al 2015 = Banks et al. (2015), who classified predators as active or ambush foragers; CarniTraits or CarniTraitsv1.5.3 = the CarniTraits database, version 1.5.3 (Wooster et al. 2024); or a species-specific source. NA for 75 species. |
Full foraging reference |
text | Fuller citation for the foraging source where one was recorded; otherwise NA. |
Comment |
text | Free-text note on the evidence for the foraging assignment (e.g. prey types, scat or camera-trap data). NA for 654 species. |
Pupil |
category | Pupil shape when partly or fully constricted, scored from photographs. Circular = stays round when constricted (285 species); Vertical.slit = vertically elongated, with margins that taper and converge towards both ends of the long axis, giving a lens-shaped to slit-like opening (190); Vertical.sub = vertically subcircular: vertically elongated but with smoothly curved margins that do not taper towards the ends (68); Horizontal = clearly elongated along the horizontal axis, including slit, rectangular and elliptical forms (178). |
Pupil shape: link to photograph or reference |
text | URL(s) of the photograph(s) or the citation from which pupil shape was scored. Multiple URLs are separated by ; . |
Source of photo |
category | Where the pupil evidence came from: Inaturalist (iNaturalist photographs, 658 species), Research (published literature, 59), Calphotos (CalPhotos image database, 4). |
Mass.g |
number, grams | Adult body mass, primarily from PHYLACINE 1.2 (Faurby et al. 2018). These are the values used in all analyses. Range 6 to 4,400,000 g. No missing values. |
Diet.plant |
number, percent | Percentage of the diet that is plant material, primarily from PHYLACINE 1.2. |
Diet.vertebrate |
number, percent | Percentage of the diet that is vertebrate prey. |
Diet.invertebrate |
number, percent | Percentage of the diet that is invertebrate prey. The three Diet.* columns sum to 100 for every species. |
Orbit.verticality |
number, degrees | Dihedral angle between the orbital-margin plane and the palatal plane (Heesy 2005). One value per species. Range 35.4 to 96.3. NA for 353 species (not measured). |
Orbit.ref |
category | Source of Orbit.verticality: This study = measured for this study following the landmark protocol described under orbit.measurements/ (169 species); Heesy = Heesy (2005) (198); Gaillard (2023) = Gaillard et al. (2023) (1 species, Sarcophilus harrisii); NA where no value. |
Diel |
category | Diel activity, following Cox et al. (2021). Diurnal = active by day (201 species); Nocturnal.strict = active only at night, with no evidence of activity at other times (Cox et al.'s "obligate" nocturnal species; 264); Nocturnal.flex = mainly nocturnal but with evidence of activity outside the night (Cox et al.'s "flexible" nocturnal species; 159); Cathemeral = active throughout the day and night, interspersed with rest periods (70); Crepuscular = active only during twilight, around sunrise and sunset (27). |
Diel.reference |
text | Source of Diel. Cox et al. (2021) for 718 species; a bioRxiv URL for Apodemus sylvaticus and A. flavicollis; OTHER for Lasiorhinus latifrons, which is not covered by Cox et al.; its category was assigned from Finlayson et al. (2010) using the same categories. |
data/Upham2011_sample25_binom.nex
A Nexus-format text file containing 25 phylogenetic trees, each with the same 5,911
extant mammal species as tips, with branch lengths in millions of years. The trees are a
random sample (R set.seed(1)) from the 10,000-tree Bayesian posterior of Upham et al.
(2019), specifically the "completed" 5,911-species, topology-constrained,
fossil-tip-dated set (their data S7, file
MamPhy_fullPosterior_BDvr_Completed_5911sp_topoCons_FBDasZhouEtAl_all10k_v2_nexus.trees).
Each tree has been pruned to the 5,911 extant species (the Anolis outgroup and fossil
tips removed) and tip labels shortened to Genus_species. The trees appear in the file in
the order in which they were sampled; "Posterior tree ID" 1 to 25 in the results files is
the position of a tree in this file. The models prune each tree to the species present in
the trait table before fitting (712 of the 721 species match a tip; 9 do not and are
dropped from phylogenetic analyses).
orbit.measurements/
Raw three-dimensional landmark coordinates for the 174 specimens landmarked for this study,
and the provenance of every specimen. Landmarks were
placed on 3D cranial models (computed tomography (CT) scans and surface scans) in the free software 3D Slicer,
following Heesy (2005). The 3D models themselves are not included and remain subject
to their repositories' terms; every row carries enough information to retrieve the
source model.
How orbit verticality is calculated from these landmarks: the palatal plane is fitted
through Prosthion, Left_M1 and Right_M1; the orbital plane of one side is fitted
through that side's orb_superius, orb_inferius and orb_anterius. Orbit verticality is
the angle between the two planes, calculated for each orbit and averaged. Where only one
orbit could be landmarked (20 of 174 specimens, which therefore have 6 rather than 9
landmarks) the single value is used. The angle does not depend on the coordinate frame, so
no alignment or scaling of the scans was needed.
orbit.measurements/Landmark_coordinates.csv
1,505 rows (one per landmark point), 9 columns. 174 specimens of 174 species.
| Column | Type | Description |
|---|---|---|
species |
text | Current accepted species name, Genus species. |
landmark |
category | Landmark identity, one of 9 values. Prosthion = most anterior point of the premaxilla between the upper central incisors. Left_M1, Right_M1 = point on the alveolar margin directly above the midpoint of the upper first molar. Left_orb_superius, Right_orb_superius = point on the orbital margin farthest from the toothrow. Left_orb_inferius, Right_orb_inferius = point on the orbital margin closest to the toothrow. Left_orb_anterius, Right_orb_anterius = point on the orbital margin farthest from inion (the back of the skull). |
x, y, z |
number | Landmark coordinates in the coordinate frame and units of the source 3D model (typically millimetres for CT scans, but not guaranteed; only angles are used downstream, which do not depend on the units). |
catalogue_number |
text | Catalogue number of the physical specimen in its holding collection (Darwin Core institution:collection:number triplet where available). |
holding_institution |
text | Museum or collection that holds the physical specimen (39 institutions). |
persistent_identifier |
text | MorphoSource ARK (Archival Resource Key), DOI, or repository model identifier of the 3D model. Empty for 15 rows (Phenome10k models, which have no persistent identifier). |
repository |
category | Online repository the 3D model was obtained from: MorphoSource (1,454 rows), University of Michigan - Deep Blue Data (18), Phenome10k (15), Sketchfab (9), Sketchfab (Mammal Research Institute PAS) (9). |
orbit.measurements/Specimen_sources_and_credits.csv
174 rows (one per specimen), 9 columns. Gives the source media, rights holder, re-use
terms and the credit statement requested by the data provider for every specimen in
Landmark_coordinates.csv.
| Column | Type | Description |
|---|---|---|
species, catalogue_number, holding_institution, repository, persistent_identifier |
As in Landmark_coordinates.csv; together they link a row to its landmarks. |
|
source_media |
text | The specific repository record (e.g. MorphoSource media number and title) on which the landmarks were placed. |
rights_holder |
text | Rights holder of the source media, where stated by the repository. |
terms |
text | Re-use terms attached to the source media (e.g. "MorphoSource Standard use agreement; non-commercial use only; In Copyright", "Creative Commons CC Attribution (CC BY 4.0)", "Phenome10K terms of use", "UMMZ Digital Data Usage Terms & Conditions"). |
credit_statement |
text | The citation or credit line requested by the data provider. Multiple statements are separated by |. |
orbit.measurements/Landmark_coordinates_README.txt
Plain-text file. The measurement protocol, landmark definitions and column descriptions
above are reproduced in it, together with repository citations and the permissions
statement for University of Michigan Museum of Zoology (UMMZ) specimens. All of its
content is also in this README.
Supplementary_Data_Files/
The four tables cited in the manuscript as electronic supplementary data S1 to S4. S1 to S3 are
reformatted copies of tables in Results.output/ with the column names spelled out; the
source of each is noted. S4 is the full workbook of per-tree and pooled model estimates.
Supplementary_Data_S1_missingness_by_order.csv
How many species in each mammalian order have a measured orbit verticality. 19 rows (one
per order), 6 columns. Same content as Results.output/imputation_justification/section2_missingness.csv.
| Column | Type | Description |
|---|---|---|
Order |
text | Mammalian order. |
Total |
count | Species of that order in the trait table. |
Observed |
count | Species with a measured orbit verticality. |
Missing |
count | Species with NA orbit verticality. |
% missing |
percent | Missing / Total × 100. |
High (>60%) |
TRUE/FALSE | TRUE if more than 60% of the order's species are missing. |
Supplementary_Data_S2_imputation_accuracy_by_order.csv
How accurately the phylogenetic imputation recovers orbit verticality, by order, from a
cross-validation in which 20% of species with measured values were withheld at random,
imputed from the rest, and compared with their true values; repeated once on each of the
25 trees. 15 rows (orders with at least one withheld species), 9 columns. Same content as
Results.output/imputation_justification/section4_accuracy_by_order.csv.
| Column | Type | Description |
|---|---|---|
Order |
text | Mammalian order. |
N withheld |
count | Number of withheld-species records in that order summed over the 25 repeats. |
N observed |
count | Species of that order with a measured value. |
MAE (deg) |
degrees | Mean absolute error of imputed minus true values. |
RMSE (deg) |
degrees | Root mean squared error. |
Bias (deg) |
degrees | Mean of imputed minus true (positive = imputation overestimates). |
Range (deg) |
degrees | Range (max minus min) of the true values in that order. |
Scaled MAE (%) |
percent | MAE / Range × 100. |
High error |
TRUE/FALSE | TRUE if scaled MAE exceeds 30%. |
Supplementary_Data_S3_MCMC_convergence.csv
Convergence summary for every fixed-effect term of all six model fits. 62 rows, 7
columns. Same content as the four files in Results.output/diagnostics/, combined.
| Column | Type | Description |
|---|---|---|
Model |
category | Model 1, Model 2 or Model 3. |
Data |
category | Observed or Imputed orbit-verticality data. |
Parameter |
text | Model term written out in words (see the term key above). |
N trees |
count | Number of trees on which the model was fitted (25 in all cases). |
Min ESS |
number | Smallest effective sample size of that term's MCMC chain across the 25 trees. Effective sample size (ESS) is the number of independent draws the autocorrelated chain is equivalent to; larger is better. |
Median ESS |
number | Median ESS across the 25 trees. |
% stationary |
percent | Percentage of the 25 chains that pass the Heidelberger-Welch stationarity test (R package coda). |
Supplementary_Data_S4_per_tree_estimates.xlsx
Per-tree and pooled fixed-effect estimates for all six model fits. Written by
scripts/2_pooling_summaries/Model.summaries.r, which names its output
Results.output/Supplementary_Tables.xlsx; the file is supplied here only once, under
this name.
Excel workbook, one sheet named "Supplementary Tables", 1,622 rows. Five tables are
stacked down the sheet, each introduced by a one-row title in column A that states the
model, data version, number of species and MCMC settings, followed by its own header row.
Rows whose 95% credible interval excludes zero are formatted bold blue.
Sections 1 to 4 are per-tree estimates, one row per tree per term:
| Section | Content | Rows |
|---|---|---|
| 1 | Model 1, observed data (364 species) | 2 to 254 |
| 2 | Model 1, imputed data (712 species) | 255 to 508 |
| 3 | Model 2, observed (254 species) and imputed (436 species) | 509 to 862 |
| 4 | Model 3, observed (254 species) and imputed (436 species) | 863 to 1566 |
Columns of sections 1 to 4:
| Column | Type | Description |
|---|---|---|
Posterior tree ID |
integer 1 to 25 | Which of the 25 trees in data/Upham2011_sample25_binom.nex this fit used. |
Model type |
category | Observed or Imputed. |
N taxa |
count | Species in that fit. |
DIC |
number | Deviance information criterion of that fit (lower = better fit, comparable only within a section). |
Parameter |
text | Model term written out in words. |
Parameter (raw) |
text | Model term code as in the CSV files (see term key). |
Posterior mean |
number, logit scale | Mean of that tree's retained draws. |
Lower 95% CI, Upper 95% CI |
number | 95% highest-posterior-density credible interval for that tree. |
Effective sample size |
number | ESS of that term's chain in that fit. |
pMCMC |
number, 0 to 1 | MCMCglmm's two-sided probability that the effect is zero (proportion of draws on the minority side of zero, doubled). |
Direction |
category | positive or negative sign of the posterior mean. |
CI excludes zero |
1/0 | 1 if the 95% interval does not include zero. |
Section 5 (rows 1567 to 1622) is the pooled estimates for all six fits, i.e. the content of
the six observed/imputed *_pooled_results.csv files, with these columns: Model,
Model type, Parameter, Parameter (raw), Pooled posterior mean, Pooled SE,
Pooled lower 95% CI, Pooled upper 95% CI, N posterior trees, % iterations positive,
% iterations negative, % iterations consistent, Direction, CI excludes zero.
These correspond one-to-one to the CSV columns described above.
Results.output/
The nine Model*_pooled_results.csv files
Pooled fixed-effect estimates: the final results of the three models. "Pooled" means the
retained MCMC draws from all 25 per-tree fits were concatenated into one posterior sample,
so the uncertainty includes both within-tree and between-tree (phylogenetic) uncertainty.
Model1_observed_pooled_results.csv(10 rows),Model1_imputed_pooled_results.csv(10 rows)Model2_observed_pooled_results.csv(7 rows),Model2_imputed_pooled_results.csv(7 rows)Model3_observed_pooled_results.csv(14 rows),Model3_imputed_pooled_results.csv(14 rows)Model1_all_pooled_results.csv(20 rows),Model2_all_pooled_results.csv(14 rows),
Model3_all_pooled_results.csv(28 rows): the observed and imputed files for that
model stacked one above the other, with no new information.
All nine share the same 12 columns:
| Column | Type | Description |
|---|---|---|
term |
text | Model term code (see the term key above). |
pooled_mean |
number, logit scale | Mean of the pooled posterior draws. |
pooled_SE |
number | Standard deviation of the pooled posterior draws. |
pooled_l95 |
number | 2.5th percentile of the pooled draws (lower limit of the 95% credible interval). |
pooled_u95 |
number | 97.5th percentile (upper limit). |
n_trees |
count | Number of per-tree fits pooled (25). |
pct_positive |
percent | Percentage of pooled draws greater than zero. |
pct_negative |
percent | Percentage of pooled draws less than zero. |
pct_consistent |
percent | Whichever of pct_positive or pct_negative matches direction: the percentage of draws on the same side of zero as the mean. Near 100 indicates a consistent effect. |
direction |
category | positive if pooled_mean > 0, else negative. |
n_total |
count | Number of pooled posterior draws (25 trees × 2,000 = 50,000, or 25 × 1,500 = 37,500 for Model 1 imputed). |
model |
category | Model1_Observed, Model1_Imputed, Model2_Observed, Model2_Imputed, Model3_Observed or Model3_Imputed. |
pupil_summary_workbook.xlsx
Excel workbook of descriptive summaries of the trait table. Five sheets:
| Sheet | Content |
|---|---|
Summary |
Several small tables stacked down the sheet, each with a title row: overall sampling (species, genera, families, orders); species, genera, families and orders per pupil shape; number of genera, families and orders that contain more than one pupil shape; cross-tabulations of pupil shape by Diel3, by Foraging and by Diet.category, each with the count N and the column total. |
Multiple_Genera |
Genera containing more than one pupil shape: Genus, Species count, Number of pupil types, Pupil types (comma-separated list). |
Multiple_Families |
Same for families. |
Multiple_Orders |
Same for orders. |
Diet_Assignments |
One row per species (721): Upham_TipLabel, Order, Family, Genus, Species, Pupil, Diel, Foraging, Diet.plant, Diet.vertebrate, Diet.invertebrate as in Mammal_PupilTraits.csv, plus Diet.category. |
Diet.category is the largest of the three diet components (Herbivore,
Vertebrate faunivore or Invertebrate faunivore), or Omnivore when two components tie
for largest. Diel3 on the Summary sheet is the three-level grouping used in Model 1
(Diurnal; Intermediate = cathemeral + crepuscular; Nocturnal = strict + flexible).
diagnostics/
MCMC convergence summaries, one row per model term. These are the source of
Supplementary_Data_S3_MCMC_convergence.csv.
model1_observed_diagnostics_summary.csv(10 rows) and
model1_imputed_diagnostics_summary.csv(10 rows): columnsterm,n_trees,
min_ESS,median_ESS,pct_stationary.model2_diagnostics_summary.csv(14 rows) andmodel3_diagnostics_summary.csv
(28 rows): the same columns preceded bymodel_type(observedorimputed).
| Column | Type | Description |
|---|---|---|
model_type |
category | observed or imputed (Models 2 and 3 only). |
term |
text | Model term code (see term key). |
n_trees |
count | Number of per-tree fits summarised (25). |
min_ESS |
number | Smallest effective sample size across the 25 fits. |
median_ESS |
number | Median effective sample size across the 25 fits. |
pct_stationary |
percent | Percentage of the 25 chains passing the Heidelberger-Welch stationarity test. |
imputation_justification/
Ten tables that test whether phylogenetic imputation of orbit verticality is justified.
They are produced in six sections by one script, scripts/4_imputation_validation/imputation_justification.R.
Unless stated, "orbit" means Orbit.verticality in degrees, "all species" means the
Model 1 dataset (721 species, 368 observed) and "non-diurnal non-horizontal" means the
Model 2/3 dataset (441 species, 257 observed; 436 / 254 after matching to the tree).
section1_phylo_signal.csv (8 rows). Is orbit verticality phylogenetically
conserved, so that relatives are informative? Long format: block groups rows,
metric names the statistic, value is its value, p_value its p-value where one
exists, n the number of species used.
block |
metric |
Meaning of value |
|---|---|---|
phylo_signal |
Pagels_lambda |
Pagel's lambda (0 = no phylogenetic signal, 1 = Brownian-motion expectation), with likelihood-ratio p-value; first tree, observed species only. |
phylo_signal |
Blombergs_K |
Blomberg's K with randomisation p-value (1,000 permutations). |
variance_partition |
All species, Non-diurnal non-horizontal |
Percentage of variance in orbit verticality that lies between families (eta-squared × 100). |
within_family_SD |
median_SD |
Median within-family standard deviation (degrees) over families with at least 3 measured species. |
within_family_SD |
pct_SD_lt5, pct_SD_lt10 |
Percentage of those families with a standard deviation (SD) below 5 or below 10 degrees. |
within_family_SD |
n_families |
Number of families with at least 3 measured species. |
section2_sample_sizes.csv (2 rows). Columns dataset, n_total, n_observed,
n_missing, pct_missing: species counts and percentage with missing orbit
verticality for the two datasets.
section2_missingness.csv (19 rows). Missingness by order; identical in content to
Supplementary Data S1. Columns Order, n_total, n_observed, n_missing,
pct_missing, high_missing (TRUE if pct_missing > 60).
section2_missingness_vs_bodysize.csv (3 rows). Is missingness related to body size?
| Column | Description |
|---|---|
dataset |
Dataset tested; the third row repeats the all-species test with Order as a covariate. |
n |
Species in the test. |
mean_log10mass_observed |
Mean log10 body mass (g) of species with a measured orbit. |
mean_log10mass_missing |
Mean log10 body mass of species without. |
logistic_beta |
Slope of log10 mass in a logistic regression of "orbit missing" (1/0) on log10 mass. |
logistic_p |
p-value of that slope (for the Order-adjusted row, the likelihood-ratio p-value for mass). |
section2_complete_case_bias.csv (3 rows, metric and value). Among non-diurnal
species, the mean orbit verticality using observed species only
(nondiurnal_mean_orbit_observed_only), the mean after adding imputed values
(nondiurnal_mean_orbit_imputation_inclusive), and their difference in degrees
(complete_case_shift_deg).
section3_crossval_summary.csv (2 rows). Overall cross-validation accuracy of the
imputation: 20% of measured species withheld at random, imputed from the rest under
Brownian motion, compared with their true values; repeated once per tree (25 repeats,
different random draw each time).
| Column | Description |
|---|---|
dataset |
A_all_species or B_nondiurnal_nonhoriz. |
n_records |
Withheld-species records summed over the 25 repeats. |
R2 |
Squared correlation between imputed and true values. |
CCC |
Lin's concordance correlation coefficient (agreement, penalising both scatter and systematic offset; 1 = perfect). |
MAE |
Mean absolute error, degrees. |
scaled_MAE_pct |
MAE as a percentage of true_range. |
bias |
Mean of imputed minus true, degrees. |
true_range |
Range of the true values, degrees. |
section4_accuracy_by_order.csv (15 rows). Cross-validation accuracy by order;
identical in content to Supplementary Data S2. Columns order, n_withheld,
n_observed, MAE, RMSE, bias, true_range, scaled_MAE_pct, high_error
(TRUE if scaled_MAE_pct > 30). All error columns in degrees.
section4_accuracy_by_pupil.csv (4 rows). Cross-validation accuracy by pupil shape.
Columns pupil, n_withheld, MAE, R2, CCC, bias, true_range,
scaled_MAE_pct, defined as above.
section5_observed_vs_imputed.csv (7 rows). Do Model 2's conclusions change between
the observed and imputed fits? One row per term.
| Column | Description |
|---|---|
term |
Model 2 term code (see term key). |
mean_post_obs, mean_post_imp |
Pooled posterior mean, observed and imputed fit. |
pct_positive_obs, pct_positive_imp |
Percentage of the 25 per-tree posterior means that are positive. |
pct_consistent_obs, pct_consistent_imp |
Percentage of the 25 per-tree means on the same side of zero as the pooled mean. |
n_trees_obs, n_trees_imp |
Trees fitted (25). |
dir_obs, dir_imp |
positive or negative. |
direction_agree |
TRUE if dir_obs equals dir_imp. |
section6_imputed_value_realism.csv (8 rows). Are the imputed values plausible? Long
format with subset (all_species or nondiurnal) and group.
group |
Meaning of the row |
|---|---|
observed |
Summary of measured values: n, mean, sd, median, min, max (degrees). |
imputed_only |
Same summary for the species whose values were imputed. |
KS_observed_vs_imputed |
Two-sample Kolmogorov-Smirnov test comparing the two distributions: ks_D is the test statistic, ks_p the p-value; n is the imputed count. |
imputed_within_observed_range |
mean column holds the percentage of imputed values lying within the observed min to max. |
imputed_within_observed_range_plus_1SD |
Same, within the observed range widened by one SD at each end. |
The six .rds files
model1.observed/model1.observed_all_results.rds, model1.imputed/model1.imputed_all_results.rds,
model2.all/model2.observed_all_results.rds, model2.all/model2.imputed_all_results.rds,
model3.all/model3.observed_all_results.rds, model3.all/model3.imputed_all_results.rds.
Each is an R object file, readable only in R (readRDS(), with the MCMCglmm package
installed). Each holds the 25 fitted MCMCglmm models for one model and data version, one
per tree with all retained posterior draws, plus the per-tree results table and the run
settings. They allow the results to be re-pooled or re-summarised without re-running the
models, which takes several hours each. Everything reported in the paper is also in the
CSV and xlsx files.
ray.tracing/
A separate optical simulation. Light rays were traced through a schematic (idealised,
rotationally symmetric) model of a domestic cat eye (Vakkur & Bishop 1963) in the free optical design program
Beam4 (Stellar Software), to compare the effective light-collecting aperture of a vertical
and a round pupil of matched area at 17 incident angles (0° to 80° in 5° steps, measured
from the optical axis) and five levels of pupil constriction. The Beam4 files are plain
text and can be read in any text editor; running them requires Beam4.
Coordinate conventions in all Beam4 files and the two .xlsx ray tables: distances in
millimetres; Z is along the optical axis (positive into the eye), X horizontal
(nasal-temporal), Y vertical (superior-inferior). X0, Z0 are a ray's starting point,
U0, V0 its direction cosines in X and Y (the X and Y components of the unit vector
along the ray; the Z component W0 is left to Beam4's default), and X1, Z1, Y1 the
point where Beam4 found the ray to intersect surface 1, the anterior corneal surface.
Column definitions follow the Beam Four user guide (Stellar Software, chapters 9 and 10).
inputs/
| File | Format | Content |
|---|---|---|
Cat_Schematic_Eye.OPT |
Beam4 optics table, plain text | The schematic cat eye: six optical surfaces in order along the axis (anterior cornea, posterior cornea, iris, anterior lens, posterior lens, retina). Columns below. |
Chief_Rays.RAY |
Beam4 ray table, plain text, 19 rays | One chief ray (through the centre of the pupil) for each incident angle. Columns X0, Z0, U0, V0, X1, Z1, Y1 as defined above. |
Chief_Rays.xlsx |
Excel, 1 sheet, 17 rows | The same chief rays with Beam4's intersection results entered. Columns Incident_Angle (degrees), X0, Z0, U0, V0, X1, Z1, Y1. Read by the R pipeline. |
Ray_Tracing_Main.RAY |
Beam4 ray table, plain text | All 680 boundary rays: for each pupil shape (round, vertical), constriction level (1 to 5) and incident angle (17), the four rays that graze the nasal, temporal, superior and inferior edges of the pupil. |
Ray_Tracing_Main.xlsx |
Excel, 1 sheet (Primary), 680 data rows |
The 680 boundary rays with their Beam4 results. Columns Pupil_Shape (Round or Vertical), Constriction_Level (1 to 5), Ray (which edge of the pupil the ray grazes: Nasal, Temporal, Superior or Inferior), Incident_Angle (degrees), and X0, Z0, U0, V0, X1, Z1, Y1 as defined above. Read by the R pipeline. |
Vertical_vs_Round_Pupil_Diameter.xlsx |
Excel, 1 sheet | The pupil dimensions used at each constriction level. Columns: log cd/m² = luminance (log10 candela per m²) at which a cat pupil has that size (from Hammond & Mouat 1985); Constriction level (1 = most dilated, 5 = most constricted); vertical pupil Height and Width (mm); round pupil Height & Width = diameter of a circle with the same area as the vertical pupil (mm). Reference given in the sheet. |
Columns of Cat_Schematic_Eye.OPT (Beam4 headers):
| Column | Meaning |
|---|---|
Index |
Refractive index of the medium in front of the surface |
Zvk |
Position of the surface along the optical axis (mm) |
Curv |
Surface curvature, 1/radius (1/mm) |
Type |
Lens = refracting surface; Iris = the pupil; BIF = Beam4 code, read here as an ordinary refracting surface (the posterior lens); Final = retina, where the trace ends |
Dx, Dy |
Aperture width and height (mm); for the iris, set on each run from Vertical_vs_Round_Pupil_Diameter.xlsx |
S |
Surface shape; 1 = spherical |
Diam |
Surface diameter (mm) |
code/Ray_Tracing_Pipeline.R
R script. Reads Chief_Rays.xlsx and Ray_Tracing_Main.xlsx, projects each boundary
ray's corneal intersection onto the plane perpendicular to the chief ray at that angle,
and computes for each pupil shape × constriction level × angle the effective aperture
width (span of the nasal and temporal rays), height (sum of the superior and inferior
ray offsets) and elliptical area, then compares vertical with round. Writes the two
files in outputs/.
outputs/
Lens_Metrics_by_Angle.csv (170 rows = 2 shapes × 5 levels × 17 angles, 6 columns)
| Column | Type | Description |
|---|---|---|
Pupil_Shape |
category | Round or Vertical. |
Constriction_Level |
integer 1 to 5 | 1 = most dilated, 5 = most constricted (see Vertical_vs_Round_Pupil_Diameter.xlsx). |
Incident_Angle |
degrees | Angle of the incoming light from the optical axis, 0 to 80. |
width |
mm | Effective aperture width perpendicular to the chief ray. |
height |
mm | Effective aperture height. |
area |
mm² | Effective aperture area, π × width/2 × height/2. |
Vertical_vs_Round_Differences.csv (85 rows = 5 levels × 17 angles, 11 columns)
| Column | Type | Description |
|---|---|---|
Constriction_Level, Incident_Angle |
As above. | |
width_Round, width_Vertical |
mm | Width for each pupil shape. |
height_Round, height_Vertical |
mm | Height for each shape. |
area_Round, area_Vertical |
mm² | Area for each shape. |
width_pct_diff, height_pct_diff, area_pct_diff |
percent | (Vertical − Round) / Round × 100; positive means the vertical pupil is larger. |
README_ray_tracing.txt
Plain-text description of the ray-tracing folder and workflow. Its content is included
above.
scripts/
R scripts for the comparative analysis, numbered in the order they are run. All are plain
text. Each is run from the top-level folder of this dataset, e.g.
Rscript scripts/1_models/model1_observed.R; paths inside the scripts are relative to it.
The three scripts in 5_figures/ draw the figures in the related article (Figures 1 and 2,
and electronic supplementary material figures S2 and S3). The figures themselves are
published with the article and are not included in this dataset. The scripts save them to
Results.output/figures/; create that folder before running them.
| Script | What it does | Reads | Writes |
|---|---|---|---|
0_trees/sample_posterior_trees.R |
Draws 25 trees at random (set.seed(1)) from the Upham et al. 10,000-tree posterior, prunes fossils and outgroup, shortens tip labels. Optional: its output is supplied. |
the 1.9 GB Upham posterior file (not included) | data/Upham2011_sample25_binom.nex |
1_models/model1_observed.R |
Fits Model 1 on observed orbit data, once per tree. | data/ |
Results.output/model1.observed/*.rds |
1_models/model1_imputed.R |
Imputes orbit verticality on each tree (Rphylopars, Brownian motion), then fits Model 1. | data/ |
Results.output/model1.imputed/*.rds |
1_models/model.2.observed.and.imputed.r |
Fits Model 2, observed then imputed. | data/ |
Results.output/model2.all/*.rds |
1_models/model.3.observed.and.imputed.r |
Fits Model 3, observed then imputed. | data/ |
Results.output/model3.all/*.rds |
2_pooling_summaries/pool_posteriors_from_combined.R |
Concatenates the 25 per-tree posteriors and summarises them. | the .rds files |
the nine *_pooled_results.csv |
2_pooling_summaries/Model.summaries.r |
Builds the formatted results workbook. | .rds and pooled CSVs |
Results.output/Supplementary_Tables.xlsx, supplied in this dataset as Supplementary_Data_Files/Supplementary_Data_S4_per_tree_estimates.xlsx |
3_diagnostics/model1_diagnostics.R, model2_diagnostics.R, model3_diagnostics.R |
ESS and Heidelberger-Welch tests on every chain. | the .rds files |
Results.output/diagnostics/*.csv |
4_imputation_validation/imputation_justification.R |
The six-section imputation check described above. | data/, Model 2 .rds |
Results.output/imputation_justification/*.csv |
5_figures/MCC_Tree_colours.r |
Figure 1. | data/ |
Results.output/figures/Figure1_phylogeny.* (not included) |
5_figures/trait_trees.R |
Orbit-verticality and body-mass trees. | data/ |
Results.output/figures/Figure_orbit_verticality.*, Results.output/figures/Figure_bodymass.* (not included) |
5_figures/publication_figures.R |
Figure 2. | pooled CSVs | Results.output/figures/Figure2_coefficient_plot.* (not included) |
6_other/pupil_summary_script.R |
Descriptive summaries of the trait table. | data/Mammal_PupilTraits.csv |
pupil_summary_workbook.xlsx |
Sharing/Access information
Links to other publicly accessible locations of the data: this Dryad dataset is the primary
location of these data. The four files in Supplementary_Data_Files/ are also cited as
electronic supplementary material of the related article (see Related publication below).
Data derived from other sources
- Phylogeny. Upham NS, Esselstyn JA, Jetz W. 2019 Inferring the mammal tree:
species-level sets of phylogenies for questions in ecology, evolution, and conservation.
PLoS Biology 17, e3000494. Posterior trees from Dryad,
https://doi.org/10.5061/dryad.tb03d03 (data S7). 25 trees are redistributed here in
data/Upham2011_sample25_binom.nex. - Diel activity. Cox DTC, Gardner AS, Gaston KJ. 2021 Diel niche variation in mammals
associated with expanded trait space. Nature Communications 12, 1753. Two Apodemus
species from the bioRxiv preprint linked in theDiel.referencecolumn.
Lasiorhinus latifrons: Finlayson GR, White CR, Dibben R, Shimmin GA, Taggart DA. 2010
Activity patterns of the southern hairy-nosed wombat (Lasiorhinus latifrons)
(Marsupialia: Vombatidae) in the South Australian Murraylands. Australian Mammalogy 32,
39–46, https://doi.org/10.1071/AM09024. - Diet percentages and body mass. Primarily from PHYLACINE 1.2: Faurby S, Davis M, Pedersen RØ,
Schowanek SD, Antonelli A, Svenning J-C. 2018 PHYLACINE 1.2: the phylogenetic atlas of
mammal macroecology. Ecology 99, 2626. - Foraging mode (predators). Banks MS, Sprague WW, Schmoll J, Parnell JA, Love GD.
2015 Why do animal eyes have pupils of different shapes? Science Advances 1,
e1500391, https://doi.org/10.1126/sciadv.1500391. CarniTraits version 1.5.3: Wooster EIF et al.
2024 Functional traits of the world's late Quaternary terrestrial mammalian predators.
Global Ecology and Biogeography 33, e13909, https://doi.org/10.1111/geb.13909 (data at
https://github.com/Eamonn-wooster/CarniTraits).
Plus the species-specific sources listed in theForaging type: link to referenceand
Full foraging referencecolumns. - Pupil shape. Scored from photographs on iNaturalist (https://www.inaturalist.org)
and CalPhotos (https://calphotos.berkeley.edu), and from the published sources linked
in thePupil shape: link to photograph or referencecolumn. - Orbit verticality, published values. Heesy CP. 2005 Function of the mammalian
postorbital bar. Journal of Morphology 264, 363–380, https://doi.org/10.1002/jmor.10334.
Gaillard C, MacPhee RDE, Forasiepi AM. 2023 Seeing through the eyes of the sabertooth
Thylacosmilus atrox (Metatheria, Sparassodonta). Communications Biology 6, 257,
https://doi.org/10.1038/s42003-023-04624-5. Source of the value for Sarcophilus harrisii. - 3D cranial models used for the landmark data (models not redistributed):
MorphoSource (Boyer DM, Gunnell GF, Kaufman S, McGeary TM. 2017 MorphoSource: archiving
and sharing 3-D digital specimen data. Paleontological Society Papers 22, 157–181);
Phenome10K (Goswami A. 2015 Phenome10K: a free online repository for 3-D scans of
biological and palaeontological specimens, www.phenome10k.org, CC BY-NC 4.0);
University of Michigan Deep Blue Data (two UMMZ deposits, cited by DOI in
Specimen_sources_and_credits.csv); Sketchfab (two models, CC BY 4.0: Mammal Research
Institute PAS, Poland, 2021, Lynx lynx skull; University of Wyoming Libraries, 2020,
UWYMV:Mamm:5842 Vulpes velox skull). Per-specimen rights holders, terms and requested
credit lines are inorbit.measurements/Specimen_sources_and_credits.csv. Fourteen
specimens are University of Michigan Museum of Zoology (UMMZ) CT scans; the UMMZ Mammal
Division confirmed that publishing these landmark coordinates is permitted under the
UMMZ Digital Data Usage terms, and the data were provided courtesy of the UMMZ. - Cat schematic eye for ray tracing. Vakkur GJ, Bishop PO. 1963 The schematic eye in
the cat. Vision Research 3, 357–381, https://doi.org/10.1016/0042-6989(63)90009-9. - Cat pupil dimensions for ray tracing. Hammond P, Mouat GSV. 1985 The relationship
between feline pupil size and luminance. Experimental Brain Research 59, 485–490,
https://doi.org/10.1007/BF00261338.
Related publication
Parsons JJ, Morris JGL. Orbit verticality and body size as predictors of vertical
pupils in nocturnal mammals. Submitted to Proceedings of the Royal Society B.
Code/Software
Software needed to open each file type
| Extension | Count | Free software that opens it |
|---|---|---|
.csv |
31 | Any text editor or spreadsheet program (LibreOffice Calc, Google Sheets); R read.csv(); Python pandas.read_csv(). |
.xlsx |
5 | LibreOffice Calc, Google Sheets; R packages readxl or openxlsx. |
.txt, .md |
3 | Any text editor. |
.nex |
1 | Any text editor; tree viewers FigTree or Dendroscope; R packages ape (read.nexus()) or phytools. |
.rds |
6 | R only (readRDS()), with the MCMCglmm package installed to use the model objects. |
.R, .r |
16 | Any text editor; R or RStudio to run. |
.OPT, .RAY |
3 | Plain text, so any text editor; Beam4 (Stellar Software, free download) to run the simulation. |
R environment
The analyses were run in R 4.4.2 (2024-10-31) on macOS. Package versions are those
installed when the outputs were produced; all are free and on CRAN.
| Package | Version | Used for |
|---|---|---|
ape |
5.8.1 | Reading, pruning and writing trees (read.nexus, keep.tip) |
phangorn |
2.12.1 | Consensus trees for the figures |
phytools |
2.5.2 | Phylogenetic signal (Pagel's lambda, Blomberg's K) |
MCMCglmm |
2.36 | Fitting the phylogenetic mixed models |
Matrix |
1.7.5 | Sparse inverse phylogenetic covariance matrices for MCMCglmm |
coda |
0.19.4.1 | Effective sample size and Heidelberger-Welch diagnostics |
Rphylopars |
0.3.10 | Phylogenetic imputation of orbit verticality |
dplyr |
1.2.0 | Data manipulation |
tidyr |
1.3.2 | Data reshaping |
openxlsx |
4.2.8.1 | Writing Excel workbooks |
readxl |
1.4.5 | Reading the ray-tracing Excel inputs |
ggplot2 |
4.0.2 | Figure 2 |
patchwork |
1.3.2 | Combining panels in Figure 2 |
Model fitting is slow: each model script fits 25 MCMCglmm models with 200,000 to 400,000
iterations and takes several hours on a desktop computer.
Run order to reproduce the outputs
- (Optional)
scripts/0_trees/sample_posterior_trees.R, only if regenerating
data/Upham2011_sample25_binom.nex; requires downloading the Upham et al. (2019)
posterior from Dryad (see Sharing/Access information). scripts/1_models/(four scripts, any order): fit the models, writing the.rdsfiles.scripts/2_pooling_summaries/pool_posteriors_from_combined.R: the pooled CSVs.scripts/2_pooling_summaries/Model.summaries.r: the results workbook (Supplementary Data S4).scripts/3_diagnostics/andscripts/4_imputation_validation/: diagnostics and
imputation checks.scripts/5_figures/andscripts/6_other/: figures (not included) and descriptive summaries.- Ray tracing is independent: run the
.RAYfiles in Beam4 withCat_Schematic_Eye.OPT
loaded, copy the intersection coordinates into the two.xlsxinput tables, then run
ray.tracing/code/Ray_Tracing_Pipeline.R.
