Generation of the starting population
creating.diploid(
  population = NULL,
  nsnp = 0,
  nindi = 0,
  nqtl = 0,
  name.cohort = NULL,
  generation = 1,
  founder.pool = 1,
  one.sex.mode = FALSE,
  database.sex.mode = FALSE,
  sex.s = "fixed",
  sex.quota = 0.5,
  class = 0L,
  verbose = TRUE,
  map = NULL,
  chr.nr = NULL,
  chromosome.length = NULL,
  bp = NULL,
  snps.equidistant = NULL,
  template.chip = NULL,
  snp.position = NULL,
  change.order = TRUE,
  add.chromosome = FALSE,
  bpcm.conversion = 0,
  snp.name = NULL,
  hom0 = NULL,
  hom1 = NULL,
  dataset = NULL,
  freq = "beta",
  beta.shape1 = 1,
  beta.shape2 = 1,
  share.genotyped = 0,
  genotyped.s = NULL,
  vcf = NULL,
  vcf.maxsnp = Inf,
  vcf.maxindi = Inf,
  vcf.chromosomes = NULL,
  vcf.VA = TRUE,
  trait.name = NULL,
  mean.target = NULL,
  var.target = NULL,
  qtl.position.shared = FALSE,
  trait.cor = NULL,
  trait.cor.include = NULL,
  n.additive = 0,
  n.equal.additive = 0,
  n.dominant = 0,
  n.equal.dominant = 0,
  n.overdominant = 0,
  n.equal.overdominant = 0,
  n.qualitative = 0,
  n.quantitative = 0,
  effect.distribution = "gauss",
  gamma.shape1 = 1,
  gamma.shape2 = 1,
  real.bv.add = NULL,
  real.bv.mult = NULL,
  real.bv.dice = NULL,
  new.residual.correlation = NULL,
  new.breeding.correlation = NULL,
  litter.effect.covariance = NULL,
  pen.effect.covariance = NULL,
  is.maternal = NULL,
  is.paternal = NULL,
  fixed.effects = NULL,
  trait.pool = 0,
  gxe.correlation = NULL,
  n.locations = NULL,
  gxe.max = 0.85,
  gxe.min = 0.7,
  location.name = NULL,
  gxe.combine = TRUE,
  n.traits = 0,
  base.bv = NULL,
  dominant.only.positive = FALSE,
  exclude.snps = NULL,
  var.additive.l = NULL,
  var.dominant.l = NULL,
  var.overdominant.l = NULL,
  var.qualitative.l = NULL,
  var.quantitative.l = NULL,
  effect.size.equal.add = 1,
  effect.size.equal.dom = 1,
  effect.size.equal.over = 1,
  polygenic.variance = 100,
  bve.mult.factor = NULL,
  bve.poly.factor = NULL,
  set.zero = FALSE,
  bv.standard = FALSE,
  replace.real.bv = FALSE,
  bv.ignore.traits = NULL,
  remove.invalid.qtl = TRUE,
  randomSeed = NULL,
  add.architecture = NULL,
  time.point = 0,
  creating.type = 0,
  size.scaling = 1,
  progress.bar = TRUE,
  miraculix = TRUE,
  miraculix.dataset = TRUE,
  add.chromosome.ends = TRUE,
  use.recalculate.manual = FALSE,
  store.comp.times = TRUE,
  skip.rest = FALSE,
  enter.bv = TRUE,
  internal = FALSE,
  internal.geno = TRUE,
  internal.dataset = NULL,
  nbits = 30,
  bit.storing = FALSE,
  new.phenotype.correlation = NULL,
  length.before = 5,
  length.behind = 5,
  position.scaling = FALSE,
  shuffle.cor = NULL,
  shuffle.traits = NULL,
  bv.total = 0
)Population-list
Population list
Number of markers to generate (Split equally across chromosomes (chr.nr) unless vector is used)
Number of individuals to generate (you can also provide number males / females in a vector)
Number of QTLs to generate (this will be a subset of the generated SNPs; default: NULL; all SNPs are potential QTLs)
Name of the newly added cohort
Generation to which newly individuals are added (default: 1)
Founder pool an individual is assign to (default: 1)
Activating this will ignore all sex specific parameters and handle each individual as part of the first sex (default: FALSE)
Set TRUE to automatically remove females in selection.m and remove males in selection.f
Specify which newly added individuals are male (1) or female (2)
Share of newly added female individuals (deterministic if sex.s="fixed", alt: sex.s="random")
Migration level of the newly added individuals (default: 0)
Set to FALSE to not display any prints
map-file that contains up to 5 colums (chromosome, SNP-id, M-position, Bp-position, allele freq - Everything not provides it set to NA). A map can be imported via MoBPSmaps::ensembl.map()
Number of chromosomes (SNPs are equally split) or vector containing the associated chromosome for each marker
Length of the newly added chromosome in Morgan; can be a vector when generating multiple chromosomes (default: 5)
Vector containing the physical position (bp) for each marker (default: 1,2,3...)
Use equidistant markers (computationally faster! ; default: TRUE)
Import genetic map and chip from a species ("cattle", "chicken", "pig")
Location of each marker on the genetic map
Markers are automatically sorted according to their snp.position unless this is set to FALSE (default: TRUE)
If TRUE add an additional chromosome to the population
Convert physical position (bp) into a cM position (default: 0 - not done)
Vector containing the name of each marker (default ChrXSNPY - XY chosen accordingly)
Vector containing the first allelic variant in each marker (default: 0)
Vector containing the second allelic variant in each marker (default: 1)
SNP dataset, use "random", "allhetero" "all0" when generating a dataset via nsnp,nindi
frequency of allele 1 when randomly generating a dataset (default: "beta" with parameters beta.shape1, beta.shape2; Use "same" when generating additional individuals and using the same allele frequencies)
First parameter of the beta distribution for simulating allele frequencies
Second parameter of the beta distribution for simulating allele frequencies
Share of individuals genotyped in the founders
Specify with newly added individuals are genotyped (1) or not (0)
Path to a vcf-file used as input genotypes (correct haplotype phase is assumed!)
Maximum number of SNPs to include in the genotype file (default: Inf)
Maximum number of individuals to include in the genotype file (default: Inf)
Vector of chromosomes to import from vcf. Use on bgziped and tabixed vcf only. (default: NULL - all chromosomes)
Use the VariantAnnotation package to load in a vcf file when available (default: TRUE)
Name of the traits generated
Target mean for each trait
Target variance for each trait
Set to TRUE to put QTL effects on the same markers for different traits
Target correlation between QTL-based traits (underlying true genomic values)
Vector of traits to be included in the modelling of correlated traits (default: all - needs to match with trait.cor)
Number of additive QTL with effect size drawn from a gaussian distribution
Number of additive QTL with equal effect size (effect.size)
Number of dominant QTL with effect size drawn from a gaussian distribution
Number of dominant QTL with equal effect size
Number of overdominant QTL with effect size drawn from absolute value of a gaussian distribution
Number of overdominant QTL with equal effect size
Number of qualitative epistatic QTL
Number of quantitative epistatic QTL
Set to "gamma" for gamma distribution effects with gamma.shape1, gamma.shape2 instead of gaussian (default: "gauss")
Default: 1
Default: 1
Single Marker effects (list for each trait with columns for: SNP Nr, Chr Nr, Effect 00, Effect 01, Effect 11, Position (optional), Founder pool genotype (optional), Founder pool origin (optional))
Two Marker effects
Multi-marker effects
Correlation of the simulated enviromental variance
Correlation of the simulated genetic variance (child share! heritage is not influenced!
Covariance matrix of the litter effect (default: no effects)
Covariance matrix of the pen effect (default: no effects)
Vector coding if a trait is caused by a maternal effect (Default: FALSE)
Vector coding if a trait is caused by a paternal effect (Default: FALSE)
Matrix containing fixed effects (p x k -matrix with p being the number of traits and k being number of fixed effects; default: not fixed effects (NULL))
Vector providing information for which pools QTLs of which trait are activ (default: 0 - all pools)
Correlation matrix between locations / environments (default: only one location, sampled from gxe.max / gxe.min)
Number of locations / environments to consider for the GxE model
Maximum correlation between locations / environments when generating correlation matrix via sampling (default: 0.85)
Minimum correlation between locations / environments when generating correlation matrix via sampling (default: 0.70)
Same of the different locations / environments used
Set to FALSE to not view the same trait from different locations / environments as the sample trait in the prediction model (default: TRUE)
Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL)
Intercept of underlying true genomic values (excluding all QTL effects, default: 100)
Set to TRUE to always assign the heterozygous variant with the higher of the two homozygous effects (e.g. hybrid breeding); default: FALSE
Vector contain markers on which no QTL effects are placed
Variance of additive QTL
Variance of dominante QTL
Variance of overdominante QTL
Variance of qualitative epistatic QTL
Variance of quantitative epistatic QTL
Effect size of the QTLs in n.equal.additive
Effect size of the QTLs in n.equal.dominant
Effect size of the QTLs in n.equal.overdominant
Genetic variance of traits with no underlying QTL
Multiplicate trait value times this
Potency trait value over this
Set to TRUE to have no effect on the 0 genotype (or 00 for QTLs with 2 underlying SNPs)
Set TRUE to standardize trait mean and variance via bv.standardization() - automatically set to TRUE when mean/var.target are used
If TRUE delete the simulated traits added before
Vector of traits to ignore in the calculation of the genomic value (default: NULL; Only recommended for high number of traits and experienced users!)
Set to FALSE to deactive the automatic removal of QTLs on markers that do not exist
Set random seed of the process
Add genetic architecture (marker positions)
Time point at which the new individuals are generated
Technique to generate new individuals (usage in web-based application)
Set to value to scale all input for breeding.size / selection.size (This will not work for all breeding programs / less general than json.simulation)
Set to FALSE to not use progress bars in any application of breeding.diploid() downstream (Keep log-files lean!)
If TRUE use miraculix package for data storage, computations and dataset generation
Set FALSE to deactivate miraculix package for dataset generation
Add chromosome ends as recombination points
Set to TRUE to use recalculate.manual to calculate genomic values (all individuals and traits jointly, default: FALSE)
Set to FALSE to not store computing times needed to execute creating.diploid in $info$comp.times.creating
Internal variable needed when adding multiple chromosomes jointly
Internal parameter
Do not touch!
Do not touch!
Do not touch!
Bits available in MoBPS-bit-storing
Set to TRUE if the MoBPS (not-miraculix! bit-storing is used)
(OLD! - use new.residual.correlation) Correlation of the simulated enviromental variance
Length before the first SNP of the dataset (default: 5)
Length after the last SNP of the dataset (default: 5)
Manual scaling of snp.position
OLD! Use trait.cor - Target Correlation between traits
OLD! Use trait.cor.include - Vector of traits to be included for modelling of correlated traits (default: all - needs to match with shuffle.cor)
OLD! Use n.traits instead. Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL)
population <- creating.diploid(nsnp=1000, nindi=100)
Run the code above in your browser using DataLab