creating.diploid: Generation of the starting population

Description Usage Arguments Value Examples

View source: R/creating.diploid.R

Description

Generation of the starting population

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
creating.diploid(
  dataset = NULL,
  vcf = NULL,
  chr.nr = NULL,
  bp = NULL,
  snp.name = NULL,
  hom0 = NULL,
  hom1 = NULL,
  bpcm.conversion = 0,
  nsnp = 0,
  nindi = 0,
  freq = "beta",
  population = NULL,
  sex.s = "fixed",
  add.chromosome = FALSE,
  generation = 1,
  class = 0L,
  sex.quota = 0.5,
  chromosome.length = NULL,
  length.before = 5,
  length.behind = 5,
  real.bv.add = NULL,
  real.bv.mult = NULL,
  real.bv.dice = NULL,
  snps.equidistant = NULL,
  change.order = FALSE,
  bv.total = 0,
  polygenic.variance = 100,
  bve.mult.factor = NULL,
  bve.poly.factor = NULL,
  base.bv = NULL,
  add.chromosome.ends = TRUE,
  new.phenotype.correlation = NULL,
  new.residual.correlation = NULL,
  new.breeding.correlation = NULL,
  add.architecture = NULL,
  snp.position = NULL,
  position.scaling = FALSE,
  bit.storing = FALSE,
  nbits = 30,
  randomSeed = NULL,
  miraculix = TRUE,
  miraculix.dataset = TRUE,
  n.additive = 0,
  n.equal.additive = 0,
  n.dominant = 0,
  n.equal.dominant = 0,
  n.qualitative = 0,
  n.quantitative = 0,
  dominant.only.positive = FALSE,
  var.additive.l = NULL,
  var.dominant.l = NULL,
  var.qualitative.l = NULL,
  var.quantitative.l = NULL,
  effect.size.equal.add = 1,
  effect.size.equal.dom = 1,
  exclude.snps = NULL,
  replace.real.bv = FALSE,
  shuffle.traits = NULL,
  shuffle.cor = NULL,
  skip.rest = FALSE,
  enter.bv = TRUE,
  name.cohort = NULL,
  template.chip = NULL,
  beta.shape1 = 1,
  beta.shape2 = 1,
  time.point = 0,
  creating.type = 0,
  trait.name = NULL,
  share.genotyped = 1,
  genotyped.s = NULL,
  map = NULL,
  remove.invalid.qtl = TRUE,
  verbose = TRUE,
  bv.standard = FALSE,
  mean.target = NULL,
  var.target = NULL,
  is.maternal = NULL,
  is.paternal = NULL,
  vcf.maxsnp = Inf,
  internal = FALSE
)

Arguments

dataset

SNP dataset, use "random", "allhetero" "all0" when generating a dataset via nsnp,nindi

vcf

Path to a vcf-file used as input genotypes (correct haplotype phase is assumed!)

chr.nr

Vector containing the assosiated chromosome for each marker (default: all on the same)

bp

Vector containing the physical position (bp) for each marker (default: 1,2,3...)

snp.name

Vector containing the name of each marker (default ChrXSNPY - XY chosen accordingly)

hom0

Vector containing the first allelic variant in each marker (default: 0)

hom1

Vector containing the second allelic variant in each marker (default: 1)

bpcm.conversion

Convert physical position (bp) into a cM position (default: 0 - not done)

nsnp

number of markers to generate in a random dataset

nindi

number of inidividuals to generate in a random dataset

freq

frequency of allele 1 when randomly generating a dataset

population

Population list

sex.s

Specify which newly added individuals are male (1) or female (2)

add.chromosome

If TRUE add an additional chromosome to the dataset

generation

Generation of the newly added individuals (default: 1)

class

Migration level of the newly added individuals

sex.quota

Share of newly added female individuals (deterministic if sex.s="fixed", alt: sex.s="random")

chromosome.length

Length of the newly added chromosome (default: 5)

length.before

Length before the first SNP of the dataset (default: 5)

length.behind

Length after the last SNP of the dataset (default: 5)

real.bv.add

Single Marker effects

