Skip to content

Kokkonut-case/Akilan_Reproductive_Interference_Evolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\"Revised Equations\" subfolder contains the latest code required for running the simulation. All other folders can be ignored\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defeault Simulation (Only male evolution; simple)\n",
    "\n",
    "\n",
    "1. Parameter_class - Produces a \"parameters\" object that contains birth rates, competetion coefficients, initial population numbers, discrimination trait values, num of generations, etc\n",
    "\n",
    "2. Base_parameters:  The default values are set here. i.e. Base_parameters is an instance of the parameters class with user-defined default values\n",
    "\n",
    "(The first section of the notebook contains the base values.         \n",
    "    \n",
    "The second section is \"Parameters_for_Analysis\". This class takes the Base_Parameters as input, but allows the parameters to be overriden if specified. This allows you to create parameter_objects that have base_paraemters, but differ only by one or two values\n",
    ")\n",
    "\n",
    "2. Simulation_class - Takes parameters instance as an argument and runs the simulation. The population numbers and trait values are updated each generation. Returns lists containing the population number and trait values for both species at each time step \n",
    "\n",
    "4. Outcome_stats_and_plots: This is where the results of the simulation are analyzed and plotted. It returns the outcome stats: which species excluded the other, the final population numbers, the final trait values,  number of generations until either sp. went extinct etc. It also plots the population dynamics and trait change over time\n",
    "\n",
    "#### How to use?\n",
    "\n",
    "1. For a single test case: Go to the test_simulation notebook. Modify one or more parameters in the \"test_paramters\" definition (2nd cell of the same notebook), if needed. Run each of the cells to display the simulation outcome. Do NOT change the \"base_parameters.ipynb notebook\"\n",
    "\n",
    "2. \"generating_parameter_combinations_excel\" produces the csv file where a large number of parameters are varied simulatenously. Change the \"parameters_varied\" dictionary definition if needed. Delete older xlsx files to avoid conflicts\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Stable and Unstable Dynamics and Heatmaps\n",
    "\n",
    "### Unstable Ecological Competetion\n",
    "\n",
    "1. Base Parameters are defined such that interspecfic competetion is highter than intraspecfic competetion. alpha12, alpha21 > alpha11, alpha22. This leads to unstable ecological dynamics.\n",
    "\n",
    "### Stable Ecological Competetion\n",
    "\n",
    "1. Base Parameters are defined such that interspecfic competetion is lower than intraspecfic competetion. alpha12, alpha21 < alpha11, alpha22. This leads to stable ecological dynamics.\n",
    "\n",
    "Both of these have heatmpas across various conditions 1) initial population size vs evolvability 2) initia discrimination vs evolvability, interspecfic competetion trait vs evolvability, etc\n",
    "\n",
    "#### How to use?\n",
    "\n",
    "1. Go to the folder Unstable_Ecological_Competion (or Stable_Ecological_Competion). Navigate to the abc_vs_evolvability_heatmap.ipynb to produce the heatmaps. If needed, temporarily modify the base_parameters in base_parameters_unstable.ipynb (or base_parameters_unstable.ipynb), re-run to observe the new heatmaps. Please change the parameters back to their original state)\n",
    "\n",
    "(Remember this is the base_parameters WITHIN the Unstable_Ecological_Competion/Stable_Ecological_Competion folder, do NOT change the base_parameters outside). "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Female Evolution\n",
    "\n",
    "Extension of the simulation that allows the female resistance trait to evolve. For generality, it is assumed that different loci are responsible for discrimination/resistance trait\n",
    "\n",
    "\n",
    "#### How to use?\n",
    "\n",
    "As earlier, go to the \"female_evolution_folder\", modify the test simulation results."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##How to use?\n",
    "\n",
    "1. To change the parameters - go to \"test_parameters.ipynb\", and re-run test_simulation.ipynb to record the entire outcome\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

About

Reproductive Interference Project - Akilan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published