gs: Simulate selection and population growth

View source: R/gs.R

gsR Documentation

Simulate selection and population growth

Description

Simulate selection and population growth

Usage

gs(
  genotypes,
  meta,
  phenotypes = NULL,
  BVs = NULL,
  h,
  gens,
  chr.length,
  growth.function = function(n) logistic_growth(n, 500, 2),
  survival.function = function(phenotypes, opt_pheno, ...) BL_survival(phenotypes,
    opt_pheno, omega = 1),
  selection.shift.function = function(opt, iv) optimum_constant_slide(opt, iv, 0.3),
  rec.dist = function(n) rpois(n, lambda = 1),
  var.theta = 0,
  plot_during_progress = FALSE,
  facet = "group",
  do.sexes = TRUE,
  init = FALSE,
  verbose = FALSE,
  print.all.freqs = F,
  model = NULL,
  K_thin_post_surv = NULL
)

Arguments

genotypes

unphased matrix of genotypes, one row per snp and one column per chromosome/gene copy. Copies from individuals must be sequential.

meta

data.frame of snp metadata, with the first column containing chromosome info, the second containing position in base pairs, and the third, named "effects" optionally containing effect sizes.

chr.length

numeric vector of chromosome lengths in the same order as would be given by unique(meta[,1]).


hemstrow/GeneArchEst documentation built on June 10, 2025, 5:06 a.m.