real.bv.mult

Two Marker effects

real.bv.dice

Multi-marker effects

snps.equidistant

Use equidistant markers (computationally faster! ; default: TRUE)

change.order

If TRUE sort markers according to given marker positions

bv.total

Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL)

polygenic.variance

Genetic variance of traits with no underlying QTL

bve.mult.factor

Multiplicate trait value times this

bve.poly.factor

Potency trait value over this

base.bv

Average genetic value of a trait

add.chromosome.ends

Add chromosome ends as recombination points

new.phenotype.correlation

(OLD! - use new.residual.correlation) Correlation of the simulated enviromental variance

new.residual.correlation

Correlation of the simulated enviromental variance

new.breeding.correlation

Correlation of the simulated genetic variance (child share! heritage is not influenced!

add.architecture

Add genetic architecture (marker positions)

snp.position

Location of each marker on the genetic map

position.scaling

Manual scaling of snp.position

bit.storing

Set to TRUE if the MoBPS (not-miraculix! bit-storing is used)

nbits

Bits available in MoBPS-bit-storing

randomSeed

Set random seed of the process

miraculix

If TRUE use miraculix package for data storage, computations and dataset generation

miraculix.dataset

Set FALSE to deactive miraculix package for dataset generation

n.additive

Number of additive QTL with effect size drawn from a gaussian distribution

n.equal.additive

Number of additive QTL with equal effect size (effect.size)

n.dominant

Number of dominant QTL with effect size drawn from a gaussian distribution

n.equal.dominant

Number of n.equal.dominant QTL with equal effect size

n.qualitative

Number of qualitative epistatic QTL

n.quantitative

Number of quantitative epistatic QTL

dominant.only.positive

Set to TRUE to always asign the heterozygous variant with the higher of the two homozygous effects (e.g. hybrid breeding); default: FALSE

var.additive.l

Variance of additive QTL

var.dominant.l

Variance of dominante QTL

var.qualitative.l

Variance of qualitative epistatic QTL

var.quantitative.l

Variance of quantitative epistatic QTL

effect.size.equal.add

Effect size of the QTLs in n.equal.additive

effect.size.equal.dom

Effect size of the QTLs in n.equal.dominant

exclude.snps

Marker were no QTL are simulated on

replace.real.bv

If TRUE delete the simulated traits added before

shuffle.traits

Combine different traits into a joined trait

shuffle.cor

Target Correlation between shuffeled traits

skip.rest

Internal variable needed when adding multipe chromosomes jointly

enter.bv

Internal parameter

name.cohort

Name of the newly added cohort

template.chip

Import genetic map and chip from a species ("cattle", "chicken", "pig")

beta.shape1

First parameter of the beta distribution for simulating allele frequencies

beta.shape2

Second parameter of the beta distribution for simulating allele frequencies

time.point

Time point at which the new individuals are generated

creating.type

Technique to generate new individuals (usage in web-based application)

trait.name

Name of the trait generated

share.genotyped

Share of individuals genotyped in the founders

genotyped.s

Specify with newly added individuals are genotyped (1) or not (0)

map

map-file that contains up to 5 colums (Chromsome, SNP-id, M-position, Bp-position, allele freq - Everything not provides it set to NA). A map can be imported via MoBPSmaps::ensembl.map()

remove.invalid.qtl

Set to FALSE to deactive the automatic removal of QTLs on markers that do not exist

verbose

Set to FALSE to not display any prints

bv.standard

Set TRUE to standardize trait mean and variance via bv.standardization() - automatically set to TRUE when mean/var.target are used

mean.target

Target mean

var.target

Target variance

is.maternal

Vector coding if a trait is caused by a maternal effect (Default: all FALSE)

is.paternal

Vector coding if a trait is caused by a paternal effect (Default: all FALSE)

vcf.maxsnp

Maximum number of SNPs to include in the genotype file (default: Inf)

internal

Dont touch!

Value

Population-list

Examples

1
population <- creating.diploid(nsnp=1000, nindi=100)

MoBPS documentation built on Nov. 9, 2021, 5:08 p.m.