Generation of the trait in a starting population
creating.trait(
  population,
  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,
  n.traits = 0,
  base.bv = NULL,
  new.residual.correlation = NULL,
  new.breeding.correlation = 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,
  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.traits = FALSE,
  remove.invalid.qtl = TRUE,
  randomSeed = NULL,
  verbose = TRUE,
  use.recalculate.manual = NULL,
  new.phenotype.correlation = NULL,
  shuffle.traits = NULL,
  shuffle.cor = NULL,
  bv.total = 0
)Population-list with one or more additional new traits
Population list
Name of the trait generated
Target mean
Target variance
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
Two Marker effects
Multi-marker effects
Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL)
Average genetic value of a trait
Correlation of the simulated enviromental variance
Correlation of the simulated genetic variance (child share! heritage is not influenced!
Vector coding if a trait is caused by a maternal effect (Default: all FALSE)
Vector coding if a trait is caused by a paternal effect (Default: all FALSE)
Matrix containing fixed effects (p x k -matrix with p being the number of traits and k being number of fixed effects; default: p x 1 matrix with 0s (additional intercept))
Vector providing information for which pools QTLs of this 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)
Set to TRUE to always assign the heterozygous variant with the higher of the two homozygous effects (e.g. hybrid breeding); default: FALSE
Marker were no QTL are simulated on
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()
If TRUE delete the simulated traits added before
Set to FALSE to deactive the automatic removal of QTLs on markers that do not exist
Set random seed of the process
Set to FALSE to not display any prints
Set to TRUE to use recalculate.manual to calculate genomic values (all individuals and traits jointly, default: FALSE)
(OLD! - use new.residual.correlation) Correlation of the simulated enviromental variance
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 trait.cor - Target Correlation between traits
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)
population <- creating.trait(population, n.additive=100)
Run the code above in your browser using DataLab