Evolution of daily temporal niches model
收藏资源简介:
## OverviewThis dataset contain the code and data necessary to simulate a stochastic, individual-based birth-and-death process (e.g. Méléard, 2016; Otto and Day, 2011), to study the evolution of daily periods of sexual activity timings within species, and its potential effect on population divergence and speciation.This dataset contains the data and code required to replicate analyses. ## How to Use This code is made to be run using the multiprocessing feature. A linux build is recommended, or a cluster as it is ressource intensive. To test the effet of one parameter, you must comment it at the start of the script, and modify the parameter later as explained at the start of the script. This code will return text based results, made to be outputted by a cluster. The results will only be displayed on the console if run locally ! ## Layout The repository is split into 4 directories : Python Code, R code, Data, and Supplementary Data ### **`Python Code`** All code to reproduce the simulation of the manuscript * **`Daily_niche_model.py`**: Base simulation code, evolution of the activity timing on the same trait for males and females, emergence timing fixed. * **`Independant_MF_evolution.py`**: Considers that male and female activity timing traits are independant and evolve separately. * **`Coevo_Emergence.py`**: Considers that the emergence timing trait can also evolve along the activity timing trait, although independently. ### **`Data`** All raw data collected from simulation, necessary to output the graphs of the main manuscript. The main file are "Data.xlsx" and "LD_values.xlsx", but a ziped file "Data_csv.zip" containing all the sheets as csv files can also be found here.Here is a description of each sheet: * **`Emergence_NG`**: Emergence: emergence timing tested; Percentage: percentage of simulations displaying this type of sub-population; Type: type of sub-population detected; sd: standard deviation of the percentage. * **`Var_Emerg_NG`**: ve: variance in the emergence timing tested; Percentage: percentage of simulations displaying this type of sub-population; Type: type of sub-population detected. * **`Competition_Females`**: p: maximum number of mating events per female; bimodality: percentage of simulation displaying bimodal activity timings; sd: standard deviation of the percentage. * **`G_Fst`**: G: incompatibility threshold value tested; Fst_G: Fst value measured; Fst_sd: standard deviation of the Fst; Early_popsize: delayed-dawn sub-population size measured; early_sd: delayed-dawn sub-population size standard deviation; Late_popsize: immediate sub-population size measured; late_sd: immediate sub-population size standard deviation * **`Competition_Bimodal`**: dltc: male-male competition value tested; Percentage: percentage of simulation displaying bimodal activity timings; sd: standard deviation of the percentage. * **`Competition_Fst`**: dltc: male-male competition value tested; Fst_dltc: mean Fst measured; sd: standard deviation of the mean Fst. * **`LD_values`**: G: incompatibility threshold value tested; LD_neutral_together_raw: record of all linkage disequilibrium values between ecologically neutral loci; LD_timing_together_raw: record of all linkage disequilibrium values between activity timing loci; LD_timing_neutral_together_raw: record of all linkage disequilibrium values between activity timing loci and ecologically neutral loci. ### **`Supplementary Data`** All raw supplementary data collected from simulation, necessary to output the graphs of the Supplementary Material. The main file is "Supplementary_data.xlsx", but a ziped file "Supplementary_data_csv.zip" containing all the sheets as csv file can also be found here.Here is a description of each sheet: * **`Uni_vs_Bimodal`**: E: emergence timing tested; Uni: percentage of simulations displaying unimodal activity timing trait distribution; uni_sd: standard deviation of the percentage of unimodel distributions; Bi_Late: percentage of immediate subpopulations in simulations displaying bimodal activity timing trait distribution; sd_late: standard deviation the percentage of immediate subpopulations in simulations displaying bimodal activity timing trait distribution; Bi_Early: percentage of delayed-dawn subpopulations in simulations displaying bimodal activity timing trait distribution; sd_late: standard deviation the percentage of delayed-dawn subpopulations in simulations displaying bimodal activity timing trait distribution. * **`MF_inde`**: G: : incompatibility threshold value tested; bimo: percentage of simulation displaying bimodal activity timings; sd: standard deviation of the percentage. * **`G_histogram`**: G: : incompatibility threshold value tested; BM_G: percentage of simulation displaying bimodal activity timings; sd: standard deviation of the percentage; * **`Base_G`**: G: incompatibility threshold value tested; Extinction: Percentage of simulations where populations went extinct; Type: type of sub-population detected; Percentage: percentage of simulations displaying this type of sub-population; sd_percent: standard deviation of the percentage; Fst: mean Fst measured; sd_fst: standard deviation of the mean Fst; distance_peaks: average distance between peaks in the activity timing trait distribution; sd_dist: standard deviation of the distance between peaks in the activity timing trait distribution; width_peaks: average width of peaks in the activity timing trait distribution; sd_width: standard deviation of the width of peaks in the activity timing trait distribution; peak_type: "double" if the distribution is bimodal, "single" if unimodal; Average_divergence: average time before the first divergence into two sub-populations is detected; sd_divergence: standard deviation of the time before the first divergence into two sub-populations is detected * **`Sex_G`**: G: incompatibility threshold value tested; Percentage: percentage of simulations displaying this type of sub-population; Type: type of sub-population detected; std_percent: standard deviation of the percentage; width: average width of peaks in the activity timing trait distribution; sd_w: standard deviation of the width of peaks in the activity timing trait distribution; width_type: "bimo" if the distribution is bimodal, "solo" if unimodal; peaks: average time of day where a peak in the activity timing trait was detected; std_peaks: standard deviation of the average time of day where a peak was detected; peak_type: "first" for a delayed-dawn peak, "second" for an immediate peak; peaks_dist: average distance between peaks; p_std: standard deviation of the distance between peaks. * **`G_Coexistence`**: G: incompatibility threshold value tested; Elength: coexistence time between sub-populations; sd: standard deviation of the coexistence time; number_coex: average number of distinct coexistence over 2000 days; sd_nb: standard deviation of the number of distinct coexistence events. * **`Competition_Coexistence`**: dltc: male-male competition value tested; Elength: coexistence time between sub-populations; sd: standard deviation of the coexistence time. * **`Coevolution`**: G: incompatibility threshold value tested; Bimo: percentage of simulations displaying this type of sub-population; sd: standard deviation of the percentage; peak_type: "early" for a delayed-dawn sub-population, "late" for an immediate sub-population; pos_peaks: average time of day of the activity timing peak; sd_pos: standard deviation of the time of day of the activity timing peak; emerg_pos: average time of day of the emergence timing peak; sd_emerg: standard deviation of the time of day of the emergence timing peak; * **`Effect_size`**: Effect_size: Mutational effect size for the activity timing trait; bimo: percentage of simulations displaying bimodal distribution of the activity timing trait; sd: standard deviation of the percentage; ratio_male: ratio between male dawn-shifted and immediate population sizes; sd_male: standard deviation of the ratio. * **`Competition_Variance`**: dltc: male-male competition value tested; variance_single: average variance of activity timing distribution; std_single: standard deviation of the measured variance; width_single: average measured width of the activity timing distribution; std_w_single: standard deviation of the measured width. * **`Width_activity`**: wa: activity timing window tested; Type: type of sub-population detected; Percentage: percentage of simulations displaying this type of sub-population; std_percent: standard deviation of the percentage; wa_width: activity timing window tested; width: average width of activity timing peaks; sd: standard deviation of the measured width; width_type: "bimo" if the distribution is bimodal, "solo" if unimodal. ### **` R code`** R code necessary to reproduce the figures of the main manuscript ("Main_figures.R"), and Supplementary Material ("Supplementary_figures.R").
## 概述 本数据集包含用于模拟随机个体性出生-死亡过程(如Méléard, 2016;Otto与Day, 2011)的代码与数据,用以研究物种内每日性活动时段的演化规律,及其对种群分化与物种形成的潜在影响。本数据集包含可复现全部分析所需的数据与代码。 ## 使用方法 本代码依托多进程功能运行,因资源占用较高,推荐使用Linux环境或计算集群进行部署。若需测试单一参数的影响,需在脚本起始处注释该参数,并按照脚本开头的说明修改对应参数值。本代码将生成基于文本的输出结果,适配集群运行场景;若本地运行,则结果仅会显示于控制台。 ## 数据集布局 本仓库分为4个目录:Python代码、R代码、原始数据与补充数据。 ### **`Python Code`** 用于复现论文中仿真实验的全部代码。 - **`Daily_niche_model.py`**:基础仿真代码,实现雌雄个体共享同一活动节律性状的演化,且个体出现时间固定。 - **`Independant_MF_evolution.py`**:假设雌雄个体的活动节律性状相互独立,并分别进行演化。 - **`Coevo_Emergence.py`**:假设个体的出现时间性状可与活动节律性状共同演化,但二者相互独立。 ### **`Data`** 存储所有仿真生成的原始数据,用于复现主论文中的全部图表。核心文件为`Data.xlsx`与`LD_values.xlsx`,同时提供压缩文件`Data_csv.zip`,内含所有工作表对应的CSV格式文件。各工作表说明如下: - **`Emergence_NG`**:Emergence:测试的个体出现时间;Percentage:呈现该类亚种群的仿真占比;Type:检测到的亚种群类型;sd:占比的标准差。 - **`Var_Emerg_NG`**:ve:测试的出现时间方差;Percentage:呈现该类亚种群的仿真占比;Type:检测到的亚种群类型。 - **`Competition_Females`**:p:每只雌性的最大交配事件数;bimodality:呈现双峰活动时段分布的仿真占比;sd:占比的标准差。 - **`G_Fst`**:G:测试的生殖不相容阈值;Fst_G:测得的群体分化系数(Fst)值;Fst_sd:Fst值的标准差;Early_popsize:测得的延迟黎明亚种群规模;early_sd:延迟黎明亚种群规模的标准差;Late_popsize:测得的即时亚种群规模;late_sd:即时亚种群规模的标准差。 - **`Competition_Bimodal`**:dltc:测试的雄性间竞争强度值;Percentage:呈现双峰活动时段分布的仿真占比;sd:占比的标准差。 - **`Competition_Fst`**:dltc:测试的雄性间竞争强度值;Fst_dltc:测得的平均Fst值;sd:平均Fst值的标准差。 - **`LD_values`**:G:测试的生殖不相容阈值;LD_neutral_together_raw:生态中性位点间所有连锁不平衡(linkage disequilibrium)值的原始记录;LD_timing_together_raw:活动节律位点间所有连锁不平衡值的原始记录;LD_timing_neutral_together_raw:活动节律位点与生态中性位点间所有连锁不平衡值的原始记录。 ### **`Supplementary Data`** 存储所有仿真生成的补充原始数据,用于复现补充材料中的全部图表。核心文件为`Supplementary_data.xlsx`,同时提供压缩文件`Supplementary_data_csv.zip`,内含所有工作表对应的CSV格式文件。各工作表说明如下: - **`Uni_vs_Bimodal`**:E:测试的个体出现时间;Uni:呈现单峰活动节律性状分布的仿真占比;uni_sd:单峰分布占比的标准差;Bi_Late:呈现双峰活动节律性状分布的仿真中,即时亚种群的占比;sd_late:即时亚种群占比的标准差;Bi_Early:呈现双峰活动节律性状分布的仿真中,延迟黎明亚种群的占比;sd_late:延迟黎明亚种群占比的标准差(注:原文此处存在笔误,应为sd_early)。 - **`MF_inde`**:G:测试的生殖不相容阈值;bimo:呈现双峰活动时段分布的仿真占比;sd:占比的标准差。 - **`G_histogram`**:G:测试的生殖不相容阈值;BM_G:呈现双峰活动时段分布的仿真占比;sd:占比的标准差。 - **`Base_G`**:G:测试的生殖不相容阈值;Extinction:种群灭绝的仿真占比;Type:检测到的亚种群类型;Percentage:呈现该类亚种群的仿真占比;sd_percent:占比的标准差;Fst:测得的平均Fst值;sd_fst:平均Fst值的标准差;distance_peaks:活动节律性状分布中峰间的平均距离;sd_dist:峰间平均距离的标准差;width_peaks:活动节律性状分布中峰的平均宽度;sd_width:峰平均宽度的标准差;peak_type:若分布为双峰则记为`double`,单峰则记为`single`;Average_divergence:首次检测到种群分化为两个亚种群的平均时间;sd_divergence:首次检测到种群分化的平均时间的标准差。 - **`Sex_G`**:G:测试的生殖不相容阈值;Percentage:呈现该类亚种群的仿真占比;Type:检测到的亚种群类型;std_percent:占比的标准差;width:活动节律性状分布中峰的平均宽度;sd_w:峰平均宽度的标准差;width_type:若分布为双峰则记为`bimo`,单峰则记为`solo`;peaks:检测到活动节律性状峰值的平均时刻;std_peaks:峰值平均时刻的标准差;peak_type:若为延迟黎明峰值则记为`first`,即时峰值则记为`second`;peaks_dist:峰间的平均距离;p_std:峰间平均距离的标准差。 - **`G_Coexistence`**:G:测试的生殖不相容阈值;Elength:亚种群间的共存时间;sd:共存时间的标准差;number_coex:2000天内检测到的不同共存事件的平均数量;sd_nb:共存事件平均数量的标准差。 - **`Competition_Coexistence`**:dltc:测试的雄性间竞争强度值;Elength:亚种群间的共存时间;sd:共存时间的标准差。 - **`Coevolution`**:G:测试的生殖不相容阈值;Bimo:呈现该类亚种群的仿真占比;sd:占比的标准差;peak_type:若为延迟黎明亚种群则记为`early`,即时亚种群则记为`late`;pos_peaks:活动节律峰值的平均时刻;sd_pos:活动节律峰值平均时刻的标准差;emerg_pos:出现时间峰值的平均时刻;sd_emerg:出现时间峰值平均时刻的标准差。 - **`Effect_size`**:Effect_size:活动节律性状的突变效应大小;bimo:呈现双峰活动节律性状分布的仿真占比;sd:占比的标准差;ratio_male:雄性黎明偏移种群与即时种群的规模比;sd_male:该规模比的标准差。 - **`Competition_Variance`**:dltc:测试的雄性间竞争强度值;variance_single:活动节律分布的平均方差;std_single:测得方差的标准差;width_single:活动节律分布的平均测得宽度;std_w_single:测得宽度的标准差。 - **`Width_activity`**:wa:测试的活动时段窗口;Type:检测到的亚种群类型;Percentage:呈现该类亚种群的仿真占比;std_percent:占比的标准差;wa_width:测试的活动时段窗口;width:活动节律峰的平均宽度;sd:测得宽度的标准差;width_type:若分布为双峰则记为`bimo`,单峰则记为`solo`。 ### **`R Code`** 包含复现主论文图表所需的R代码(`Main_figures.R`),以及补充材料图表所需的R代码(`Supplementary_figures.R`)。



