Function to simulate and add additional diverse material to a population
add.diversity(
  population,
  breeding.size = 100,
  selection.rate = 0.5,
  pool.gen = NULL,
  pool.database = NULL,
  pool.cohorts = NULL,
  target.gen = NULL,
  target.database = NULL,
  target.cohorts = NULL,
  target.value = NULL,
  reduction.multiplier = 5,
  name.cohort = NULL,
  sex.quota = NULL,
  add.gen = 1,
  target.direction = NULL,
  verbose = TRUE,
  store.comp.times = TRUE,
  use.recalculate.manual = FALSE,
  pop1 = NULL,
  export.pop1 = FALSE
)population list with newly added individuals
Population list
Number of individuals to generate (default: 100)
Proportion of individuals to select in each breeding cycle (default: 0.5)
Generations of individuals to consider as founder pool to start from (default: NULL)
Groups of individuals to consider as founder pool to start from (default: NULL)
Cohorts of individuals to consider as founder pool to start from (default: NULL)
Generations of individuals to consider to calculate target genomic value to get to (default: NULL)
Groups of individuals to consider to calculate target genomic value to get to (default: NULL)
Cohorts of individuals to consider to calculate target genomic value to get to (default: NULL)
Target genomic value to get (default: NULL - calculated based on target.gen/database/cohorts)
Traits that already exceed the target are bred against. Weighting is scaled by this factor.
Name of the newly added cohort
Share of newly added female individuals (default: 0.5)
Generation you want to add the new individuals to (default: 1)
Manual select with traits are supposed to increase / decrease (1 target high, -1 target low)
Set to FALSE to not display any prints
If TRUE store computation times in $info$comp.times.general (default: TRUE)
Set to TRUE to use recalculate.manual to calculate genomic values (all individuals and traits jointly, default: FALSE)
Population to start with as founder pool (default: NULL - generation from pool.gen/database/cohorts)
Default: FALSE. Exporting this is helpful if add.diversity is used frequently to avoid initializing this multiple times
data(ex_pop)
population <- add.diversity(ex_pop, pool.gen  = 1, target.gen = 5)
Run the code above in your browser using DataLab