DOI: 10.5061/dryad.mgqnk998h
title: Data from: Rapid evolution of prehistoric dogs from wolves by natural and sexual selection emerges from an agent-based model

description: Wolves are among the earliest animals to be domesticated. However, the
 mechanism by which ancient wolves were domesticated into modern dogs is
 unknown. The prevailing domestication hypotheses are that humans
 selectively bred the wolves that were more docile. However, a competing
 hypothesis states that wolves which were less hostile towards humans would
 essentially domesticate themselves by naturally selecting for tamer
 wolves, since that would allow for easier access to food from human
 settlements. A major critique of the latter hypothesis is whether
 evolution by this natural selective pathway could have occurred in a
 sufficiently short time span. Simulating the process would help
 demonstrate if such an objection is sufficient to dismiss this hypothesis.
 Thus, we constructed an agent-based model of evolution of a single trait,
 a measure of human tolerance, in canines to test the merit of the time
 constraint objection. We tested scenarios both with and without mate
 preference to provide a potential sexual selective force. We used
 fecundity and mortality rates from the literature for validation.
 Hartigan's Dip Test for Unimodality was used to measure if and when
 divergence of populations occurred. Our results indicate that the
 proto-domestication hypothesis cannot be rejected on the basis of time
 constraints.
description: This dataset is entirely the result of synthetic, in-silico
 experiments. It was collected by running the provided Python code.
 Additional documentation is provided in this GitHub repository: david-elzinga/dog_evolution
description: # Rapid Evolution of Prehistoric Dogs from Wolves by Natural and Sexual
 Selection Emerges from an Agent-Based Model Here, we provide the necessary
 .py files to recreate the results found in the above-entitled manuscript.
 If you desire to load the data provided, it's recommended you use
 pandas 2.0.3 and python 3.10.13.  Nearly all .py files will require you
 have evolutuion_system.py file in the base directory. This .py file enacts
 the ABM as described in the manuscript. All other .py files should be
 placed in the same base directory.  You should construct a data folder and
 a figures folder in the base directory. In the data folder create an
 efast, prcc, and a monotonicity subfolder. These exists so you do not have
 to re-run the efast, prcc, or monotonicity simulations. In the figures
 folder create subfolders for default_distributions, distributions, efast,
 monotonicity, prcc, validation, and verification. Any figures generated
 will be produced in the corresponding figures sub-folder.  * To run a
 single realization of the model you can run single_run.py  * The results
 can be pickled and stored in the data folder (outside of a subfolder) for
 later plotting. Otherwise, if you want a rough graph from a single run
 directly, you can simply run plot_time_series.py  * To run several
 realizations of the model at the default parameter value you can run
 default_params.py * To perform the model verification (as described in the
 manuscript) you can run verify.py * To perform the model validation (as
 described in the manuscript) you can run validate.py * To perform the
 monotonicity check (as described in the manuscript) you can run
 monotonicity.py * When you run this file with the -m "generate"
 option it will create a master_df.pickle file in the data/monotonicity
 folder. This file serves as a record of all model realizations for the
 monotonicity check, their parameter values, and if speciation occurred,
 when it occurred, etc.  * The -m "parse" argument is used to
 scrub the master_df.pickle file for your data to be ready for plotting.  *
 To perform the LHS and PRCC sensitivity analysis (as described in the
 manuscript) you can run lhs_prcc.py * When you run this file with the -m
 "generate" option it will create a master_df.pickle file in the
 data/prcc folder. This file serves as a record of all model realizations
 for this type of sensitivity analysis, their parameter values, and if
 speciation occurred, when it occurred, etc.  * The -m "parse"
 argument is used to scrub the master_df.pickle file for your data to be
 ready for plotting.  * To perform the efast sensitivity analysis (as
 described in the manuscript) you can run efast.py * If you do not want to
 perform the simulations yourself, the master_df.pickle file is provided in
 the data/efast folder. This file serves as a record of all model
 realizations for this type of sensitivity analysis, their parameter
 values, and if speciation occurred, when it occurred, etc. If you re-run
 efast.py with the argument -m "generate" it will generate a new
 master_df.pickle file and begin running these samples through the model.
 If you need to interrupt your progress as these samples are running, you
 can simply continue with the generate option. * The -m "parse"
 argument is used to scrub the master_df.pickle file for your data to be
 ready for plotting.  * There are a number of .ipynb files names
 plot_something.py. These files simply plot the results provided in the
 manuscript.  All python scripts are readily available in this GitHub
 repository: [david-elzinga/dog_evolution. ](https://github.com/david-elzinga/dog_evolution/tree/main)The efast master_df.pickle file is provided in this repository on Dryad due to its stochasticity in reproduction.