given region coordinates (locus), the function extracts genotypes for all loci in that region, constructs genotypes matrix G (applies imputation and fixes allele encoding) and computes maf per marker.

sim_y_in_regions(
  regions,
  vcf_file,
  n_markers,
  get_betas_fun = rnorm_betas,
  get_betas_args = list(mean = 0, sd = 1),
  rare = T,
  frac_negative = 0,
  thr = 0.01,
  force_silent = T,
  seed = 42,
  e_mean = 0,
  e_sd = 1,
  GP_map = c(0, 1, 2)
)

Arguments

regions

list of regions to use.

vcf_file

character, path to vcf file containing genotypes.

n_markers

integer, number of markers to use in the simulation (see [get_effects()]).

get_betas_fun

see [get_effects()].

get_betas_args

see [get_effects()].

rare

see [get_effects()].

frac_negative

see [get_effects()].

thr

see get_effects.

force_silent

logical, if `TRUE` seqminer verbosity will be silenced (may cause some issues on non-*nix machines).

seed

see get_effects.

e_mean

numeric, mean error.

e_sd

numeric, error std. dev.

GP_map

vector of genotype-phenotype map values for `AA`, `aA` and `aa` respectively.

Value

list with genotypes matrix and maf vector

Author

Marcin Kierczak marcin.kierczak@scilifelab.se