| Title: | Modular Breeding Program Simulator |
|---|---|
| Description: | Framework for the simulation framework for the simulation of complex breeding programs and compare their economic and genetic impact. Associated publication: Pook et al. (2020) <doi:10.1534/g3.120.401193>. |
| Authors: | Torsten Pook [aut, cre] (ORCID: <https://orcid.org/0000-0001-7874-8500>), Johannes Geibel [ctb] (ORCID: <https://orcid.org/0000-0001-7172-3263>), Azadeh Hassanpour [ctb] (ORCID: <https://orcid.org/0000-0003-1976-3457>), Tobias Niehoff [ctb] (ORCID: <https://orcid.org/0000-0003-3046-6699>) |
| Maintainer: | Torsten Pook <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.13.1 |
| Built: | 2026-05-27 08:07:05 UTC |
| Source: | https://github.com/cran/MoBPS |
Function to add a genotyping array for the population
add.array(population, marker.included = TRUE, array.name = NULL)add.array(population, marker.included = TRUE, array.name = NULL)
population |
population list |
marker.included |
Vector with number of SNP entries coding if each marker is on the array (TRUE/FALSE) |
array.name |
Name of the added array |
Population list
data(ex_pop) population <- add.array(ex_pop, marker.included = c(TRUE, FALSE), array.name="Half-density")data(ex_pop) population <- add.array(ex_pop, marker.included = c(TRUE, FALSE), array.name="Half-density")
Function to create an additional trait that is the results of a linear combination of the other traits
add.combi(population, trait, combi.weights, trait.name = NULL)add.combi(population, trait, combi.weights, trait.name = NULL)
population |
population list |
trait |
trait nr. for which to implement a combination of other traits |
combi.weights |
Weights (only linear combinations of other traits are allowed!) |
trait.name |
Name of the trait generated |
Population list
Population list
data(ex_pop) population <- creating.trait(ex_pop, n.additive = c(100,100), replace.traits = TRUE) population <- add.combi(population, trait = 3, combi.weights = c(1,2))data(ex_pop) population <- creating.trait(ex_pop, n.additive = c(100,100), replace.traits = TRUE) population <- add.combi(population, trait = 3, combi.weights = c(1,2))
Function to add numeric to the diagonal of a matrix
add.diag(M, d)add.diag(M, d)
M |
Matrix |
d |
Vector to add to the diagonal of the matrix |
Matrix with increased diagonal elements
Matrix with modified diagonal entries
A <- matrix(c(1,2,3,4), ncol=2) B <- add.diag(A, 5)A <- matrix(c(1,2,3,4), ncol=2) B <- add.diag(A, 5)
Function to simulate and add additional diverse material to a population
add.diversity( population, breeding.size = 100, selection.rate = 0.5, pool.gen = NULL, pool.database = NULL, pool.cohorts = NULL, target.gen = NULL, target.database = NULL, target.cohorts = NULL, target.value = NULL, reduction.multiplier = 5, name.cohort = NULL, sex.quota = NULL, add.gen = 1, target.direction = NULL, verbose = TRUE, store.comp.times = TRUE, use.recalculate.manual = FALSE, pop1 = NULL, export.pop1 = FALSE )add.diversity( population, breeding.size = 100, selection.rate = 0.5, pool.gen = NULL, pool.database = NULL, pool.cohorts = NULL, target.gen = NULL, target.database = NULL, target.cohorts = NULL, target.value = NULL, reduction.multiplier = 5, name.cohort = NULL, sex.quota = NULL, add.gen = 1, target.direction = NULL, verbose = TRUE, store.comp.times = TRUE, use.recalculate.manual = FALSE, pop1 = NULL, export.pop1 = FALSE )
population |
Population list |
breeding.size |
Number of individuals to generate (default: 100) |
selection.rate |
Proportion of individuals to select in each breeding cycle (default: 0.5) |
pool.gen |
Generations of individuals to consider as founder pool to start from (default: NULL) |
pool.database |
Groups of individuals to consider as founder pool to start from (default: NULL) |
pool.cohorts |
Cohorts of individuals to consider as founder pool to start from (default: NULL) |
target.gen |
Generations of individuals to consider to calculate target genomic value to get to (default: NULL) |
target.database |
Groups of individuals to consider to calculate target genomic value to get to (default: NULL) |
target.cohorts |
Cohorts of individuals to consider to calculate target genomic value to get to (default: NULL) |
target.value |
Target genomic value to get (default: NULL - calculated based on target.gen/database/cohorts) |
reduction.multiplier |
Traits that already exceed the target are bred against. Weighting is scaled by this factor. |
name.cohort |
Name of the newly added cohort |
sex.quota |
Share of newly added female individuals (default: 0.5) |
add.gen |
Generation you want to add the new individuals to (default: 1) |
target.direction |
Manual select with traits are supposed to increase / decrease (1 target high, -1 target low) |
verbose |
Set to FALSE to not display any prints |
store.comp.times |
If TRUE store computation times in $info$comp.times.general (default: TRUE) |
use.recalculate.manual |
Set to TRUE to use recalculate.manual to calculate genomic values (all individuals and traits jointly, default: FALSE) |
pop1 |
Population to start with as founder pool (default: NULL - generation from pool.gen/database/cohorts) |
export.pop1 |
Default: FALSE. Exporting this is helpful if add.diversity is used frequently to avoid initializing this multiple times |
population list with newly added individuals
data(ex_pop) population <- add.diversity(ex_pop, pool.gen = 1, target.gen = 5)data(ex_pop) population <- add.diversity(ex_pop, pool.gen = 1, target.gen = 5)
Function to add fixed effects to existing set of traits
add.fixed.effects(population, fixed.effects, replace = FALSE)add.fixed.effects(population, fixed.effects, replace = FALSE)
population |
population list |
fixed.effects |
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)) |
replace |
Set to TRUE to delete previously added fixed effects |
Population list
Population list
data(ex_pop) population <- add.fixed.effects(ex_pop, fixed.effects = matrix(c(3,5), nrow=1))data(ex_pop) population <- add.fixed.effects(ex_pop, fixed.effects = matrix(c(3,5), nrow=1))
Function to relationship matrix for founder individuals that is used for any calculation of the pedigree
add.founder.kinship(population, founder.kinship = "GBLUP", gen = 1)add.founder.kinship(population, founder.kinship = "GBLUP", gen = 1)
population |
population list |
founder.kinship |
Default is to use vanRaden relationship. Alternative is to enter a pedigree-matrix (order of individuals is first male then female) |
gen |
Generation for which to enter the pedigree-matrix |
Population list
data(ex_pop) population <- add.founder.kinship(ex_pop)data(ex_pop) population <- add.founder.kinship(ex_pop)
Internal transformation using Moore-Penrose
alpha_to_beta(alpha, G, Z)alpha_to_beta(alpha, G, Z)
alpha |
alpha |
G |
kinship-matrix |
Z |
genomic information matrix |
Vector with single marker effects
Function to analyze correlation between bv/bve/pheno
analyze.bv( population, gen = NULL, database = NULL, cohorts = NULL, bvrow = "all", advanced = FALSE, use.all.copy = FALSE )analyze.bv( population, gen = NULL, database = NULL, cohorts = NULL, bvrow = "all", advanced = FALSE, use.all.copy = FALSE )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
bvrow |
Which traits to display |
advanced |
Set to TRUE to also look at offspring pheno |
use.all.copy |
Set to TRUE to extract phenotyping |
[[1]] Correlation between BV/BVE/Phenotypes [[2]] Genetic variance of the traits
data(ex_pop) analyze.bv(ex_pop,gen=1)data(ex_pop) analyze.bv(ex_pop,gen=1)
Function to analyze allele frequency of a single marker
analyze.population( population, chromosome = NULL, snp = NULL, snp.name = NULL, database = NULL, gen = NULL, cohorts = NULL )analyze.population( population, chromosome = NULL, snp = NULL, snp.name = NULL, database = NULL, gen = NULL, cohorts = NULL )
population |
Population list |
chromosome |
Number of the chromosome of the relevant SNP |
snp |
Number of the relevant SNP |
snp.name |
Name of the SNP to analyze |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
Frequency of AA/AB/BB in selected gen/database/cohorts
data(ex_pop) analyze.population(ex_pop, snp=1, chromosome=1, gen=1:5)data(ex_pop) analyze.population(ex_pop, snp=1, chromosome=1, gen=1:5)
Function for decoding in bitwise-storing in R (only 30 of 32 bits are used!)
bit.snps(bit.seq, nbits, population = NULL, from.p.bit = 1)bit.snps(bit.seq, nbits, population = NULL, from.p.bit = 1)
bit.seq |
bitwise stored SNP sequence |
nbits |
Number of usable bits (default: 30) |
population |
Population list |
from.p.bit |
Bit to start on |
De-coded marker sequence
Function for bitwise-storing in R (only 30 of 32 bits are used!)
bit.storing(snpseq, nbits)bit.storing(snpseq, nbits)
snpseq |
SNP sequence |
nbits |
Number of usable bits (default: 30) |
Bit-wise coded marker sequence
Function to simulate a step in a breeding scheme
breeding.diploid( population, selection.size = 0, selection.criteria = NULL, selection.m.gen = NULL, selection.f.gen = NULL, selection.m.database = NULL, selection.f.database = NULL, selection.m.cohorts = NULL, selection.f.cohorts = NULL, max.selection.fullsib = Inf, max.selection.halfsib = Inf, class.m = 0, class.f = 0, add.class.cohorts = TRUE, multiple.bve = "add", selection.index.weights.m = NULL, selection.index.weights.f = NULL, selection.index.scale.m = NULL, selection.index.scale.f = NULL, selection.index.kinship = 0, selection.index.gen = NULL, selection.index.database = NULL, selection.index.cohorts = NULL, selection.highest = TRUE, ignore.best = 0, best.selection.ratio.m = 1, best.selection.ratio.f = NULL, best.selection.criteria.m = "bv", best.selection.criteria.f = NULL, best.selection.manual.ratio.m = NULL, best.selection.manual.ratio.f = NULL, best.selection.manual.reorder = TRUE, selection.m.random.prob = NULL, selection.f.random.prob = NULL, reduced.selection.panel.m = NULL, reduced.selection.panel.f = NULL, threshold.selection.index = NULL, threshold.selection.value = NULL, threshold.selection.sign = ">", threshold.selection.criteria = NULL, threshold.selection = NULL, threshold.sign = ">", remove.duplicates = TRUE, selection.m.miesenberger = FALSE, selection.f.miesenberger = NULL, selection.miesenberger.reliability.est = "derived", miesenberger.trafo = 0, sort.selected.pos = FALSE, ogc = FALSE, relationship.matrix.ogc = "pedigree", depth.pedigree.ogc = 7, ogc.target = "min.sKin", ogc.uniform = NULL, ogc.ub = NULL, ogc.lb = NULL, ogc.ub.sKin = NULL, ogc.lb.BV = NULL, ogc.ub.BV = NULL, ogc.eq.BV = NULL, ogc.ub.sKin.increase = NULL, ogc.lb.BV.increase = NULL, ogc.c1 = NULL, ogc.isCandidate = NULL, ogc.plots = TRUE, ogc.weight = NULL, ogc.freq = NULL, selection.skip = FALSE, breeding.size = 0, breeding.size.litter = NULL, name.cohort = NULL, breeding.sex = NULL, breeding.sex.random = FALSE, sex.s = NULL, add.gen = 0, share.genotyped = 0, phenotyping.child = NULL, fixed.effects.p = NULL, fixed.effects.freq = NULL, new.class = 0L, max.offspring = Inf, max.offspring.individual.m = NULL, max.offspring.individual.f = NULL, max.offspring.individual.gen = NULL, max.offspring.individual.database = NULL, max.offspring.individual.cohorts = NULL, max.litter = Inf, max.mating.pair = Inf, avoid.mating.fullsib = FALSE, avoid.mating.halfsib = FALSE, avoid.mating.parent = FALSE, avoid.mating.inb = NULL, avoid.mating.inb.quantile = NULL, avoid.mating.inb.min = 0, avoid.mating.kinship = NULL, avoid.mating.kinship.quantile = NULL, avoid.mating.kinship.gen = NULL, avoid.mating.kinship.database = NULL, avoid.mating.kinship.cohorts = NULL, avoid.mating.kinship.min = 0, avoid.mating.kinship.median = FALSE, avoid.mating.depth.pedigree = 7, avoid.mating.remove = FALSE, avoid.mating.ignore = 0, avoid.mating.resampling = 1000, fixed.breeding = NULL, fixed.breeding.best = NULL, fixed.breeding.id = NULL, fixed.assignment = FALSE, breeding.all.combination = FALSE, repeat.mating = NULL, repeat.mating.copy = NULL, repeat.mating.fixed = NULL, repeat.mating.overwrite = TRUE, repeat.mating.trait = 1, repeat.mating.max = NULL, repeat.mating.s = NULL, same.sex.activ = FALSE, same.sex.sex = 0.5, same.sex.selfing = FALSE, selfing.mating = FALSE, selfing.sex = 0.5, dh.mating = FALSE, dh.sex = 0.5, combine = FALSE, copy.individual = FALSE, copy.individual.m = FALSE, copy.individual.f = FALSE, copy.individual.keep.bve = TRUE, copy.individual.keep.pheno = TRUE, added.genotyped = NULL, bv.ignore.traits = NULL, generation.cores = NULL, generation.core.make.small = FALSE, pedigree.error = 0, pedigree.unknown = 0, genotyped.database = NULL, genotyped.gen = NULL, genotyped.cohorts = NULL, genotyped.share = 1, genotyped.array = 1, genotyped.remove.gen = NULL, genotyped.remove.database = NULL, genotyped.remove.cohorts = NULL, genotyped.remove.all.copy = TRUE, genotyped.selected = FALSE, phenotyping = NULL, phenotyping.gen = NULL, phenotyping.cohorts = NULL, phenotyping.database = NULL, n.observation = NULL, phenotyping.class = NULL, heritability = NULL, repeatability = NULL, multiple.observation = FALSE, phenotyping.selected = FALSE, share.phenotyped = 1, offpheno.parents.gen = NULL, offpheno.parents.database = NULL, offpheno.parents.cohorts = NULL, offpheno.offspring.gen = NULL, offpheno.offspring.database = NULL, offpheno.offspring.cohorts = NULL, sigma.e = NULL, sigma.e.gen = NULL, sigma.e.cohorts = NULL, sigma.e.database = NULL, new.residual.correlation = NULL, new.breeding.correlation = NULL, phenotyping.trafo.parameter = NULL, bve = FALSE, bve.gen = NULL, bve.cohorts = NULL, bve.database = NULL, relationship.matrix = "GBLUP", depth.pedigree = 7, singlestep.active = TRUE, bve.ignore.traits = NULL, bve.array = NULL, bve.imputation = TRUE, bve.imputation.errorrate = 0, bve.all.genotyped = FALSE, bve.insert.gen = NULL, bve.insert.cohorts = NULL, bve.insert.database = NULL, variance.correction = "none", bve.class = NULL, sigma.g = NULL, sigma.g.gen = NULL, sigma.g.cohorts = NULL, sigma.g.database = NULL, forecast.sigma.g = NULL, remove.effect.position = FALSE, estimate.add.gen.var = FALSE, estimate.pheno.var = FALSE, bve.avoid.duplicates = TRUE, calculate.reliability = FALSE, estimate.reliability = FALSE, bve.input.phenotype = "own", mas.bve = FALSE, mas.markers = NULL, mas.number = 5, mas.effects = NULL, mas.geno = NULL, bve.parent.mean = FALSE, bve.grandparent.mean = FALSE, bve.mean.between = "bvepheno", bve.exclude.fixed.effects = NULL, bve.beta.hat.approx = TRUE, bve.per.sample.sigma.e = TRUE, bve.p_i.list = NULL, bve.p_i.gen = NULL, bve.p_i.database = NULL, bve.p_i.cohorts = NULL, bve.p_i.exclude.nongenotyped = FALSE, bve.use.all.copy = FALSE, bve.pedigree.error = TRUE, mobps.bve = TRUE, mixblup.bve = FALSE, blupf90.bve = FALSE, mixblup.reliability = FALSE, emmreml.bve = FALSE, rrblup.bve = FALSE, sommer.bve = FALSE, sommer.multi.bve = FALSE, BGLR.bve = FALSE, pseudo.bve = FALSE, pseudo.bve.accuracy = 1, bve.solve = "exact", mixblup.jeremie = FALSE, mixblup.hpblup = FALSE, mixblup.pedfile = TRUE, mixblup.parfile = TRUE, mixblup.datafile = TRUE, mixblup.inputfile = TRUE, mixblup.genofile = TRUE, mixblup.path = NULL, mixblup.path.pedfile = NULL, mixblup.path.parfile = NULL, mixblup.path.datafile = NULL, mixblup.path.inputfile = NULL, mixblup.path.genofile = NULL, mixblup.full.path.genofile = NULL, mixblup.files = "MiXBLUP_files", mixblup.verbose = TRUE, blupf90.verbose = TRUE, mixblup.genetic.cov = NULL, mixblup.residual.cov = NULL, mixblup.lambda = 1, mixblup.alpha = NULL, mixblup.beta = NULL, mixblup.omega = NULL, mixblup.maxit = 5000, mixblup.stopcrit = NULL, mixblup.maf = 0.005, mixblup.numproc = NULL, mixblup.apy = FALSE, mixblup.apy.core = NULL, mixblup.ta = FALSE, mixblup.tac = FALSE, mixblup.skip = FALSE, blupf90.skip = FALSE, mixblup.restart = FALSE, mixblup.nopeek = FALSE, mixblup.calcinbr.s = FALSE, mixblup.multiple.records = FALSE, mixblup.attach = FALSE, mixblup.debug = FALSE, mixblup.plink = FALSE, mixblup.cleanup = Inf, blupf90.pedfile = TRUE, blupf90.parfile = TRUE, blupf90.datafile = TRUE, blupf90.inputfile = TRUE, blupf90.genofile = TRUE, mixblup.dgv = FALSE, mixblup.dgv.freq = NULL, mixblup.dgv.effect = NULL, blupf90.path = NULL, renumf90.path = NULL, blupf90.path.pedfile = NULL, blupf90.path.parfile = NULL, blupf90.path.datafile = NULL, blupf90.path.inputfile = NULL, blupf90.path.genofile = NULL, blupf90.files = "blupf90_files", blupf90.blksize = NULL, blupf90.no.quality = FALSE, blupf90.conv_crit = NULL, BGLR.model = "RKHS", BGLR.burnin = 500, BGLR.iteration = 5000, BGLR.print = TRUE, BGLR.save = "RKHS", BGLR.save.random = FALSE, miraculix = NULL, miraculix.cores = 1, miraculix.mult = NULL, miraculix.chol = TRUE, miraculix.destroyA = TRUE, estimate.u = FALSE, fast.uhat = TRUE, gwas.u = FALSE, approx.residuals = TRUE, gwas.gen = NULL, gwas.cohorts = NULL, gwas.database = NULL, gwas.group.standard = FALSE, y.gwas.used = "pheno", gene.editing.offspring = FALSE, gene.editing.best = FALSE, gene.editing.offspring.sex = TRUE, gene.editing.best.sex = TRUE, nr.edits = 0, culling.non.selected = FALSE, culling.gen = NULL, culling.database = NULL, culling.cohorts = NULL, culling.type = 0, culling.time = Inf, culling.name = "Not_named", culling.bv1 = 0, culling.share1 = NULL, culling.bv2 = NULL, culling.share2 = NULL, culling.index = 0, culling.single = TRUE, culling.all.copy = TRUE, mutation.rate = 10^-8, remutation.rate = 10^-8, recombination.rate = 1, recombination.rate.trait = 0, recombination.function = NULL, recombination.minimum.distance = NULL, recombination.distance.penalty = NULL, recombination.distance.penalty.2 = NULL, recom.f.indicator = NULL, import.position.calculation = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, gen.architecture.m = 0, gen.architecture.f = NULL, add.architecture = NULL, intern.func = 0, delete.haplotypes = NULL, delete.recombi = NULL, delete.recombi.only.non.genotyped = FALSE, delete.recombi.class = NULL, delete.individuals = NULL, delete.gen = NULL, delete.sex = 1:2, delete.same.origin = FALSE, save.recombination.history = FALSE, store.sparse = FALSE, storage.save = 1.05, verbose = TRUE, report.accuracy = TRUE, store.breeding.totals = FALSE, store.bve.data = FALSE, store.comp.times = TRUE, store.comp.times.bve = TRUE, store.comp.times.generation = TRUE, store.effect.freq = FALSE, Rprof = FALSE, randomSeed = NULL, display.progress = NULL, time.point = 0, age.point = NULL, creating.type = 0, import.relationship.matrix = NULL, export.selected = FALSE, export.selected.database = FALSE, export.relationship.matrix = FALSE, pen.assignments = NULL, pen.size = NULL, pen.by.sex = TRUE, pen.by.litter = FALSE, pen.size.overwrite = TRUE, selection.m = NULL, selection.f = NULL, new.bv.observation.gen = NULL, new.bv.observation.cohorts = NULL, new.bv.observation.database = NULL, best1.from.group = NULL, best2.from.group = NULL, best1.from.cohort = NULL, best2.from.cohort = NULL, new.bv.observation = NULL, reduce.group = NULL, reduce.group.selection = "random", new.bv.child = NULL, computation.A = NULL, computation.A.ogc = NULL, new.phenotype.correlation = NULL, offspring.bve.parents.gen = NULL, offspring.bve.parents.database = NULL, offspring.bve.parents.cohorts = NULL, offspring.bve.offspring.gen = NULL, offspring.bve.offspring.database = NULL, offspring.bve.offspring.cohorts = NULL, input.phenotype = NULL, multiple.bve.weights.m = 1, multiple.bve.weights.f = NULL, multiple.bve.scale.m = "bv_sd", multiple.bve.scale.f = NULL, use.recalculate.manual = NULL, recalculate.manual.subset = 5000, compute.grandparent.contribution = FALSE, size.scaling = NULL, parallel.internal = FALSE, varg = FALSE, gain.stats = FALSE, next.id = NULL, copy.individual.use = NULL, copy.individual.use2 = NULL )breeding.diploid( population, selection.size = 0, selection.criteria = NULL, selection.m.gen = NULL, selection.f.gen = NULL, selection.m.database = NULL, selection.f.database = NULL, selection.m.cohorts = NULL, selection.f.cohorts = NULL, max.selection.fullsib = Inf, max.selection.halfsib = Inf, class.m = 0, class.f = 0, add.class.cohorts = TRUE, multiple.bve = "add", selection.index.weights.m = NULL, selection.index.weights.f = NULL, selection.index.scale.m = NULL, selection.index.scale.f = NULL, selection.index.kinship = 0, selection.index.gen = NULL, selection.index.database = NULL, selection.index.cohorts = NULL, selection.highest = TRUE, ignore.best = 0, best.selection.ratio.m = 1, best.selection.ratio.f = NULL, best.selection.criteria.m = "bv", best.selection.criteria.f = NULL, best.selection.manual.ratio.m = NULL, best.selection.manual.ratio.f = NULL, best.selection.manual.reorder = TRUE, selection.m.random.prob = NULL, selection.f.random.prob = NULL, reduced.selection.panel.m = NULL, reduced.selection.panel.f = NULL, threshold.selection.index = NULL, threshold.selection.value = NULL, threshold.selection.sign = ">", threshold.selection.criteria = NULL, threshold.selection = NULL, threshold.sign = ">", remove.duplicates = TRUE, selection.m.miesenberger = FALSE, selection.f.miesenberger = NULL, selection.miesenberger.reliability.est = "derived", miesenberger.trafo = 0, sort.selected.pos = FALSE, ogc = FALSE, relationship.matrix.ogc = "pedigree", depth.pedigree.ogc = 7, ogc.target = "min.sKin", ogc.uniform = NULL, ogc.ub = NULL, ogc.lb = NULL, ogc.ub.sKin = NULL, ogc.lb.BV = NULL, ogc.ub.BV = NULL, ogc.eq.BV = NULL, ogc.ub.sKin.increase = NULL, ogc.lb.BV.increase = NULL, ogc.c1 = NULL, ogc.isCandidate = NULL, ogc.plots = TRUE, ogc.weight = NULL, ogc.freq = NULL, selection.skip = FALSE, breeding.size = 0, breeding.size.litter = NULL, name.cohort = NULL, breeding.sex = NULL, breeding.sex.random = FALSE, sex.s = NULL, add.gen = 0, share.genotyped = 0, phenotyping.child = NULL, fixed.effects.p = NULL, fixed.effects.freq = NULL, new.class = 0L, max.offspring = Inf, max.offspring.individual.m = NULL, max.offspring.individual.f = NULL, max.offspring.individual.gen = NULL, max.offspring.individual.database = NULL, max.offspring.individual.cohorts = NULL, max.litter = Inf, max.mating.pair = Inf, avoid.mating.fullsib = FALSE, avoid.mating.halfsib = FALSE, avoid.mating.parent = FALSE, avoid.mating.inb = NULL, avoid.mating.inb.quantile = NULL, avoid.mating.inb.min = 0, avoid.mating.kinship = NULL, avoid.mating.kinship.quantile = NULL, avoid.mating.kinship.gen = NULL, avoid.mating.kinship.database = NULL, avoid.mating.kinship.cohorts = NULL, avoid.mating.kinship.min = 0, avoid.mating.kinship.median = FALSE, avoid.mating.depth.pedigree = 7, avoid.mating.remove = FALSE, avoid.mating.ignore = 0, avoid.mating.resampling = 1000, fixed.breeding = NULL, fixed.breeding.best = NULL, fixed.breeding.id = NULL, fixed.assignment = FALSE, breeding.all.combination = FALSE, repeat.mating = NULL, repeat.mating.copy = NULL, repeat.mating.fixed = NULL, repeat.mating.overwrite = TRUE, repeat.mating.trait = 1, repeat.mating.max = NULL, repeat.mating.s = NULL, same.sex.activ = FALSE, same.sex.sex = 0.5, same.sex.selfing = FALSE, selfing.mating = FALSE, selfing.sex = 0.5, dh.mating = FALSE, dh.sex = 0.5, combine = FALSE, copy.individual = FALSE, copy.individual.m = FALSE, copy.individual.f = FALSE, copy.individual.keep.bve = TRUE, copy.individual.keep.pheno = TRUE, added.genotyped = NULL, bv.ignore.traits = NULL, generation.cores = NULL, generation.core.make.small = FALSE, pedigree.error = 0, pedigree.unknown = 0, genotyped.database = NULL, genotyped.gen = NULL, genotyped.cohorts = NULL, genotyped.share = 1, genotyped.array = 1, genotyped.remove.gen = NULL, genotyped.remove.database = NULL, genotyped.remove.cohorts = NULL, genotyped.remove.all.copy = TRUE, genotyped.selected = FALSE, phenotyping = NULL, phenotyping.gen = NULL, phenotyping.cohorts = NULL, phenotyping.database = NULL, n.observation = NULL, phenotyping.class = NULL, heritability = NULL, repeatability = NULL, multiple.observation = FALSE, phenotyping.selected = FALSE, share.phenotyped = 1, offpheno.parents.gen = NULL, offpheno.parents.database = NULL, offpheno.parents.cohorts = NULL, offpheno.offspring.gen = NULL, offpheno.offspring.database = NULL, offpheno.offspring.cohorts = NULL, sigma.e = NULL, sigma.e.gen = NULL, sigma.e.cohorts = NULL, sigma.e.database = NULL, new.residual.correlation = NULL, new.breeding.correlation = NULL, phenotyping.trafo.parameter = NULL, bve = FALSE, bve.gen = NULL, bve.cohorts = NULL, bve.database = NULL, relationship.matrix = "GBLUP", depth.pedigree = 7, singlestep.active = TRUE, bve.ignore.traits = NULL, bve.array = NULL, bve.imputation = TRUE, bve.imputation.errorrate = 0, bve.all.genotyped = FALSE, bve.insert.gen = NULL, bve.insert.cohorts = NULL, bve.insert.database = NULL, variance.correction = "none", bve.class = NULL, sigma.g = NULL, sigma.g.gen = NULL, sigma.g.cohorts = NULL, sigma.g.database = NULL, forecast.sigma.g = NULL, remove.effect.position = FALSE, estimate.add.gen.var = FALSE, estimate.pheno.var = FALSE, bve.avoid.duplicates = TRUE, calculate.reliability = FALSE, estimate.reliability = FALSE, bve.input.phenotype = "own", mas.bve = FALSE, mas.markers = NULL, mas.number = 5, mas.effects = NULL, mas.geno = NULL, bve.parent.mean = FALSE, bve.grandparent.mean = FALSE, bve.mean.between = "bvepheno", bve.exclude.fixed.effects = NULL, bve.beta.hat.approx = TRUE, bve.per.sample.sigma.e = TRUE, bve.p_i.list = NULL, bve.p_i.gen = NULL, bve.p_i.database = NULL, bve.p_i.cohorts = NULL, bve.p_i.exclude.nongenotyped = FALSE, bve.use.all.copy = FALSE, bve.pedigree.error = TRUE, mobps.bve = TRUE, mixblup.bve = FALSE, blupf90.bve = FALSE, mixblup.reliability = FALSE, emmreml.bve = FALSE, rrblup.bve = FALSE, sommer.bve = FALSE, sommer.multi.bve = FALSE, BGLR.bve = FALSE, pseudo.bve = FALSE, pseudo.bve.accuracy = 1, bve.solve = "exact", mixblup.jeremie = FALSE, mixblup.hpblup = FALSE, mixblup.pedfile = TRUE, mixblup.parfile = TRUE, mixblup.datafile = TRUE, mixblup.inputfile = TRUE, mixblup.genofile = TRUE, mixblup.path = NULL, mixblup.path.pedfile = NULL, mixblup.path.parfile = NULL, mixblup.path.datafile = NULL, mixblup.path.inputfile = NULL, mixblup.path.genofile = NULL, mixblup.full.path.genofile = NULL, mixblup.files = "MiXBLUP_files", mixblup.verbose = TRUE, blupf90.verbose = TRUE, mixblup.genetic.cov = NULL, mixblup.residual.cov = NULL, mixblup.lambda = 1, mixblup.alpha = NULL, mixblup.beta = NULL, mixblup.omega = NULL, mixblup.maxit = 5000, mixblup.stopcrit = NULL, mixblup.maf = 0.005, mixblup.numproc = NULL, mixblup.apy = FALSE, mixblup.apy.core = NULL, mixblup.ta = FALSE, mixblup.tac = FALSE, mixblup.skip = FALSE, blupf90.skip = FALSE, mixblup.restart = FALSE, mixblup.nopeek = FALSE, mixblup.calcinbr.s = FALSE, mixblup.multiple.records = FALSE, mixblup.attach = FALSE, mixblup.debug = FALSE, mixblup.plink = FALSE, mixblup.cleanup = Inf, blupf90.pedfile = TRUE, blupf90.parfile = TRUE, blupf90.datafile = TRUE, blupf90.inputfile = TRUE, blupf90.genofile = TRUE, mixblup.dgv = FALSE, mixblup.dgv.freq = NULL, mixblup.dgv.effect = NULL, blupf90.path = NULL, renumf90.path = NULL, blupf90.path.pedfile = NULL, blupf90.path.parfile = NULL, blupf90.path.datafile = NULL, blupf90.path.inputfile = NULL, blupf90.path.genofile = NULL, blupf90.files = "blupf90_files", blupf90.blksize = NULL, blupf90.no.quality = FALSE, blupf90.conv_crit = NULL, BGLR.model = "RKHS", BGLR.burnin = 500, BGLR.iteration = 5000, BGLR.print = TRUE, BGLR.save = "RKHS", BGLR.save.random = FALSE, miraculix = NULL, miraculix.cores = 1, miraculix.mult = NULL, miraculix.chol = TRUE, miraculix.destroyA = TRUE, estimate.u = FALSE, fast.uhat = TRUE, gwas.u = FALSE, approx.residuals = TRUE, gwas.gen = NULL, gwas.cohorts = NULL, gwas.database = NULL, gwas.group.standard = FALSE, y.gwas.used = "pheno", gene.editing.offspring = FALSE, gene.editing.best = FALSE, gene.editing.offspring.sex = TRUE, gene.editing.best.sex = TRUE, nr.edits = 0, culling.non.selected = FALSE, culling.gen = NULL, culling.database = NULL, culling.cohorts = NULL, culling.type = 0, culling.time = Inf, culling.name = "Not_named", culling.bv1 = 0, culling.share1 = NULL, culling.bv2 = NULL, culling.share2 = NULL, culling.index = 0, culling.single = TRUE, culling.all.copy = TRUE, mutation.rate = 10^-8, remutation.rate = 10^-8, recombination.rate = 1, recombination.rate.trait = 0, recombination.function = NULL, recombination.minimum.distance = NULL, recombination.distance.penalty = NULL, recombination.distance.penalty.2 = NULL, recom.f.indicator = NULL, import.position.calculation = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, gen.architecture.m = 0, gen.architecture.f = NULL, add.architecture = NULL, intern.func = 0, delete.haplotypes = NULL, delete.recombi = NULL, delete.recombi.only.non.genotyped = FALSE, delete.recombi.class = NULL, delete.individuals = NULL, delete.gen = NULL, delete.sex = 1:2, delete.same.origin = FALSE, save.recombination.history = FALSE, store.sparse = FALSE, storage.save = 1.05, verbose = TRUE, report.accuracy = TRUE, store.breeding.totals = FALSE, store.bve.data = FALSE, store.comp.times = TRUE, store.comp.times.bve = TRUE, store.comp.times.generation = TRUE, store.effect.freq = FALSE, Rprof = FALSE, randomSeed = NULL, display.progress = NULL, time.point = 0, age.point = NULL, creating.type = 0, import.relationship.matrix = NULL, export.selected = FALSE, export.selected.database = FALSE, export.relationship.matrix = FALSE, pen.assignments = NULL, pen.size = NULL, pen.by.sex = TRUE, pen.by.litter = FALSE, pen.size.overwrite = TRUE, selection.m = NULL, selection.f = NULL, new.bv.observation.gen = NULL, new.bv.observation.cohorts = NULL, new.bv.observation.database = NULL, best1.from.group = NULL, best2.from.group = NULL, best1.from.cohort = NULL, best2.from.cohort = NULL, new.bv.observation = NULL, reduce.group = NULL, reduce.group.selection = "random", new.bv.child = NULL, computation.A = NULL, computation.A.ogc = NULL, new.phenotype.correlation = NULL, offspring.bve.parents.gen = NULL, offspring.bve.parents.database = NULL, offspring.bve.parents.cohorts = NULL, offspring.bve.offspring.gen = NULL, offspring.bve.offspring.database = NULL, offspring.bve.offspring.cohorts = NULL, input.phenotype = NULL, multiple.bve.weights.m = 1, multiple.bve.weights.f = NULL, multiple.bve.scale.m = "bv_sd", multiple.bve.scale.f = NULL, use.recalculate.manual = NULL, recalculate.manual.subset = 5000, compute.grandparent.contribution = FALSE, size.scaling = NULL, parallel.internal = FALSE, varg = FALSE, gain.stats = FALSE, next.id = NULL, copy.individual.use = NULL, copy.individual.use2 = NULL )
population |
Population list |
selection.size |
Number of selected individuals as parents (default: all individuals in selection.m/f.gen/database/gen - alt: positive numbers) |
selection.criteria |
What to use in the selection process (default: "bve", alt: "bv", "pheno", "random", "offpheno") |
selection.m.gen, selection.m.cohorts, selection.m.database
|
Generations/cohorts/groups available for selection of first/paternal parent |
selection.f.gen, selection.f.cohorts, selection.f.database
|
Generations available for selection of maternal parent |
max.selection.fullsib |
Maximum number of individual to select from the same family (same sire & dam) |
max.selection.halfsib |
Maximum number of individual to select from the same family (same sire or same dam) |
class.m, class.f
|
For selection only individuals from this class (included in selection.m/f.gen/database/cohorts) will be considered for selection (default: 0 - which is all individuals if never used class elsewhere) |
add.class.cohorts |
Initial classes of cohorts used in selection.m/f.cohorts are automatically added to class.m/f (default: TRUE) |
multiple.bve |
Way to handle multiple traits in selection (default: "add" - use values directly in an index, alt: "ranking" - ignore values but only use ranking per trait) |
selection.index.weights.m, selection.index.weights.f
|
Weighting between traits (default: 1) |
selection.index.scale.m, selection.index.scale.f
|
Default: "bv_sd"; Set to "pheno_sd" when using gains per phenotypic SD, "unit" when using gains per unit, "bve" when using estimated breeding values |
selection.index.kinship |
Include avg. kinship to a reference population (selection.index.gen/database/cohorts) as part of the selection index (Default: 0) |
selection.index.gen, selection.index.database, selection.index.cohorts
|
Generation/cohorts/groups to use as a reference of the kinship value in the selection index |
selection.highest |
If FALSE to select individuals with lowest value for the selection criterium (default c(TRUE,TRUE) - (m,w)) |
ignore.best |
Not consider the top individuals of the selected individuals (e.g. to use 2-10 best individuals) |
best.selection.ratio.m, best.selection.ratio.f
|
Ratio of the frequency of the selection of the best best individual and the worst best individual (default=1) |
best.selection.criteria.m, best.selection.criteria.f
|
Criteria to calculate this ratio (default: "bv", alt: "bve", "pheno") |
best.selection.manual.ratio.m, best.selection.manual.ratio.f
|
vector containing probability to draw from for every individual (e.g. c(0.1,0.2,0.7)) |
best.selection.manual.reorder |
Set to FALSE to not use the order from best to worst selected individual but plain order based on database-order |
selection.m.random.prob, selection.f.random.prob
|
Use this parameter to control the probability of each individual to be selected when doing random selection |
reduced.selection.panel.m, reduced.selection.panel.f
|
Use only a subset of individuals of the potential selected ones ("Split in user-interface") |
threshold.selection.index |
Selection index on which to access (matrix which one index per row) |
threshold.selection.value |
Minimum value in the selection index selected individuals have to have |
threshold.selection.sign |
Pick all individuals above (">") the threshold. Alt: ("<", "=", "<=", ">=") |
threshold.selection.criteria |
Criterium on which to evaluate the index (default: "bve", alt: "bv", "pheno") |
threshold.selection |
Minimum value in the selection index selected individuals have to have |
threshold.sign |
Pick all individuals above (">") the threshold. Alt: ("<", "=", "<=", ">=") |
remove.duplicates |
Set to FALSE to select the same individual multiple times when the gen/database/cohorts for selection contains it multiple times |
selection.m.miesenberger, selection.f.miesenberger
|
Use Weighted selection index according to Miesenberger 1997 for paternal/maternal selection |
selection.miesenberger.reliability.est |
If available reliability estimated are used. If not use default: "derived" (cor(BVE,BV)^2) , alt: "heritability", "estimated" (SD BVE / SD Pheno) as replacement |
miesenberger.trafo |
Ignore all eigenvalues below this threshold and apply dimension reduction (default: 0 - use all) |
sort.selected.pos |
Set to TRUE to arrange selected individuals according to position in the database (not by breeding value) |
ogc |
If TRUE use optimal genetic contribution theory to perform selection ( This requires the use of the R-package optiSel) |
relationship.matrix.ogc |
Method to calculate relationship matrix for OGC (Default: "pedigree", alt: "vanRaden", "CE", "non_stand", "CE2", "CM") |
depth.pedigree.ogc |
Depth of the pedigree in generations (default: 7) |
ogc.target |
Target of OGC (default: "min.sKin" - minimize inbreeding; alt: "max.BV" / "min.BV" - maximize genetic gain; both under constrains selected below) |
ogc.uniform |
This corresponds to the uniform constrain in optiSel |
ogc.ub |
This corresponds to the ub constrain in optiSel |
ogc.lb |
This corresponds to the lb constrain in optiSel |
ogc.ub.sKin |
This corresponds to the ub.sKin constrain in optiSel |
ogc.lb.BV |
This corresponds to the lb.BV constrain in optiSel |
ogc.ub.BV |
This corresponds to the ub.BV constrain in optiSel |
ogc.eq.BV |
This corresponds to the eq.BV constrain in optiSel |
ogc.ub.sKin.increase |
This corresponds to the upper bound (current sKin + ogc.ub.sKin.increase) as ub.sKin in optiSel |
ogc.lb.BV.increase |
This corresponds to the lower bound (current BV + ogc.lb.BV.increase) as lb.BV in optiSel |
ogc.c1 |
Only applicable when TN-version of OGC is available |
ogc.isCandidate |
Only applicable when TN-version of OGC is available |
ogc.plots |
Only applicable when TN-version of OGC is available |
ogc.weight |
Only applicable when B4F-version of OGC is available |
ogc.freq |
Only applicable when B4F-version of OGC is available |
selection.skip |
Set to FALSE in case no selection of individuals should be performed (just skips some unneccessary computations) |
breeding.size |
Number of individuals to generate (default: 0, use vector with two entries to control offspring per sex) |
breeding.size.litter |
Number of litters to generate (default: NULL - use breeding.size; only single positive number input allowed) |
name.cohort |
Name of the newly added cohort |
breeding.sex |
Share of female individuals (if single value is used for breeding size; default: 0.5) |
breeding.sex.random |
If TRUE randomly chose sex of new individuals (default: FALSE - use expected values) |
sex.s |
Specify which newly added individuals are male (1) or female (2) |
add.gen |
Generation you want to add the new individuals to (default: New generation) |
share.genotyped |
Share of individuals newly generated individuals that are genotyped (Default: 0). Also applies if individuals are copied with copy.individual |
phenotyping.child |
Starting phenotypes of newly generated individuals (default: "zero", alt: "mean" of both parents, "obs" - regular observation) |
fixed.effects.p |
Parametrization for the fixed effects (default: c(0,0..,0), if multiple different parametrizations are possible use a matrix with one parametrization per row) |
fixed.effects.freq |
Frequency of each different parametrization of the fixed effects |
new.class |
Migration level of newly generated individuals (default: 0 / use vector for different classes for different sexes) |
max.offspring |
Maximum number of offspring per individual (default: c(Inf,Inf) - (m,w)) |
max.offspring.individual.m, max.offspring.individual.f
|
Vector with maximum number of offspring for first/second parent (default: NULL). Order in the vector by order of selection |
max.offspring.individual.gen |
matrix with first column generation with limited number offspring, second column number of allowed offspring |
max.offspring.individual.database |
matrix with first four columns database with limited number offspring, fifth column number of allowed offspring |
max.offspring.individual.cohorts |
matrix with first column cohort with limited number offspring, second column number of allowed offspring |
max.litter |
Maximum number of litters per individual (default: c(Inf,Inf) - (m,w)) |
max.mating.pair |
Maximum number of matings between two specific individuals (default: Inf) |
avoid.mating.fullsib |
Set to TRUE to not generate offspring of full siblings |
avoid.mating.halfsib |
Set to TRUE to not generate offspring from half or full siblings |
avoid.mating.parent |
Set to TRUE to not generate offspring from parent / sibling matings |
avoid.mating.inb |
Maximum allowed expected inbreeding to allow a mating combination (based on kinships) |
avoid.mating.inb.quantile |
Use this to not perform mating between more related potential parents (quantile of all expected inbreeding levels) |
avoid.mating.inb.min, avoid.mating.kinship.min
|
Share of mating to at minimum perform for each individual (default: 0) |
avoid.mating.kinship |
Maximum allowed expected kinship of an offspring to a reference group of individuals |
avoid.mating.kinship.quantile |
Maximum allowed expected kinship of an offspring to a reference group of individuals |
avoid.mating.kinship.gen, avoid.mating.kinship.database, avoid.mating.kinship.cohorts
|
Gen/database/cohorts of individuals to consider as a reference pool in avoid.mating.kinship |
avoid.mating.kinship.median |
Set to TRUE to use median kinship instead of mean kinship in avoid.mating.kinship (default: FALSE) |
avoid.mating.depth.pedigree |
Depth of the pedigree to calculate expected inbreeding levels / kinships |
avoid.mating.remove |
Set to TRUE to automatically exclude any selected individuals from the sample of parents |
avoid.mating.ignore |
Set to value higher 0 for avoid.mating.inb/kinship restrictions to not always be applied |
avoid.mating.resampling |
Number of sampling attempts to avoid unwanted matings (( last couple of individuals otherwise can have unwanted relatedness, default = 1000)) |
fixed.breeding |
Set of targeted matings to perform (matrix with 7 columns: database position first parent (gen, sex, nr), database position second parent (gen,sex,nr), likelihood to be female (optional)) |
fixed.breeding.best |
Perform targeted matings in the group of selected individuals (matrix with 5 columns: position first parent (male/female pool of selected individuals, ranking in selected animals), position second parent (male/female pool of selected individuals, ranking in selected animals), likelihood to be female (optional)) |
fixed.breeding.id |
Set of target matings to perform (matrix with 3 columns: id first parent, id second parent, likelihood to be female (optional)) |
fixed.assignment |
Set to "bestbest" / TRUE for targeted mating of best-best individual till worst-worst (of selected). set to "bestworst" for best-worst mating |
breeding.all.combination |
Set to TRUE to automatically perform each mating combination possible exactly ones. |
repeat.mating |
Generate multiple mating from the same dam/sire combination (first column: number of offspring; second column: probability) |
repeat.mating.copy |
Generate multiple copies from a copy action (combine / copy.individual.m/f) (first column: number of offspring; second column: probability) |
repeat.mating.fixed |
Vector containing number of times each mating is repeated. This will overwrite sampling from repeat.mating / repeat.mating.copy (default: NULL) |
repeat.mating.overwrite |
Set to FALSE to not use the current repeat.mating / repeat.mating.copy input as the new standard values (default: TRUE) |
repeat.mating.trait |
Trait that should be linked to the litter size |
repeat.mating.max |
Maximum number of individuals in a litter |
repeat.mating.s |
Use this parameter to manually provide the size of each litter generated |
same.sex.activ |
If TRUE allow matings of individuals of same sex (Sex here is a general term with the first sex referring to the first parent, second sex second parent) |
same.sex.sex |
Probability to use female individuals as parents (default: 0.5) |
same.sex.selfing |
Set to TRUE to allow for selfing when using same.sex matings (default: FALSE) |
selfing.mating |
If TRUE generate new individuals via selfing |
selfing.sex |
Share of female individuals used for selfing (default: 0.5) |
dh.mating |
If TRUE generate a DH-line in mating process |
dh.sex |
Share of DH-lines generated from selected female individuals |
combine |
Copy existing individuals (e.g. to merge individuals from different groups in a joined cohort). Individuals to use are used as the first parent |
copy.individual |
Set TRUE to generate a copy of an already existing individual. If only one of the sexes has individuals to select from it will automatically detect with sex to chose. Otherwise the first/male parent will be copied |
copy.individual.m, copy.individual.f
|
If TRUE generate exactly one copy of all selected male/female in a new cohort (or more by setting breeding.size) |
copy.individual.keep.bve |
Set to FALSE to not keep estimated breeding value in case of use of copying individuals instead of regular meiosis |
copy.individual.keep.pheno |
Set to FALSE to not keep phenotypes in case of use of copying individuals instead of regular meiosis |
added.genotyped |
(OLD! use share.genotyped) Share of individuals that is additionally genotyped (only for copy.individual, default: 0) |
bv.ignore.traits |
Vector of traits to ignore in the calculation of the genomic value (default: NULL; Only recommended for high number of traits and experienced users!) |
generation.cores |
Number of cores used for the generation of new individuals (This will only be active when generating more than 500 individuals) |
generation.core.make.small |
Set to TRUE to delete not necessary individuals during parallelization |
pedigree.error |
Share of errors in the pedigree (default: 0; vector with two entries for errors on male/female side) |
pedigree.unknown |
Share of individuals with unknown parents (default: 0; vector with two entries for differences in unknown-share between male/female side) |
genotyped.gen, genotyped.cohorts, genotyped.database
|
Generations/cohorts/groups to generate genotype data (that can be used in a BVE) |
genotyped.share |
Share of individuals in genotyped.gen/database/cohort to generate genotype data from (default: 1) |
genotyped.array |
Genotyping array used |
genotyped.remove.gen, genotyped.remove.database, genotyped.remove.cohorts
|
Generations/cohorts/groups from which to remove genotyping information (this will affect all copies of an individual unless genotyped.remove.all.copy is set to FALSE) |
genotyped.remove.all.copy |
Set to FALSE to only change the genotyping state of this particular copy of an individual (default: TRUE) |
genotyped.selected |
Set to TRUE to genotype all selected individuals |
phenotyping |
Quick access to phenotyping for (all: "all", non-phenotyped: "non_obs", non-phenotyped male: "non_obs_m", non-phenotyped female: "non_obs_f") |
phenotyping.gen, phenotyping.cohorts, phenotyping.database
|
Generations/cohorts/groups from which to generate additional phenotypes |
n.observation |
Number of phenotypic observations generated per trait and per individuals (use repeatability to control correlation between observations) |
phenotyping.class |
Classes of individuals for which to generate phenotypes (default: NULL –> all classes) |
heritability |
Use sigma.e to obtain a certain heritability (default: NULL) |
repeatability |
Set this to control the share of the residual variance (sigma.e) that is permanent (there for each observation) |
multiple.observation |
If an already phenotyped trait is phenotyped again this will on NOT lead to an additional phenotyped observation unless this is set to TRUE |
phenotyping.selected |
Set to TRUE to phenotype all selected individuals |
share.phenotyped |
Share of the individuals to phenotype (use vector for different probabilities for different traits) |
offpheno.parents.gen, offpheno.parents.database, offpheno.parents.cohorts
|
Generations/groups/cohorts to consider to derive phenotype from offspring phenotypes |
offpheno.offspring.gen, offpheno.offspring.cohorts, offpheno.offspring.database
|
Active generations/cohorts/groups for import of offspring phenotypes |
sigma.e |
Enviromental standard deviation (default: use sigma.e from last run / usually fit by use of heritability; if never provided: 10; used in BVE for variance components if manually set) |
sigma.e.gen, sigma.e.cohorts, sigma.e.database
|
Generations/cohorts/groups to consider when estimating sigma.e when using heritability |
new.residual.correlation |
Correlation of the simulated residual variance |
new.breeding.correlation |
Correlation of the simulated genetic variance (only impacts non-QTL based traits. Needs to be fit in creating.diploid/trait for QTL-based traits) |
phenotyping.trafo.parameter |
Additional input parameter for phenotypic transformation function |
bve |
If TRUE perform a breeding value estimation (default: FALSE) |
bve.gen, bve.cohorts, bve.database
|
Generations/Groups/Cohorts of individuals to consider in breeding value estimation (default: NULL) |
relationship.matrix |
Method to calculate relationship matrix for the breeding value estimation. This will automatically chosen between GBLUP, ssGBLUP, pBLUP based on if genotyped individuals are available (Default: "GBLUP", alt: "pedigree", "CE", "non_stand", "CE2", "CM") |
depth.pedigree |
Depth of the pedigree in generations (default: 7) |
singlestep.active |
Set FALSE remove all individuals without genomic data from the breeding value estimation |
bve.ignore.traits |
Vector of traits to ignore in the breeding value estimation (default: NULL, use: "zero" to not consider traits with 0 index weight in selection.index.weights.m/.w) |
bve.array |
Array to use in the breeding value estimation (default: NULL; chose largest possible based on used individuals in BVE) |
bve.imputation |
Set to FALSE to not perform imputation up to the highest marker density of genotyping data that is available |
bve.imputation.errorrate |
Share of errors in the imputation procedure (default: 0) |
bve.all.genotyped |
Set to TRUE to act as if every individual in the breeding value estimation has been genotyped |
bve.insert.gen, bve.insert.cohorts, bve.insert.database
|
Generations/Groups/Cohorts of individuals to compute breeding values for (default: all groups in bve.database) |
variance.correction |
Correct for "parental.mean" or "generation.mean" in the estimation of sigma.g for BVE / sigma.e estimation (default: "none") |
bve.class |
Consider only individuals of those class classes in breeding value estimation (default: NULL - use all) |
sigma.g |
Genetic standard deviation (default: calculated based on individuals in BVE ; used in BVE for variance components if manually set; mostly recommended to be used for non-QTL based traits) |
sigma.g.gen, sigma.g.cohorts, sigma.g.database
|
Generations/cohorts/groups to consider when estimating sigma.g |
forecast.sigma.g |
Set FALSE to not estimate sigma.g (Default: TRUE // in case sigma.g is set this is automatically set to FALSE) |
remove.effect.position |
If TRUE remove real QTLs in breeding value estimation |
estimate.add.gen.var |
If TRUE estimate additive genetic variance and heritability based on parent model |
estimate.pheno.var |
If TRUE estimate total variance in breeding value estimation |
bve.avoid.duplicates |
If set to FALSE multiple generations of the same individual can be used in the bve (only possible by using copy.individual to generate individuals) |
calculate.reliability |
Set TRUE to calculate a reliability when performing Direct-Mixed-Model BVE |
estimate.reliability |
Set TRUE to estimate the reliability in the BVE by calculating the correlation between estimated and real breeding values |
bve.input.phenotype |
Select what to use in BVE (default: own phenotype ("own"), offspring phenotype ("off"), their average ("mean") or a weighted average ("weighted")) |
mas.bve |
If TRUE use marker assisted selection in the breeding value estimation |
mas.markers |
Vector containing markers to be used in marker assisted selection |
mas.number |
If no markers are provided this nr of markers is selected (if single marker QTL are present highest effect markers are prioritized) |
mas.effects |
Effects assigned to the MAS markers (Default: estimated via lm()) |
mas.geno |
Genotype dataset used in MAS (default: NULL, automatic internal calculation) |
bve.parent.mean |
Set to TRUE to use the average parental performance as the breeding value estimate |
bve.grandparent.mean |
Set to TRUE to use the average grandparental performance as the breeding value estimate |
bve.mean.between |
Select if you want to use the "bve", "bv", "pheno" or "bvepheno" to form the mean (default: "bvepheno" - if available bve, else pheno) |
bve.exclude.fixed.effects |
Vector of fixed effects to ignore in the BVE (default: NULL) |
bve.beta.hat.approx |
Set to FALSE to use the true underlying value for beta_hat for the fixed effect in the direct BVE model. rrBLUP, BGLR, sommer will always estimate beta_hat. |
bve.per.sample.sigma.e |
Set to FALSE to deactivate the use of a heritability based on the number of observations generated per sample |
bve.p_i.list |
Vector of allele frequencies to be used when calculating the genomic relationship matrix (default: calculate them based on Z) |
bve.p_i.gen, bve.p_i.database, bve.p_i.cohorts
|
Generations/cohorts/groups to use when manually calculating allele frequencies for genomic relationship matrix |
bve.p_i.exclude.nongenotyped |
Set to TRUE to exclude non-genotyped individuals when calculating allele frequencies for genomic relationship matrix standardization |
bve.use.all.copy |
Set to TRUE to use phenotypes and genotyped status from all copies of an individual instead of just the provided ones in the bve.gen/database/cohorts (default: FALSE) |
bve.pedigree.error |
Set to FALSE to ignore/correct for any pedigree errors |
mobps.bve |
If TRUE predict BVEs in direct estimation with assumed known heritability (default: TRUE; activating use of any other BVE method to TRUE will overwrite this) |
mixblup.bve |
Set to TRUE to activate breeding value estimation via MiXBLUP (requires MiXBLUP license!) |
blupf90.bve |
Set to TRUE to activate breeding value estimation via BLUPF90 (requires blupf90 software!) |
mixblup.reliability |
Set to TRUE to activate breeding value estimation via MiXBLUP (requires MiXBLUP license!) |
emmreml.bve |
If TRUE use REML estimator from R-package EMMREML in breeding value estimation |
rrblup.bve |
If TRUE use REML estimator from R-package rrBLUP in breeding value estimation |
sommer.bve |
If TRUE use REML estimator from R-package sommer in breeding value estimation |
sommer.multi.bve |
Set TRUE to use a multi-trait model in the R-package sommer for BVE |
BGLR.bve |
If TRUE use BGLR to perform breeding value estimation |
pseudo.bve |
If set to TRUE the breeding value estimation will be simulated with resulting accuracy pseudo.bve.accuracy (default: 1) |
pseudo.bve.accuracy |
The accuracy to be obtained in the "pseudo" - breeding value estimation |
bve.solve |
Provide solver to be used in BVE (default: "exact" solution via inversion, alt: "pcg", function with inputs A, b and output y_hat) |
mixblup.jeremie |
Set to TRUE to use Jeremies suggested MiXBLUP settings |
mixblup.hpblup |
Set to TRUE to use hpblup in MiXBLUP (default: FALSE) |
mixblup.pedfile |
Set to FALSE to manually generate your MiXBLUP pedfile |
mixblup.parfile |
Set to FALSE to manually generate your MiXBLUP parfile |
mixblup.datafile |
Set to FALSE to manually write your MiXBLUP datafile |
mixblup.inputfile |
Set to FALSE to manually write your MiXBLUP inputfile |
mixblup.genofile |
Set to FALSE to manually write the MiXBLUP genotypefile |
mixblup.path |
Provide path to MiXBLUP.exe (default is your working directory: Windows: MixBLUP; Linux ./MixBLUP.exe) |
mixblup.path.pedfile |
Path from where to import the MiXBLUP pedfile |
mixblup.path.parfile |
Path from where to import the MiXBLUP parfile |
mixblup.path.datafile |
Path from where to import the MiXBLUP datafile |
mixblup.path.inputfile |
Path from where to import the MiXBLUP inputfile |
mixblup.path.genofile |
Path from where to import the MiXBLUP genofile |
mixblup.full.path.genofile |
Path from where to import the MiXBLUP genofile |
mixblup.files |
Directory to generate all files generated when using MiXBLUP (default: MiXBLUP_files/ ) |
mixblup.verbose |
Set to TRUE to display MiXBLUP prints |
blupf90.verbose |
Set to TRUE to display blupf90 prints |
mixblup.genetic.cov |
Provide genetic covariance matrix to be used in MiXBLUP (lower-triangle is sufficent) (default: underlying true values) |
mixblup.residual.cov |
Provide residual covariance matrix to be used in MiXBLUP (lower-triangle is sufficent) (default: underlying true values) |
mixblup.lambda |
Lambda parameter in MiXBLUP (default: 1) |
mixblup.alpha |
Alpha parameter in MiXBLUP (default: 0.95, with alpha + beta = 1 , warning: MiXBLUP software this is 1) |
mixblup.beta |
Beta parameter in MiXBLUP (default: 0.05, with alpha + beta = 1 , warning: MiXBLUP software this is 0) |
mixblup.omega |
Omega parameter in MiXBLUP (default: mixblup.lambda) |
mixblup.maxit |
!Maxit qualifier in MiXBLUP (default: 5.000) |
mixblup.stopcrit |
!STOPCRIT qualifier in MiXBLUP (default: not used, suggested value 1.E-4 for ssGBLUP) // will overwrite maxit |
mixblup.maf |
!MAF qualifier in MiXBLUP (default: 0.005) |
mixblup.numproc |
Numproc parameter in MiXBLUP (default: not set // 1) |
mixblup.apy |
Set to TRUE to use APY inverse in MiXBLUP (default: FALSE) |
mixblup.apy.core |
Number of core individuals in the APY algorithm (default: 5000) |
mixblup.ta |
Set to TRUE to use the !Ta flag in MixBLUP |
mixblup.tac |
Set to TRUE to use the !TAC flag in MixBLUP |
mixblup.skip |
Set to TRUE to skip the actually system call to MiXBLUP and only write the MiXBLUP files |
blupf90.skip |
Set to TRUE to skip the actually system calls of blupf90 and only write the blupf90 input files |
mixblup.restart |
Set to TRUE to set the !RESTART flag in MiXBLUP (requires a "Solunf" file in the working directory) |
mixblup.nopeek |
Set to TRUE to set the !NOPEEK flag in MiXBLUP |
mixblup.calcinbr.s |
Set to TRUE to set the !CalcInbr flag to S |
mixblup.multiple.records |
Set to TRUE to write multiple phenotypic records for an individual |
mixblup.attach |
Set TRUE to just extent the existing genotype file instead of writting it completely new |
mixblup.debug |
Set TRUE to set debugging flags for mixblup call (-Dmst > mixblup_debug.log) (default: FALSE) |
mixblup.plink |
Set TRUE to write genotype files in PLINK format (requires R-package genio, default: FALSE) |
mixblup.cleanup |
Delete all mixblup output files above the indicated size after MiXBLUP run completes (default: Inf) |
blupf90.pedfile |
Set to FALSE to manually generate your MiXBLUP pedfile |
blupf90.parfile |
Set to FALSE to manually generate your MiXBLUP parfile |
blupf90.datafile |
Set to FALSE to manually generate your blupf90 datafile |
blupf90.inputfile |
Set to FALSE to manually write your MiXBLUP inputfile |
blupf90.genofile |
Set to FALSE to manually write the blupf90 genotypefile |
mixblup.dgv |
Set TRUE to use DGV-PBLUP (Only applicable with TAC-BLUP) |
mixblup.dgv.freq |
Path of allele frequency file for DGV-PBLUP |
mixblup.dgv.effect |
Path of SNP effect file for DGV-PBLUP |
blupf90.path |
Provide path to blupf90 (default is your working directory: Windows: ./blupf90+.exe ; Linux ./blupf90+.exe) |
renumf90.path |
Provide path to blupf90 (default is your working directory: Windows: ./renumf90.exe ; Linux ./renumf90.exe) |
blupf90.path.pedfile |
Path from where to import the blupf90 pedfile |
blupf90.path.parfile |
Path from where to import the blupf90 parfile |
blupf90.path.datafile |
Path from where to import the blupf90 data file |
blupf90.path.inputfile |
Path from where to import the blupf90 inputfile |
blupf90.path.genofile |
Path from where to import the blupf90 genotype file |
blupf90.files |
Directory to generate all files generated when using blupf90 (default: blupf90_files/ ) |
blupf90.blksize |
blupf90 parameter blksize (Default: number of traits) |
blupf90.no.quality |
blupf90 setting OPTION no_quality_control (Default: FALSE) |
blupf90.conv_crit |
blupf90 parameter conv_crit (Default: blupf90 default) |
BGLR.model |
Select which BGLR model to use (default: "RKHS", alt: "BRR", "BL", "BayesA", "BayesB", "BayesC") |
BGLR.burnin |
Number of burn-in steps in BGLR (default: 1000) |
BGLR.iteration |
Number of iterations in BGLR (default: 5000) |
BGLR.print |
If TRUE set verbose to TRUE in BGLR |
BGLR.save |
Method to use in BGLR (default: "RKHS" - alt: NON currently) |
BGLR.save.random |
Add random number to store location of internal BGLR computations (only needed when simulating a lot in parallel!) |
miraculix |
If TRUE use miraculix to perform computations (ideally already generate population in creating.diploid with this; default: automatic detection from population list) |
miraculix.cores |
Number of cores used in miraculix applications (default: 1) |
miraculix.mult |
If TRUE use miraculix for matrix multiplications even if miraculix is not used for storage |
miraculix.chol |
Set to FALSE to deactive miraculix based Cholesky-decomposition (default: TRUE) |
miraculix.destroyA |
If FALSE A will not be destroyed in the process of inversion (less computing / more memory) |
estimate.u |
If TRUE estimate u in breeding value estimation (Y = Xb + Zu + e) |
fast.uhat |
Set to FALSE to derive inverse of A in rrBLUP (only required when this becomes numerical unstable otherwise) |
gwas.u |
If TRUE estimate u via GWAS (relevant for gene editing) |
approx.residuals |
If FALSE calculate the variance for each marker separatly instead of using a set variance (does not change order - only p-values) |
gwas.gen, gwas.cohorts, gwas.database
|
Generations/cohorts/groups to consider in GWAS analysis |
gwas.group.standard |
If TRUE standardize phenotypes by group mean |
y.gwas.used |
What y value to use in GWAS study (Default: "pheno", alt: "bv", "bve") |
gene.editing.offspring |
If TRUE perform gene editing on newly generated individuals |
gene.editing.best |
If TRUE perform gene editing on selected individuals |
gene.editing.offspring.sex |
Which sex to perform editing on (Default c(TRUE,TRUE), mw) |
gene.editing.best.sex |
Which sex to perform editing on (Default c(TRUE,TRUE), mw) |
nr.edits |
Number of edits to perform per individual |
culling.non.selected |
Set TRUE to cull all non-selected individuals (default: FALSE) |
culling.gen, culling.cohorts, culling.database
|
Generations/cohorst/groups to consider to culling |
culling.type |
Default: 0, can be set to code different type of culling reasons (e.g. 0 - aging, 1 - selection, 2 - health) |
culling.time |
Age of the individuals at culling // use time.point if the age of individuals is variable and culling is executed on individuals of different ages culled at the same time |
culling.name |
Name of the culling action (user-interface stuff) |
culling.bv1 |
Reference Breeding value |
culling.share1 |
Probability of death for individuals with bv1 |
culling.bv2 |
Alternative breeding value (linear extended for other bvs) |
culling.share2 |
Probability of death for individuals with bv2 |
culling.index |
Genomic index (default:0 - no genomic impact, use: "lastindex" to use the last selection index applied in selection) |
culling.single |
Set to FALSE to not apply the culling module on all individuals of the cohort |
culling.all.copy |
Set to FALSE to not kill copies of the same individual in the culling module |
mutation.rate |
Mutation rate in each marker (default: 10^-8) |
remutation.rate |
Remutation rate in each marker (default: 10^-8) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recombination.rate.trait |
Select a trait which BV will be used as a scalar for the expected number of recombination (default: 0) |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
recombination.minimum.distance |
Minimum distance between two points of recombination (default: 0) |
recombination.distance.penalty |
Reduced probability for recombination events closer than this value - linear penalty (default: 0) |
recombination.distance.penalty.2 |
Reduced probability for recombination events closer than this value - quadratic penalty (default: 0) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
import.position.calculation |
Function to calculate recombination point into adjacent/following SNP |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
gen.architecture.m, gen.architecture.f
|
Genetic architecture for male/female individuals (default: 0 - no transformation) |
add.architecture |
List with two vectors containing (A: length of chromosomes, B: position in cM of SNPs) |
intern.func |
Chose which function will be used for simulation of meiosis (default: 0, alt: 1,2) - can be faster for specific cases |
delete.haplotypes |
Generations for with haplotypes of founders can be deleted from population list for memory reduction (default: NULL) |
delete.recombi |
Generations for which recombination points can be deleted from the population list for memory reduction (default: NULL) |
delete.recombi.only.non.genotyped |
Set TRUE to only remove points of recombination for non-genotyped individuals |
delete.recombi.class |
Set TRUE to only remove points of recombination for individuals from a specific class |
delete.individuals |
Generations for with individuals are completely deleted from population list for memory reduction (default: NULL) |
delete.gen |
Generations to entirely deleted fro population list for memory reduction (default: NULL) |
delete.sex |
Remove all individuals from these sex from generation delete.individuals (default: 1:2 ; note:delete individuals=NULL) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
save.recombination.history |
If TRUE store the time point of each recombination event |
store.sparse |
Set to TRUE to store the pedigree relationship matrix as a sparse matrix |
storage.save |
Lower numbers will lead to less memory but slightly higher computing time for calculation of the pedigree relationship matrix (default: 1.5, min: 1) |
verbose |
Set to FALSE to not display any prints |
report.accuracy |
Report the accuracy of the breeding value estimation |
store.breeding.totals |
If TRUE store information on selected individuals in $info$breeding.totals (default: FALSE) |
store.bve.data |
If TRUE store information of bve in $info$bve.data |
store.comp.times |
If TRUE store computation times in $info$comp.times.general (default: TRUE) |
store.comp.times.bve |
If TRUE store computation times of breeding value estimation in $info$comp.times.bve (default: TRUE) |
store.comp.times.generation |
If TRUE store computation times of mating simulations in $info$comp.times.generation (default: TRUE) |
store.effect.freq |
If TRUE store the allele frequency of effect markers per generation |
Rprof |
Store computation times of each function |
randomSeed |
Set random seed of the process |
display.progress |
Set FALSE to not display progress bars. Setting verbose to FALSE will automatically deactive progress bars |
time.point |
Time point at which the new individuals are generated |
age.point |
Time point at which the new individuals are born (default: time.point - mostly useful in the founder generation) |
creating.type |
Technique to generate new individuals (use mostly intended for web-based application) |
import.relationship.matrix |
Input the wanted relationship matrix with this parameter (default: NULL - relationship matrix will be calculated from other sources) |
export.selected |
Set to TRUE to export the list of selected individuals |
export.selected.database |
Set to TRUE to export a database of the selected individuals |
export.relationship.matrix |
Export the relationship matrix used in the breeding value estimation |
pen.assignments |
This is a placeholder to deactivate this module for now |
pen.size |
Pen size. When different types of pen are used: use a matrix with two columns coding Number of individuals per pen, Probability for each pen size |
pen.by.sex |
Only individuals of the same sex are put in the same pen (default: TRUE) |
pen.by.litter |
Only individuals of the same litter are put in the same pen (default: FALSE) |
pen.size.overwrite |
Set to FALSE to not use the input for pen.size for down-stream use of breeding.diploid (default: TRUE) |
selection.m, selection.f
|
(OLD! use selection criteria) Selection criteria for male/female individuals (Set to "random" to randomly select individuals - default: "function" based on selection.criteria ((usually breeding values))) |
new.bv.observation.gen, new.bv.observation.cohorts, new.bv.observation.database
|
(OLD! use phenotyping.gen/cohorts/database) Vector of generation from which to generate additional phenotypes |
best1.from.group, best1.from.cohort
|
(OLD!- use selection.m.database/cohorts) Groups of individuals to consider as First Parent / Father (also female individuals are possible) |
best2.from.group, best2.from.cohort
|
(OLD!- use selection.f.database/cohorts) Groups of individuals to consider as Second Parent / Mother (also male individuals are possible) |
new.bv.observation |
(OLD! - use phenotyping) Quick access to phenotyping for (all: "all", non-phenotyped: "non_obs", non-phenotyped male: "non_obs_m", non-phenotyped female: "non_obs_f") |
reduce.group |
(OLD! - use culling modules) Groups of individuals for reduce to a new size (by changing class to -1) |
reduce.group.selection |
(OLD! - use culling modules) Selection criteria for reduction of groups (cf. selection.m / selection.f - default: "random") |
new.bv.child |
(OLD! - use phenotyping.child) Starting phenotypes of newly generated individuals (default: "zero", alt: "mean" of both parents, "obs" - regular observation) |
computation.A |
(OLD! - use relationship.matrix) Method to calculate relationship matrix for the breeding value estimation (Default: "vanRaden", alt: "pedigree", "CE", "non_stand", "CE2", "CM") |
computation.A.ogc |
(OLD! use relationship.matrix.ogc) Method to calculate pedigree matrix in OGC (Default: "pedigree", alt: "vanRaden", "CE", "non_stand", "CE2", "CM") |
new.phenotype.correlation |
(OLD! - use new.residual.correlation!) Correlation of the simulated enviromental variance |
offspring.bve.parents.gen, offspring.bve.parents.cohorts, offspring.bve.parents.database
|
(OLD! use offpheno.parents.gen/database/cohorts) Generations/cohorts/groups to consider to derive phenotype from offspring phenotypes |
offspring.bve.offspring.gen, offspring.bve.offspring.cohorts, offspring.bve.offspring.database
|
(OLD! use offpheno.offspring.gen/database/cohorts) Active generations/cohorts/groups for import of offspring phenotypes |
input.phenotype |
(OLD! use bve.input.phenotype) Select what to use in BVE (default: own phenotype ("own"), offspring phenotype ("off"), their average ("mean") or a weighted average ("weighted")) |
multiple.bve.weights.m, multiple.bve.weights.f
|
(OLD! use selection.index.weights.m/f) Weighting between traits (default: 1) |
multiple.bve.scale.m, multiple.bve.scale.f
|
(OLD! use selection.index.scale.m/f) Default: "bv_sd"; Set to "pheno_sd" when using gains per phenotypic SD, "unit" when using gains per unit, "bve" when using estimated breeding values |
use.recalculate.manual |
Set to TRUE to use recalculate.manual to calculate genomic values (all individuals and traits jointly, default: FALSE) |
recalculate.manual.subset |
Maximum number of individuals to process at the same time (( genotypes are in memory )) |
compute.grandparent.contribution |
compute share of genome inherited from each grandparent based on recombination points (default: FALSE) |
size.scaling |
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) |
parallel.internal |
Internal parameter for the parallelization |
varg |
Experimental parameter for Tobias Niehoff (do not touch!) |
gain.stats |
Set to FALSE to not compute genetic gains compared to previous generation (selection) |
next.id |
Id to assign to first next individual generated |
copy.individual.use, copy.individual.use2
|
Use this to skip copying some entries from the internal storage ((minor speed up)) |
Population-list
population <- creating.diploid(nsnp=1000, nindi=100) population <- breeding.diploid(population, breeding.size=100, selection.size=c(25,25))population <- creating.diploid(nsnp=1000, nindi=100) population <- breeding.diploid(population, breeding.size=100, selection.size=c(25,25))
Internal function to simulate one meiosis
breeding.intern( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = FALSE, rt_activ = FALSE, grandsib_activ = FALSE )breeding.intern( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = FALSE, rt_activ = FALSE, grandsib_activ = FALSE )
info.parent |
position of the parent in the dataset |
parent |
list of information regarding the parent |
population |
Population list |
mutation.rate |
Mutation rate in each marker (default: 10^-5) |
remutation.rate |
Remutation rate in each marker (default: 10^-5) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
gene.editing |
If TRUE perform gene editing on newly generated individual |
nr.edits |
Number of edits to perform per individual |
gen.architecture |
Used underlying genetic architecture (genome length in M) |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
dup_activ |
Internal parameter to check if duplications have to be simulated |
rt_activ |
Internal parameter to check if RTs have to be simulated |
grandsib_activ |
Internal parameter to check if grandsibling contributions have to be calculated |
Inherited parent gamete
data(ex_pop) child_gamete <- breeding.intern(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)data(ex_pop) child_gamete <- breeding.intern(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)
Internal function to simulate one meiosis
breeding.intern1( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )breeding.intern1( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )
info.parent |
position of the parent in the dataset |
parent |
list of information regarding the parent |
population |
Population list |
mutation.rate |
Mutation rate in each marker (default: 10^-5) |
remutation.rate |
Remutation rate in each marker (default: 10^-5) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
gene.editing |
If TRUE perform gene editing on newly generated individual |
nr.edits |
Number of edits to perform per individual |
gen.architecture |
Used underlying genetic architecture (genome length in M) |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
dup_activ |
Internal parameter to check if duplications have to be simulated |
rt_activ |
Internal parameter to check if RTs have to be simulated |
grandsib_activ |
Internal parameter to check if grandsibling contributions have to be calculated |
Inherited parent gamete
data(ex_pop) child_gamete <- breeding.intern(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)data(ex_pop) child_gamete <- breeding.intern(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)
Internal function to simulate one meiosis
breeding.intern2( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )breeding.intern2( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )
info.parent |
position of the parent in the dataset |
parent |
list of information regarding the parent |
population |
Population list |
mutation.rate |
Mutation rate in each marker (default: 10^-5) |
remutation.rate |
Remutation rate in each marker (default: 10^-5) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
gene.editing |
If TRUE perform gene editing on newly generated individual |
nr.edits |
Number of edits to perform per individual |
gen.architecture |
Used underlying genetic architecture (genome length in M) |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
dup_activ |
Internal parameter to check if duplications have to be simulated |
rt_activ |
Internal parameter to check if RTs have to be simulated |
grandsib_activ |
Internal parameter to check if grandsibling contributions have to be calculated |
Inherited parent gamete
data(ex_pop) child_gamete <- breeding.intern2(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)data(ex_pop) child_gamete <- breeding.intern2(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)
Internal function to simulate one meiosis
breeding.intern3( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )breeding.intern3( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )
info.parent |
position of the parent in the dataset |
parent |
list of information regarding the parent |
population |
Population list |
mutation.rate |
Mutation rate in each marker (default: 10^-5) |
remutation.rate |
Remutation rate in each marker (default: 10^-5) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
gene.editing |
If TRUE perform gene editing on newly generated individual |
nr.edits |
Number of edits to perform per individual |
gen.architecture |
Used underlying genetic architecture (genome length in M) |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
dup_activ |
Internal parameter to check if duplications have to be simulated |
rt_activ |
Internal parameter to check if RTs have to be simulated |
grandsib_activ |
Internal parameter to check if grandsibling contributions have to be calculated |
Inherited parent gamete
data(ex_pop) child_gamete <- breeding.intern3(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)data(ex_pop) child_gamete <- breeding.intern3(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)
Internal function to simulate one meiosis
breeding.intern4( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )breeding.intern4( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )
info.parent |
position of the parent in the dataset |
parent |
list of information regarding the parent |
population |
Population list |
mutation.rate |
Mutation rate in each marker (default: 10^-5) |
remutation.rate |
Remutation rate in each marker (default: 10^-5) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
gene.editing |
If TRUE perform gene editing on newly generated individual |
nr.edits |
Number of edits to perform per individual |
gen.architecture |
Used underlying genetic architecture (genome length in M) |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
dup_activ |
Internal parameter to check if duplications have to be simulated |
rt_activ |
Internal parameter to check if RTs have to be simulated |
grandsib_activ |
Internal parameter to check if grandsibling contributions have to be calculated |
Inherited parent gamete
data(ex_pop) child_gamete <- breeding.intern4(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)data(ex_pop) child_gamete <- breeding.intern4(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)
Internal function to simulate one meiosis
breeding.intern5( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )breeding.intern5( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )
info.parent |
position of the parent in the dataset |
parent |
list of information regarding the parent |
population |
Population list |
mutation.rate |
Mutation rate in each marker (default: 10^-5) |
remutation.rate |
Remutation rate in each marker (default: 10^-5) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
gene.editing |
If TRUE perform gene editing on newly generated individual |
nr.edits |
Number of edits to perform per individual |
gen.architecture |
Used underlying genetic architecture (genome length in M) |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
dup_activ |
Internal parameter to check if duplications have to be simulated |
rt_activ |
Internal parameter to check if RTs have to be simulated |
grandsib_activ |
Internal parameter to check if grandsibling contributions have to be calculated |
Inherited parent gamete
data(ex_pop) child_gamete <- breeding.intern5(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)data(ex_pop) child_gamete <- breeding.intern5(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)
Internal function to simulate one meiosis
breeding.intern6( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )breeding.intern6( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )
info.parent |
position of the parent in the dataset |
parent |
list of information regarding the parent |
population |
Population list |
mutation.rate |
Mutation rate in each marker (default: 10^-5) |
remutation.rate |
Remutation rate in each marker (default: 10^-5) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
gene.editing |
If TRUE perform gene editing on newly generated individual |
nr.edits |
Number of edits to perform per individual |
gen.architecture |
Used underlying genetic architecture (genome length in M) |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
dup_activ |
Internal parameter to check if duplications have to be simulated |
rt_activ |
Internal parameter to check if RTs have to be simulated |
grandsib_activ |
Internal parameter to check if grandsibling contributions have to be calculated |
Inherited parent gamete
data(ex_pop) child_gamete <- breeding.intern6(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)data(ex_pop) child_gamete <- breeding.intern6(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)
Internal function to simulate one meiosis
breeding.intern7( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )breeding.intern7( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )
info.parent |
position of the parent in the dataset |
parent |
list of information regarding the parent |
population |
Population list |
mutation.rate |
Mutation rate in each marker (default: 10^-5) |
remutation.rate |
Remutation rate in each marker (default: 10^-5) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
gene.editing |
If TRUE perform gene editing on newly generated individual |
nr.edits |
Number of edits to perform per individual |
gen.architecture |
Used underlying genetic architecture (genome length in M) |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
dup_activ |
Internal parameter to check if duplications have to be simulated |
rt_activ |
Internal parameter to check if RTs have to be simulated |
grandsib_activ |
Internal parameter to check if grandsibling contributions have to be calculated |
Inherited parent gamete
data(ex_pop) child_gamete <- breeding.intern7(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)data(ex_pop) child_gamete <- breeding.intern7(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)
Internal function to simulate one meiosis
breeding.intern8( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )breeding.intern8( info.parent, parent, population, mutation.rate = 10^-5, remutation.rate = 10^-5, recombination.rate = 1, recom.f.indicator = NULL, duplication.rate = 0, duplication.length = 0.01, duplication.recombination = 1, delete.same.origin = FALSE, gene.editing = FALSE, nr.edits = 0, gen.architecture = 0, decodeOriginsU = MoBPS::decodeOriginsR, recombination.function = MoBPS::recombination.function.haldane, dup_activ = TRUE, rt_activ = TRUE, grandsib_activ = TRUE )
info.parent |
position of the parent in the dataset |
parent |
list of information regarding the parent |
population |
Population list |
mutation.rate |
Mutation rate in each marker (default: 10^-5) |
remutation.rate |
Remutation rate in each marker (default: 10^-5) |
recombination.rate |
Average number of recombination per 1 length unit (default: 1M) |
recom.f.indicator |
Use step function for recombination map (transform snp.positions if possible instead) |
duplication.rate |
Share of recombination points with a duplication (default: 0 - DEACTIVATED) |
duplication.length |
Average length of a duplication (Exponentially distributed) |
duplication.recombination |
Average number of recombinations per 1 length uit of duplication (default: 1) |
delete.same.origin |
If TRUE delete recombination points when genetic origin of adjacent segments is the same |
gene.editing |
If TRUE perform gene editing on newly generated individual |
nr.edits |
Number of edits to perform per individual |
gen.architecture |
Used underlying genetic architecture (genome length in M) |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
recombination.function |
Function used to calculate position of recombination events (default: MoBPS::recombination.function.haldane()) |
dup_activ |
Internal parameter to check if duplications have to be simulated |
rt_activ |
Internal parameter to check if RTs have to be simulated |
grandsib_activ |
Internal parameter to check if grandsibling contributions have to be calculated |
Inherited parent gamete
data(ex_pop) child_gamete <- breeding.intern8(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)data(ex_pop) child_gamete <- breeding.intern8(info.parent = c(1,1,1), parent = ex_pop$breeding[[1]][[1]][[1]], population = ex_pop)
Function to plot genetic/breeding values for multiple generation/cohorts
bv.development( population, database = NULL, gen = NULL, cohorts = NULL, confidence = c(1, 2, 3), development = c(1, 2, 3), quantile = 0.95, bvrow = "all", ignore.zero = TRUE, json = FALSE, display.time.point = FALSE, display.creating.type = FALSE, display.cohort.name = FALSE, display.sex = FALSE, equal.spacing = FALSE, time_reorder = FALSE, display.line = TRUE, ylim = NULL, fix_mfrow = FALSE )bv.development( population, database = NULL, gen = NULL, cohorts = NULL, confidence = c(1, 2, 3), development = c(1, 2, 3), quantile = 0.95, bvrow = "all", ignore.zero = TRUE, json = FALSE, display.time.point = FALSE, display.creating.type = FALSE, display.cohort.name = FALSE, display.sex = FALSE, equal.spacing = FALSE, time_reorder = FALSE, display.line = TRUE, ylim = NULL, fix_mfrow = FALSE )
population |
population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
confidence |
Draw confidence intervals for (1- bv, 2- bve, 3- pheno; default: c(1,2,3)) |
development |
Include development of (1- bv, 2- bve, 3- pheno; default: c(1,2,3)) |
quantile |
Quantile of the confidence interval to draw (default: 0.05) |
bvrow |
Which traits to display (for multiple traits separate plots (par(mfrow))) |
ignore.zero |
Cohorts with only 0 individuals are not displayed (default: TRUE) |
json |
If TRUE extract which cohorts to plot according to the json-file used in json.simulation |
display.time.point |
Set TRUE to use time point of generated to sort groups |
display.creating.type |
Set TRUE to show Breedingtype used in generation (web-interface) |
display.cohort.name |
Set TRUE to display the name of the cohort in the x-axis |
display.sex |
Set TRUE to display the creating.type (Shape of Points - web-based-application) |
equal.spacing |
Equal distance between groups (independent of time.point) |
time_reorder |
Set TRUE to order cohorts according to the time point of generation |
display.line |
Set FALSE to not display the line connecting cohorts |
ylim |
Set this to fix the y-axis of the plot |
fix_mfrow |
Set TRUE to not use mfrow - use for custom plots |
Genomic values of selected gen/database/cohort
data(ex_pop) bv.development(ex_pop, gen=1:5)data(ex_pop) bv.development(ex_pop, gen=1:5)
Function to plot genetic/breeding values for multiple generation/cohorts using box plots
bv.development.box( population, database = NULL, gen = NULL, cohorts = NULL, bvrow = "all", json = FALSE, display = "bv", display.selection = FALSE, display.reproduction = FALSE, ylim = NULL, fix_mfrow = FALSE )bv.development.box( population, database = NULL, gen = NULL, cohorts = NULL, bvrow = "all", json = FALSE, display = "bv", display.selection = FALSE, display.reproduction = FALSE, ylim = NULL, fix_mfrow = FALSE )
population |
population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
bvrow |
Which traits to display (for multiple traits separate plots (par(mfrow))) |
json |
If TRUE extract which cohorts to plot according to the json-file used in json.simulation |
display |
Choose between "bv", "pheno", "bve" (default: "bv") |
display.selection |
Display lines between generated cohorts via selection (webinterface) |
display.reproduction |
Display lines between generated cohorts via reproduction (webinterface) |
ylim |
Set this to fix the y-axis of the plot |
fix_mfrow |
Set TRUE to not use mfrow - use for custom plots |
Genomic values of selected gen/database/cohort
data(ex_pop) bv.development.box(ex_pop, gen=1:5)data(ex_pop) bv.development.box(ex_pop, gen=1:5)
Function to get mean and genetic variance of a trait to a fixed value
bv.standardization( population, mean.target = NA, var.target = NA, gen = NULL, database = NULL, cohorts = NULL, adapt.bve = TRUE, adapt.pheno = NULL, verbose = FALSE, set.zero = FALSE, adapt.sigma.e = FALSE, traits = NULL )bv.standardization( population, mean.target = NA, var.target = NA, gen = NULL, database = NULL, cohorts = NULL, adapt.bve = TRUE, adapt.pheno = NULL, verbose = FALSE, set.zero = FALSE, adapt.sigma.e = FALSE, traits = NULL )
population |
Population list |
mean.target |
Target mean |
var.target |
Target variance |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
adapt.bve |
Modify previous breeding value estimations by scaling (default: TRUE) |
adapt.pheno |
Modify previous phenotypes by scaling (default: TRUE) |
verbose |
Set to TRUE to display prints |
set.zero |
Set to TRUE to have no effect on the 0 genotype (or 00 for QTLs with 2 underlying SNPs) |
adapt.sigma.e |
Set to TRUE to scale sigma.e values used based on scaling |
traits |
Use this parameter to only perform scaling of these traits (alternatively set values in mean/var.target to NA, default: all traits) |
Population-list with scaled QTL-effects
population <- creating.diploid(nsnp=1000, nindi=100, n.additive=100) population <- bv.standardization(population, mean.target=200, var.target=5)population <- creating.diploid(nsnp=1000, nindi=100, n.additive=100) population <- bv.standardization(population, mean.target=200, var.target=5)
Internal function to calculate the breeding value of a given individual
calculate.bv( population, gen, sex, nr, activ_bv, import.position.calculation = NULL, decodeOriginsU = decodeOriginsR, store.effect.freq = FALSE, bit.storing = FALSE, nbits = 30, output_compressed = FALSE, bv.ignore.traits = NULL )calculate.bv( population, gen, sex, nr, activ_bv, import.position.calculation = NULL, decodeOriginsU = decodeOriginsR, store.effect.freq = FALSE, bit.storing = FALSE, nbits = 30, output_compressed = FALSE, bv.ignore.traits = NULL )
population |
Population list |
gen |
Generation of the individual of interest |
sex |
Sex of the individual of interest |
nr |
Number of the individual of interest |
activ_bv |
traits to consider |
import.position.calculation |
Function to calculate recombination point into adjacent/following SNP |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
store.effect.freq |
If TRUE store the allele frequency of effect markers per generation |
bit.storing |
Set to TRUE if the MoBPS (not-miraculix! bit-storing is used) |
nbits |
Bits available in MoBPS-bit-storing |
output_compressed |
Set to TRUE to get a miraculix-compressed genotype/haplotype |
bv.ignore.traits |
Vector of traits to ignore in the calculation of the genomic value (default: NULL; Only recommended for high number of traits and experienced users!) |
[[1]] true genomic value [[2]] allele frequency at QTL markers
data(ex_pop) calculate.bv(ex_pop, gen=1, sex=1, nr=1, activ_bv = 1)data(ex_pop) calculate.bv(ex_pop, gen=1, sex=1, nr=1, activ_bv = 1)
Genome for cattle according to Ma et al.
cattle_chipcattle_chip
Torsten Pook [email protected]
Ma et al 2015
Internal function to check the relatedness between two individuals
check.parents( population, info.father, info.mother, max.rel = 2, avoid.mating.parent = FALSE, still.check = FALSE )check.parents( population, info.father, info.mother, max.rel = 2, avoid.mating.parent = FALSE, still.check = FALSE )
population |
Population list |
info.father |
position of the first parent in the dataset |
info.mother |
position of the second parent in the dataset |
max.rel |
maximal allowed relationship (default: 2, alt: 1 no full-sibs, 0 no half-sibs) |
avoid.mating.parent |
Set to TRUE to avoid matings of an individual to its parents |
still.check |
Internal parameter (avoid.mating.parent check) |
logical with TRUE if relatedness does not exceed max.rel / FALSE otherwise.
data(ex_pop) check.parents(ex_pop, info.father=c(4,1,1,1), info.mother=c(4,2,1,1))data(ex_pop) check.parents(ex_pop, info.father=c(4,1,1,1), info.mother=c(4,2,1,1))
Genome for chicken according to Groenen et al.
chicken_chipchicken_chip
Torsten Pook [email protected]
Groenen et al 2009
Function to remove recombination points + origins with no influence on markers
clean.up(population, gen = "all", database = NULL, cohorts = NULL)clean.up(population, gen = "all", database = NULL, cohorts = NULL)
population |
Population list |
gen |
Generations to clean up (default: "current") |
database |
Groups of individuals to consider |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
Population-list with deleted irrelevant recombination points
data(ex_pop) ex_pop <- clean.up(ex_pop)data(ex_pop) ex_pop <- clean.up(ex_pop)
R-Version of the internal bitwise-coding of origins
codeOriginsR(M)codeOriginsR(M)
M |
Origins matrix |
Bit-wise coded origins
codeOriginsR(cbind(1,1,1,1))codeOriginsR(cbind(1,1,1,1))
Function to combine traits in the BVE
combine.traits( population, combine.traits = NULL, combine.name = NULL, remove.combine = NULL, remove.all = FALSE )combine.traits( population, combine.traits = NULL, combine.name = NULL, remove.combine = NULL, remove.all = FALSE )
population |
Population list |
combine.traits |
Vector containing the traits (numbers) to combine into a joined trait |
combine.name |
Name of the combined trait |
remove.combine |
Remove a selected previously generated combined trait |
remove.all |
Set TRUE to remove all previously generated combined traits |
Population-list
population <- creating.diploid(nsnp=100, nindi=100, n.additive = c(50,50)) population <- combine.traits(population, combine.traits=1:2) population <- breeding.diploid(population, bve=TRUE, phenotyping.gen=1, heritability=0.3)population <- creating.diploid(nsnp=100, nindi=100, n.additive = c(50,50)) population <- combine.traits(population, combine.traits=1:2) population <- breeding.diploid(population, bve=TRUE, phenotyping.gen=1, heritability=0.3)
Function to derive the costs of a breeding program / population-list
computing.costs( population, phenotyping.costs = 10, genotyping.costs = 100, fix.costs = 0, fix.costs.annual = 0, profit.per.bv = 1, database = NULL, gen = NULL, cohorts = NULL, interest.rate = 1, base.gen = 1 )computing.costs( population, phenotyping.costs = 10, genotyping.costs = 100, fix.costs = 0, fix.costs.annual = 0, profit.per.bv = 1, database = NULL, gen = NULL, cohorts = NULL, interest.rate = 1, base.gen = 1 )
population |
population-list |
phenotyping.costs |
Costs for the generation of a phenotype |
genotyping.costs |
Costs for the generation of a genotype |
fix.costs |
one time occurring fixed costs |
fix.costs.annual |
annually occurring fixed costs |
profit.per.bv |
profit generated by bv per animal |
database |
Groups of individuals to consider |
gen |
Quick-insert for database (vector of all generations to consider) |
cohorts |
Quick-insert for database (vector of names of cohorts to consider) |
interest.rate |
Applied yearly interest rate |
base.gen |
Base generation (application of interest rate) |
Cost-table for selected gen/database/cohorts of a population-list
data(ex_pop) computing.costs(ex_pop, gen=1:5)data(ex_pop) computing.costs(ex_pop, gen=1:5)
Function to derive the costs of a breeding program / population-list by cohorts
computing.costs.cohorts( population, gen = NULL, database = NULL, cohorts = NULL, json = TRUE, phenotyping.costs = NULL, genotyping.costs = 0, housing.costs = NULL, fix.costs = 0, fix.costs.annual = 0, profit.per.bv = 1, interest.rate = 1, verbose = TRUE )computing.costs.cohorts( population, gen = NULL, database = NULL, cohorts = NULL, json = TRUE, phenotyping.costs = NULL, genotyping.costs = 0, housing.costs = NULL, fix.costs = 0, fix.costs.annual = 0, profit.per.bv = 1, interest.rate = 1, verbose = TRUE )
population |
population-list |
gen |
Quick-insert for database (vector of all generations to consider) |
database |
Groups of individuals to consider |
cohorts |
Quick-insert for database (vector of names of cohorts to consider) |
json |
If TRUE extract which cohorts to plot according to the json-file used in json.simulation |
phenotyping.costs |
Costs for the generation of a phenotype |
genotyping.costs |
Costs for the generation of a genotype |
housing.costs |
Costs for housing |
fix.costs |
one time occurring fixed costs |
fix.costs.annual |
annually occurring fixed costs |
profit.per.bv |
profit generated by bv per animal |
interest.rate |
Applied yearly interest rate |
verbose |
Set to FALSE to not display any prints |
Cost-table for selected gen/database/cohorts of a population-list
data(ex_pop) computing.costs.cohorts(ex_pop, gen=1:5, genotyping.costs=25, json=FALSE)data(ex_pop) computing.costs.cohorts(ex_pop, gen=1:5, genotyping.costs=25, json=FALSE)
Internal function for the computation of genotypes & haplotypes
computing.snps( population, gen, sex, nr, faster = TRUE, import.position.calculation = NULL, from_p = 1, to_p = Inf, decodeOriginsU = decodeOriginsR, bit.storing = FALSE, nbits = 30, output_compressed = FALSE )computing.snps( population, gen, sex, nr, faster = TRUE, import.position.calculation = NULL, from_p = 1, to_p = Inf, decodeOriginsU = decodeOriginsR, bit.storing = FALSE, nbits = 30, output_compressed = FALSE )
population |
Population list |
gen |
Generation of the individual to compute |
sex |
Gender of the individual to compute |
nr |
Number of the individual to compute |
faster |
If FALSE use slower version to compute markers between recombination points |
import.position.calculation |
Function to calculate recombination point into adjacent/following SNP |
from_p |
First SNP to consider |
to_p |
Last SNP to consider |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
bit.storing |
Set to TRUE if the MoBPS (not-miraculix! bit-storing is used) |
nbits |
Bits available in MoBPS-bit-storing |
output_compressed |
Set to TRUE to get a miraculix-compressed genotype/haplotype |
haplotypes for the selected individual
data(ex_pop) computing.snps(ex_pop, gen=1, sex=1, nr=1)data(ex_pop) computing.snps(ex_pop, gen=1, sex=1, nr=1)
Internal function for the computation of genotypes & haplotypes in gene editing application
computing.snps_single( population, current.recombi, current.mut, current.ursprung, faster = TRUE, import.position.calculation = NULL, decodeOriginsU = decodeOriginsR )computing.snps_single( population, current.recombi, current.mut, current.ursprung, faster = TRUE, import.position.calculation = NULL, decodeOriginsU = decodeOriginsR )
population |
Population list |
current.recombi |
vector of currently activ recombination points |
current.mut |
vector of currently activ mutations |
current.ursprung |
vector of currently activ origins |
faster |
If FALSE use slower version to compute markers between recombination points |
import.position.calculation |
Function to calculate recombination point into adjacent/following SNP |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
haplotypes for the selected individual
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 )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 |
Population list |
nsnp |
Number of markers to generate (Split equally across chromosomes (chr.nr) unless vector is used) |
nindi |
Number of individuals to generate (you can also provide number males / females in a vector) |
nqtl |
Number of QTLs to generate (this will be a subset of the generated SNPs; default: NULL; all SNPs are potential QTLs) |
name.cohort |
Name of the newly added cohort |
generation |
Generation to which newly individuals are added (default: 1) |
founder.pool |
Founder pool an individual is assign to (default: 1) |
one.sex.mode |
Activating this will ignore all sex specific parameters and handle each individual as part of the first sex (default: FALSE) |
database.sex.mode |
Set TRUE to automatically remove females in selection.m and remove males in selection.f |
sex.s |
Specify which newly added individuals are male (1) or female (2) |
sex.quota |
Share of newly added female individuals (deterministic if sex.s="fixed", alt: sex.s="random") |
class |
Migration level of the newly added individuals (default: 0) |
verbose |
Set to FALSE to not display any prints |
map |
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() |
chr.nr |
Number of chromosomes (SNPs are equally split) or vector containing the associated chromosome for each marker |
chromosome.length |
Length of the newly added chromosome in Morgan; can be a vector when generating multiple chromosomes (default: 5) |
bp |
Vector containing the physical position (bp) for each marker (default: 1,2,3...) |
snps.equidistant |
Use equidistant markers (computationally faster! ; default: TRUE) |
template.chip |
Import genetic map and chip from a species ("cattle", "chicken", "pig") |
snp.position |
Location of each marker on the genetic map |
change.order |
Markers are automatically sorted according to their snp.position unless this is set to FALSE (default: TRUE) |
add.chromosome |
If TRUE add an additional chromosome to the population |
bpcm.conversion |
Convert physical position (bp) into a cM position (default: 0 - not done) |
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) |
dataset |
SNP dataset, use "random", "allhetero" "all0" when generating a dataset via nsnp,nindi |
freq |
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) |
beta.shape1 |
First parameter of the beta distribution for simulating allele frequencies |
beta.shape2 |
Second parameter of the beta distribution for simulating allele frequencies |
share.genotyped |
Share of individuals genotyped in the founders |
genotyped.s |
Specify with newly added individuals are genotyped (1) or not (0) |
vcf |
Path to a vcf-file used as input genotypes (correct haplotype phase is assumed!) |
vcf.maxsnp |
Maximum number of SNPs to include in the genotype file (default: Inf) |
vcf.maxindi |
Maximum number of individuals to include in the genotype file (default: Inf) |
vcf.chromosomes |
Vector of chromosomes to import from vcf. Use on bgziped and tabixed vcf only. (default: NULL - all chromosomes) |
vcf.VA |
Use the VariantAnnotation package to load in a vcf file when available (default: TRUE) |
trait.name |
Name of the traits generated |
mean.target |
Target mean for each trait |
var.target |
Target variance for each trait |
qtl.position.shared |
Set to TRUE to put QTL effects on the same markers for different traits |
trait.cor |
Target correlation between QTL-based traits (underlying true genomic values) |
trait.cor.include |
Vector of traits to be included in the modelling of correlated traits (default: all - needs to match with trait.cor) |
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 dominant QTL with equal effect size |
n.overdominant |
Number of overdominant QTL with effect size drawn from absolute value of a gaussian distribution |
n.equal.overdominant |
Number of overdominant QTL with equal effect size |
n.qualitative |
Number of qualitative epistatic QTL |
n.quantitative |
Number of quantitative epistatic QTL |
effect.distribution |
Set to "gamma" for gamma distribution effects with gamma.shape1, gamma.shape2 instead of gaussian (default: "gauss") |
gamma.shape1 |
Default: 1 |
gamma.shape2 |
Default: 1 |
real.bv.add |
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)) |
real.bv.mult |
Two Marker effects |
real.bv.dice |
Multi-marker effects |
new.residual.correlation |
Correlation of the simulated enviromental variance |
new.breeding.correlation |
Correlation of the simulated genetic variance (child share! heritage is not influenced! |
litter.effect.covariance |
Covariance matrix of the litter effect (default: no effects) |
pen.effect.covariance |
Covariance matrix of the pen effect (default: no effects) |
is.maternal |
Vector coding if a trait is caused by a maternal effect (Default: FALSE) |
is.paternal |
Vector coding if a trait is caused by a paternal effect (Default: FALSE) |
fixed.effects |
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)) |
trait.pool |
Vector providing information for which pools QTLs of which trait are activ (default: 0 - all pools) |
gxe.correlation |
Correlation matrix between locations / environments (default: only one location, sampled from gxe.max / gxe.min) |
n.locations |
Number of locations / environments to consider for the GxE model |
gxe.max |
Maximum correlation between locations / environments when generating correlation matrix via sampling (default: 0.85) |
gxe.min |
Minimum correlation between locations / environments when generating correlation matrix via sampling (default: 0.70) |
location.name |
Same of the different locations / environments used |
gxe.combine |
Set to FALSE to not view the same trait from different locations / environments as the sample trait in the prediction model (default: TRUE) |
n.traits |
Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL) |
base.bv |
Intercept of underlying true genomic values (excluding all QTL effects, default: 100) |
dominant.only.positive |
Set to TRUE to always assign the heterozygous variant with the higher of the two homozygous effects (e.g. hybrid breeding); default: FALSE |
exclude.snps |
Vector contain markers on which no QTL effects are placed |
var.additive.l |
Variance of additive QTL |
var.dominant.l |
Variance of dominante QTL |
var.overdominant.l |
Variance of overdominante 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 |
effect.size.equal.over |
Effect size of the QTLs in n.equal.overdominant |
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 |
set.zero |
Set to TRUE to have no effect on the 0 genotype (or 00 for QTLs with 2 underlying SNPs) |
bv.standard |
Set TRUE to standardize trait mean and variance via bv.standardization() - automatically set to TRUE when mean/var.target are used |
replace.real.bv |
If TRUE delete the simulated traits added before |
bv.ignore.traits |
Vector of traits to ignore in the calculation of the genomic value (default: NULL; Only recommended for high number of traits and experienced users!) |
remove.invalid.qtl |
Set to FALSE to deactive the automatic removal of QTLs on markers that do not exist |
randomSeed |
Set random seed of the process |
add.architecture |
Add genetic architecture (marker positions) |
time.point |
Time point at which the new individuals are generated |
creating.type |
Technique to generate new individuals (usage in web-based application) |
size.scaling |
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) |
progress.bar |
Set to FALSE to not use progress bars in any application of breeding.diploid() downstream (Keep log-files lean!) |
miraculix |
If TRUE use miraculix package for data storage, computations and dataset generation |
miraculix.dataset |
Set FALSE to deactivate miraculix package for dataset generation |
add.chromosome.ends |
Add chromosome ends as recombination points |
use.recalculate.manual |
Set to TRUE to use recalculate.manual to calculate genomic values (all individuals and traits jointly, default: FALSE) |
store.comp.times |
Set to FALSE to not store computing times needed to execute creating.diploid in $info$comp.times.creating |
skip.rest |
Internal variable needed when adding multiple chromosomes jointly |
enter.bv |
Internal parameter |
internal |
Do not touch! |
internal.geno |
Do not touch! |
internal.dataset |
Do not touch! |
nbits |
Bits available in MoBPS-bit-storing |
bit.storing |
Set to TRUE if the MoBPS (not-miraculix! bit-storing is used) |
new.phenotype.correlation |
(OLD! - use new.residual.correlation) Correlation of the simulated enviromental variance |
length.before |
Length before the first SNP of the dataset (default: 5) |
length.behind |
Length after the last SNP of the dataset (default: 5) |
position.scaling |
Manual scaling of snp.position |
shuffle.cor |
OLD! Use trait.cor - Target Correlation between traits |
shuffle.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) |
bv.total |
OLD! Use n.traits instead. Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL) |
Population-list
population <- creating.diploid(nsnp=1000, nindi=100)population <- creating.diploid(nsnp=1000, nindi=100)
Function to perform create a transformation of phenotypes
creating.phenotypic.transform( population, phenotypic.transform.function = NULL, trait = 1, test.h2 = TRUE, gen = NULL, database = NULL, cohorts = NULL, h2 = seq(0.05, 0.5, by = 0.05), export.h2 = FALSE, n.sample = 1000 )creating.phenotypic.transform( population, phenotypic.transform.function = NULL, trait = 1, test.h2 = TRUE, gen = NULL, database = NULL, cohorts = NULL, h2 = seq(0.05, 0.5, by = 0.05), export.h2 = FALSE, n.sample = 1000 )
population |
Population list |
phenotypic.transform.function |
Phenotypic transformation to apply |
trait |
Trait for which a transformation is to be applied |
test.h2 |
Set to FALSE to not perform heritability check |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
h2 |
Vector of heritability input to test (before introducing noise from trafo; default: seq(0.05,0.5, by = 0.05)) |
export.h2 |
Set TRUE to export matrix of heritability before/after transformation |
n.sample |
Sample size to use in test.h2 (default: 1000) |
Population-list with a new phenotypic transformation function
data(ex_pop) trafo <- function(x){return(x^2)} population <- creating.phenotypic.transform(ex_pop, phenotypic.transform.function=trafo, n.sample = 100)data(ex_pop) trafo <- function(x){return(x^2)} population <- creating.phenotypic.transform(ex_pop, phenotypic.transform.function=trafo, n.sample = 100)
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 )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 |
Population list |
trait.name |
Name of the trait generated |
mean.target |
Target mean |
var.target |
Target variance |
qtl.position.shared |
Set to TRUE to put QTL effects on the same markers for different traits |
trait.cor |
Target correlation between QTL-based traits (underlying true genomic values) |
trait.cor.include |
Vector of traits to be included in the modelling of correlated traits (default: all - needs to match with trait.cor) |
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 dominant QTL with equal effect size |
n.overdominant |
Number of overdominant QTL with effect size drawn from absolute value of a gaussian distribution |
n.equal.overdominant |
Number of overdominant QTL with equal effect size |
n.qualitative |
Number of qualitative epistatic QTL |
n.quantitative |
Number of quantitative epistatic QTL |
effect.distribution |
Set to "gamma" for gamma distribution effects with gamma.shape1, gamma.shape2 instead of gaussian (default: "gauss") |
gamma.shape1 |
Default: 1 |
gamma.shape2 |
Default: 1 |
real.bv.add |
Single Marker effects |
real.bv.mult |
Two Marker effects |
real.bv.dice |
Multi-marker effects |
n.traits |
Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL) |
base.bv |
Average genetic value of a trait |
new.residual.correlation |
Correlation of the simulated enviromental variance |
new.breeding.correlation |
Correlation of the simulated genetic variance (child share! heritage is not influenced! |
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) |
fixed.effects |
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)) |
trait.pool |
Vector providing information for which pools QTLs of this trait are activ (default: 0 - all pools) |
gxe.correlation |
Correlation matrix between locations / environments (default: only one location, sampled from gxe.max / gxe.min) |
n.locations |
Number of locations / environments to consider for the GxE model |
gxe.max |
Maximum correlation between locations / environments when generating correlation matrix via sampling (default: 0.85) |
gxe.min |
Minimum correlation between locations / environments when generating correlation matrix via sampling (default: 0.70) |
location.name |
Same of the different locations / environments used |
gxe.combine |
Set to FALSE to not view the same trait from different locations / environments as the sample trait in the prediction model (default: TRUE) |
dominant.only.positive |
Set to TRUE to always assign the heterozygous variant with the higher of the two homozygous effects (e.g. hybrid breeding); default: FALSE |
exclude.snps |
Marker were no QTL are simulated on |
var.additive.l |
Variance of additive QTL |
var.dominant.l |
Variance of dominante QTL |
var.overdominant.l |
Variance of overdominante 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 |
effect.size.equal.over |
Effect size of the QTLs in n.equal.overdominant |
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 |
set.zero |
Set to TRUE to have no effect on the 0 genotype (or 00 for QTLs with 2 underlying SNPs) |
bv.standard |
Set TRUE to standardize trait mean and variance via bv.standardization() |
replace.traits |
If TRUE delete the simulated traits added before |
remove.invalid.qtl |
Set to FALSE to deactive the automatic removal of QTLs on markers that do not exist |
randomSeed |
Set random seed of the process |
verbose |
Set to FALSE to not display any prints |
use.recalculate.manual |
Set to TRUE to use recalculate.manual to calculate genomic values (all individuals and traits jointly, default: FALSE) |
new.phenotype.correlation |
(OLD! - use new.residual.correlation) Correlation of the simulated enviromental variance |
shuffle.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) |
shuffle.cor |
OLD! Use trait.cor - Target Correlation between traits |
bv.total |
OLD! Use n.traits instead. Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL) |
Population-list with one or more additional new traits
population <- creating.diploid(nsnp=1000, nindi=100) population <- creating.trait(population, n.additive=100)population <- creating.diploid(nsnp=1000, nindi=100) population <- creating.trait(population, n.additive=100)
R-Version of the internal bitwise-decoding of origins
decodeOriginsR(P, row)decodeOriginsR(P, row)
P |
coded origins vector |
row |
row to decode |
de-coded origins
decodeOriginsR(0L)decodeOriginsR(0L)
Internal function to decode all genotypes to non-miraculix objects
demiraculix(population)demiraculix(population)
population |
Population list |
Population list
# This is only relevant with the package miraculix is installed and used population <- creating.diploid(nsnp=100, nindi=50) population <- demiraculix(population)# This is only relevant with the package miraculix is installed and used population <- creating.diploid(nsnp=100, nindi=50) population <- demiraculix(population)
Internal function to derive the position of all individuals to consider for BVE/GWAS
derive.loop.elements( population, bve.database, bve.class, bve.avoid.duplicates, store.adding = FALSE, store.which.adding = FALSE, list.of.copys = FALSE )derive.loop.elements( population, bve.database, bve.class, bve.avoid.duplicates, store.adding = FALSE, store.which.adding = FALSE, list.of.copys = FALSE )
population |
Population list |
bve.database |
Groups of individuals to consider in breeding value estimation |
bve.class |
Consider only animals of those class classes in breeding value estimation (default: NULL - use all) |
bve.avoid.duplicates |
If set to FALSE multiple generatations of the same individual can be used in the bve (only possible by using copy.individual to generate individuals) |
store.adding |
Internal parameter to derive number of added individuals per database entry (only relevant internally for GWAS) |
store.which.adding |
Internal parameter to derive which individuals are copy entries |
list.of.copys |
Internal parameter to derive further information on the copies individuals |
Matrix of individuals in the entered database
data(ex_pop) derive.loop.elements(ex_pop, bve.database=get.database(ex_pop, gen=2), bve.class=NULL, bve.avoid.duplicates=TRUE)data(ex_pop) derive.loop.elements(ex_pop, bve.database=get.database(ex_pop, gen=2), bve.class=NULL, bve.avoid.duplicates=TRUE)
Function to add a genotyping array for the population
diag.mobps(elements)diag.mobps(elements)
elements |
vector with entries to put on the diagonal of a matrix |
Diagonal matrix
diag.mobps(5)diag.mobps(5)
Internal function to extract parental/child node of an edge
edges.fromto(edges)edges.fromto(edges)
edges |
Edges of the json-file generated via the web-interface |
Matrix of Parent/Child-nodes for the considered edges
Internal function to perform gene editing
edit_animal( population, gen, sex, nr, nr.edits, decodeOriginsU = decodeOriginsR, bit.storing = FALSE, nbits = 30 )edit_animal( population, gen, sex, nr, nr.edits, decodeOriginsU = decodeOriginsR, bit.storing = FALSE, nbits = 30 )
population |
Population list |
gen |
Generation of the individual to edit |
sex |
Gender of the individual to edit |
nr |
Number of the individual to edit |
nr.edits |
Number of edits to perform |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
bit.storing |
Set to TRUE if the MoBPS (not-miraculix! bit-storing is used) |
nbits |
Bits available in MoBPS-bit-storing |
animal after genome editing
Function to estimate marker effects
effect.estimate.add(geno, pheno, map = NULL, scaling = TRUE)effect.estimate.add(geno, pheno, map = NULL, scaling = TRUE)
geno |
genotype dataset (marker x individuals) |
pheno |
phenotype dataset (each phenotype in a row) |
map |
genomic map |
scaling |
Set FALSE to not perform variance scaling |
Empirical kinship matrix (IBD-based since Founders)
data(ex_pop) pheno <- get.pheno(ex_pop, gen=1:5) geno <- get.geno(ex_pop, gen=1:5) map <- get.map(ex_pop, use.snp.nr=TRUE) real.bv.add <- effect.estimate.add(geno, pheno, map)data(ex_pop) pheno <- get.pheno(ex_pop, gen=1:5) geno <- get.geno(ex_pop, gen=1:5) map <- get.map(ex_pop, use.snp.nr=TRUE) real.bv.add <- effect.estimate.add(geno, pheno, map)
Internal function to estimate the effective population size
effective.size(ld, dist, n)effective.size(ld, dist, n)
ld |
ld between markers |
dist |
distance between markers in Morgan |
n |
Population size |
Estimated effective population size
Internal function to perform martini test
epi(y, Z, G = NULL)epi(y, Z, G = NULL)
y |
y |
Z |
genomic information matrix |
G |
kinship matrix |
Estimated breeding values
Exemplary json-data
ex_jsonex_json
Torsten Pook [email protected]
Web-interface
Exemplary population-list
ex_popex_pop
Torsten Pook [email protected]
MoBPS
Function to extract if a cohort exists
exist.cohort(population, cohort)exist.cohort(population, cohort)
population |
Population list |
cohort |
Cohort to check if it is contained in the population list |
TRUE/FALSE
data(ex_pop) exist.cohort(ex_pop, cohort = "StrangeName_42") exist.cohort(ex_pop, cohort = "Cohort_1_M")data(ex_pop) exist.cohort(ex_pop, cohort = "StrangeName_42") exist.cohort(ex_pop, cohort = "Cohort_1_M")
Internal function for the detection on which chromosome each marker is
find.chromo(position, length.total)find.chromo(position, length.total)
position |
position in the genome |
length.total |
Length of each chromosome |
Chromosome the marker is part of
Internal function for the detection on which overall position each marker is
find.snpbefore(position, snp.position)find.snpbefore(position, snp.position)
position |
Position on the genome |
snp.position |
Position of the SNPs on the genome |
SNP-position of the target position
Function to generate founder genotypes
founder.simulation( nindi = 100, sex.quota = 0.5, nsnp = 0, n.gen = 100, nfinal = NULL, sex.quota.final = NULL, big.output = FALSE, plot = TRUE, display.progress = TRUE, depth.pedigree = 7, dataset = NULL, vcf = NULL, chr.nr = NULL, bp = NULL, snp.name = NULL, hom0 = NULL, hom1 = NULL, bpcm.conversion = 0, freq = "beta", sex.s = "fixed", chromosome.length = NULL, length.before = 5, length.behind = 5, snps.equidistant = NULL, snp.position = NULL, position.scaling = FALSE, bit.storing = FALSE, nbits = 30, randomSeed = NULL, miraculix = TRUE, miraculix.dataset = TRUE, template.chip = NULL, beta.shape1 = 1, beta.shape2 = 1, map = NULL, verbose = TRUE, vcf.maxsnp = Inf, plot.ld = TRUE, plot.allele.freq = TRUE, xlim = NULL, ylim = NULL, nclass = 20, ylim.af = NULL, mutation.rate = 10^-8, remutation.rate = 10^-8, estimate.ne = TRUE, estimate.ld = TRUE )founder.simulation( nindi = 100, sex.quota = 0.5, nsnp = 0, n.gen = 100, nfinal = NULL, sex.quota.final = NULL, big.output = FALSE, plot = TRUE, display.progress = TRUE, depth.pedigree = 7, dataset = NULL, vcf = NULL, chr.nr = NULL, bp = NULL, snp.name = NULL, hom0 = NULL, hom1 = NULL, bpcm.conversion = 0, freq = "beta", sex.s = "fixed", chromosome.length = NULL, length.before = 5, length.behind = 5, snps.equidistant = NULL, snp.position = NULL, position.scaling = FALSE, bit.storing = FALSE, nbits = 30, randomSeed = NULL, miraculix = TRUE, miraculix.dataset = TRUE, template.chip = NULL, beta.shape1 = 1, beta.shape2 = 1, map = NULL, verbose = TRUE, vcf.maxsnp = Inf, plot.ld = TRUE, plot.allele.freq = TRUE, xlim = NULL, ylim = NULL, nclass = 20, ylim.af = NULL, mutation.rate = 10^-8, remutation.rate = 10^-8, estimate.ne = TRUE, estimate.ld = TRUE )
nindi |
number of individuals to generate in a random dataset |
sex.quota |
Share of newly added female individuals (deterministic if sex.s="fixed", alt: sex.s="random") |
nsnp |
number of markers to generate in a random dataset |
n.gen |
Number of generations to simulate (default: 100) |
nfinal |
Number of final individuals to include (default: nindi) |
sex.quota.final |
Share of female individuals in the final generation |
big.output |
Set to TRUE to export map, population list and pedigree relationship |
plot |
Set to FALSE to not generate LD-decay plot and allele frequency spectrum |
display.progress |
Set FALSE to not display progress bars. Setting verbose to FALSE will automatically deactive progress bars |
depth.pedigree |
Depth of the pedigree in generations (default: 7) |
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 associated 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) |
freq |
frequency of allele 1 when randomly generating a dataset |
sex.s |
Specify which newly added individuals are male (1) or female (2) |
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) |
snps.equidistant |
Use equidistant markers (computationally faster! ; default: TRUE) |
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 |
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 |
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() |
verbose |
Set to FALSE to not display any prints |
vcf.maxsnp |
Maximum number of SNPs to include in the genotype file (default: Inf) |
plot.ld |
Set FALSE to not generate the LD plot (default; TRUE) |
plot.allele.freq |
Set FALSE to not generate the allele frequency spectrum plot (default: TRUE) |
xlim |
Axis limits for the x-axis in the LD plot (default: NULL) |
ylim |
Axis limits for the y-axis in the LD plot (default: NULL) |
nclass |
Number of classes to consider in the allele frequency spectrum plot (default: 20) |
ylim.af |
Axis limits for the allele frequency spectrum plot (default: NULL) |
mutation.rate |
Mutation rate in each marker (default: 10^-8) |
remutation.rate |
Remutation rate in each marker (default: 10^-8) |
estimate.ne |
Set to FALSE to not estimate the effective population size (default: TRUE) |
estimate.ld |
Set to FALSE to not estimate the ld decay (default: TRUE) |
population <- founder.simulation(nindi=100, nsnp=1000, n.gen=5)population <- founder.simulation(nindi=100, nsnp=1000, n.gen=5)
Function to generate a new individual
generation.individual( indexb, population, info_father_list, info_mother_list, copy.individual, mutation.rate, remutation.rate, recombination.rate, recom.f.indicator, duplication.rate, duplication.length, duplication.recombination, delete.same.origin, gene.editing, nr.edits, gen.architecture.m, gen.architecture.f, decodeOriginsU, current.gen, save.recombination.history, new.bv.child, dh.mating, share.genotyped, added.genotyped, genotyped.array, dh.sex, n.observation )generation.individual( indexb, population, info_father_list, info_mother_list, copy.individual, mutation.rate, remutation.rate, recombination.rate, recom.f.indicator, duplication.rate, duplication.length, duplication.recombination, delete.same.origin, gene.editing, nr.edits, gen.architecture.m, gen.architecture.f, decodeOriginsU, current.gen, save.recombination.history, new.bv.child, dh.mating, share.genotyped, added.genotyped, genotyped.array, dh.sex, n.observation )
indexb |
windows parallel internal test |
population |
windows parallel internal test |
info_father_list |
windows parallel internal test |
info_mother_list |
windows parallel internal test |
copy.individual |
windows parallel internal test |
mutation.rate |
windows parallel internal test |
remutation.rate |
windows parallel internal test |
recombination.rate |
windows parallel internal test |
recom.f.indicator |
windows parallel internal test |
duplication.rate |
windows parallel internal test |
duplication.length |
windows parallel internal test |
duplication.recombination |
windows parallel internal test |
delete.same.origin |
windows parallel internal test |
gene.editing |
windows parallel internal test |
nr.edits |
windows parallel internal test |
gen.architecture.m |
windows parallel internal test |
gen.architecture.f |
windows parallel internal test |
decodeOriginsU |
windows parallel internal test |
current.gen |
windows parallel internal test |
save.recombination.history |
windows parallel internal test |
new.bv.child |
windows parallel internal test |
dh.mating |
windows parallel internal test |
share.genotyped |
windows parallel internal test |
added.genotyped |
windows parallel internal test |
genotyped.array |
windows parallel internal test |
dh.sex |
windows parallel internal test |
n.observation |
windows parallel internal test |
Offspring individual
Function to generate admixture plots
get.admixture( population, geno = NULL, gen = NULL, database = NULL, cohorts = NULL, id = NULL, d = NULL, verbose = TRUE, plot = TRUE, sort = FALSE, sort.cutoff = 0.01 )get.admixture( population, geno = NULL, gen = NULL, database = NULL, cohorts = NULL, id = NULL, d = NULL, verbose = TRUE, plot = TRUE, sort = FALSE, sort.cutoff = 0.01 )
population |
Population list |
geno |
Manually provided genotype dataset to use instead of gen/database/cohorts |
gen |
Quick-insert for database (vector of all generations to consider) |
database |
Groups of individuals to consider |
cohorts |
Quick-insert for database (vector of names of cohorts to consider) |
id |
Individual IDs to search/collect in the database |
d |
dimensions to consider in admixture plot (default: automatically estimate a reasonable number) |
verbose |
Set to FALSE to not display any prints |
plot |
Set to FALSE to not generate an admixture plot |
sort |
Set to TRUE to sort individuals according to contributes from the first dimension |
sort.cutoff |
Skip individuals with contributions under this threshold (and use next dimension instead) data(ex_pop) get.admixture(ex_pop, gen=4:6, d=2, sort=TRUE) |
Matrix with admixture proportion
Function to derive age point for each individual (Same as time.point unless copy.individual is used for aging)
get.age.point( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.age.point( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Time point selected gen/database/cohorts-individuals are born
data(ex_pop) get.age.point(ex_pop, gen=2)data(ex_pop) get.age.point(ex_pop, gen=2)
Function to calculate allele frequencies
get.allele.freq( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL )get.allele.freq( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
Allele frequency of the alternative allele
data(ex_pop) get.allele.freq(ex_pop, gen = 1)data(ex_pop) get.allele.freq(ex_pop, gen = 1)
Function to export underlying true breeding values
get.bv( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.bv( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Genomic value of in gen/database/cohorts selected individuals
data(ex_pop) get.bv(ex_pop, gen=2)data(ex_pop) get.bv(ex_pop, gen=2)
Function to export estimated breeding values
get.bve( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.bve( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Estimated breeding value of in gen/database/cohorts selected individuals
data(ex_pop) get.bve(ex_pop, gen=2)data(ex_pop) get.bve(ex_pop, gen=2)
Function to derive the class for each individual
get.class( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.class( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Class of in gen/database/cohorts selected individuals
data(ex_pop) get.class(ex_pop, gen=2)data(ex_pop) get.class(ex_pop, gen=2)
Function to export cohort names for the population list
get.cohorts(population, extended = FALSE)get.cohorts(population, extended = FALSE)
population |
Population list |
extended |
extended cohorts |
List of all cohorts in the population-list
data(ex_pop) get.cohorts(ex_pop)data(ex_pop) get.cohorts(ex_pop)
Function to derive the internal ID given to each individual
get.cohorts.individual( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, keep.order = FALSE )get.cohorts.individual( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, keep.order = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names |
keep.order |
To not change order of individuals when ids are provided (default: TRUE) |
Individual ID for in gen/database/cohorts selected individuals
data(ex_pop) get.cohorts.individual(ex_pop, gen=2)data(ex_pop) get.cohorts.individual(ex_pop, gen=2)
Function to derive computing time required to generate input population list
get.computing.time( population, verbose = TRUE, extend = FALSE, per.call = FALSE )get.computing.time( population, verbose = TRUE, extend = FALSE, per.call = FALSE )
population |
Population list |
verbose |
Set to FALSE to not display any prints |
extend |
Set to TRUE to return computing times with detailled overview on generation and BVE (default: FALSE) |
per.call |
Set to TRUE to return computing times per call of breeding.diploid / creating.diploid() (default: FALSE) |
Computing times overview
data(ex_pop) get.computing.time(ex_pop)data(ex_pop) get.computing.time(ex_pop)
Function to derive creating type for each individual
get.creating.type( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.creating.type( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Creating type of in gen/database/cohorts selected individuals
data(ex_pop) get.creating.type(ex_pop, gen=2)data(ex_pop) get.creating.type(ex_pop, gen=2)
Function to derive time point of culling for each individual
get.culling.time( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, use.all.copy = TRUE )get.culling.time( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, use.all.copy = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
use.all.copy |
Set to TRUE to extract phenotyping |
Class of in gen/database/cohorts selected individuals
data(ex_pop) get.class(ex_pop, gen=2)data(ex_pop) get.class(ex_pop, gen=2)
Function to derive the culling type for each individual
get.culling.type( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = FALSE )get.culling.type( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: FALSE) |
Class of in gen/database/cohorts selected individuals
data(ex_pop) get.class(ex_pop, gen=2)data(ex_pop) get.class(ex_pop, gen=2)
Function to derive the time of culling for all individuals
get.cullingtime( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = FALSE )get.cullingtime( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: FALSE) |
Time of death of in gen/database/cohorts selected individuals
data(ex_pop) get.cullingtime(ex_pop, gen=2)data(ex_pop) get.cullingtime(ex_pop, gen=2)
Function to derive a database based on gen/database/cohorts
get.database( population, gen = NULL, database = NULL, cohorts = NULL, avoid.merging = FALSE, per.individual = FALSE, id = NULL, db.names = NULL, id.all.copy = FALSE, id.last = FALSE, keep.order = FALSE, class = NULL, genotyped = NULL, npheno = NULL, verbose = TRUE, sex.filter = 0 )get.database( population, gen = NULL, database = NULL, cohorts = NULL, avoid.merging = FALSE, per.individual = FALSE, id = NULL, db.names = NULL, id.all.copy = FALSE, id.last = FALSE, keep.order = FALSE, class = NULL, genotyped = NULL, npheno = NULL, verbose = TRUE, sex.filter = 0 )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
avoid.merging |
Set to TRUE to avoid different cohorts to be merged in a joint group when possible |
per.individual |
Set TRUE to obtain a database with one row per individual instead of concatenating (default: FALSE) |
id |
Individual IDs to search/collect in the database |
db.names |
MoPBS internal names (SexNr_Generation) |
id.all.copy |
Set to TRUE to show all copies of an individual in the database (default: FALSE) |
id.last |
Set to TRUE to use the last copy of an individual for the database (default: FALSE - pick first copy) |
keep.order |
To not change order of individuals when ids are provided (default: FALSE) |
class |
Only include individuals of the following classes in the database (can also be vector with multiple classes; default: ALL) |
genotyped |
Only include individuals that are genotyped (TRUE) or not-genotyped (FALSE); default: NULL (all individuals) |
npheno |
Only include individuals with the certain number of phenotypes generated (default: NULL (all individuals)) |
verbose |
Set to FALSE to not display any prints |
sex.filter |
Set to 1 to only include males and set 2 to only include females in database (default: 0) |
Matrix with combined gen/database/cohorts
data(ex_pop) get.database(ex_pop, gen=2)data(ex_pop) get.database(ex_pop, gen=2)
Function to derive the time of death for each individual (NA for individuals that are still alive))
get.death.point( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.death.point( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Time of death of in gen/database/cohorts selected individuals
data(ex_pop) get.death.point(ex_pop, gen=2)data(ex_pop) get.death.point(ex_pop, gen=2)
Function calculate a dendrogram
get.dendrogram( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, method = NULL, individual.names = NULL )get.dendrogram( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, method = NULL, individual.names = NULL )
population |
Population list |
path |
provide a path if the dendrogram would be saved as a png-file |
database |
Groups of individuals to consider |
gen |
Quick-insert for database (vector of all generations to consider) |
cohorts |
Quick-insert for database (vector of names of cohorts to consider) |
id |
Individual IDs to search/collect in the database |
method |
Method used to calculate genetic distances (default: "Nei", alt: "Rogers", "Prevosti", "Modified Rogers" |
individual.names |
Names of the individuals in the database ((default are MoBPS internal names based on position)) |
Dendrogram plot for genotypes
data(ex_pop) get.dendrogram(ex_pop, gen=2)data(ex_pop) get.dendrogram(ex_pop, gen=2)
Function calculate a dendrogram heat
get.dendrogram.heatmap( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, method = NULL, individual.names = NULL, traits = NULL, type = "pheno" )get.dendrogram.heatmap( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, method = NULL, individual.names = NULL, traits = NULL, type = "pheno" )
population |
Population list |
path |
provide a path if the dendrogram would be saved as a png-file |
database |
Groups of individuals to consider |
gen |
Quick-insert for database (vector of all generations to consider) |
cohorts |
Quick-insert for database (vector of names of cohorts to consider) |
id |
Individual IDs to search/collect in the database |
method |
Method used to calculate genetic distances (default: "Nei", alt: "Rogers", "Prevosti", "Modified Rogers" |
individual.names |
Names of the individuals in the database ((default are MoBPS internal names based on position)) |
traits |
Traits to include in the dendrogram (default: all traits) |
type |
Which traits values to consider (default: "pheno", alt: "bv", "bve") |
Dendrogram plot of genotypes vs phenotypes
population <- creating.diploid(nsnp=1000, nindi=40, n.additive = c(100,100,100), trait.cor = matrix(c(1,0.8,0.2,0.8,1,0.2,0.2,0.2,1), ncol=3), shuffle.traits = 1:3) population <- breeding.diploid(population, phenotyping = "all", heritability = 0.5) get.dendrogram.heatmap(population, gen=1, type="pheno")population <- creating.diploid(nsnp=1000, nindi=40, n.additive = c(100,100,100), trait.cor = matrix(c(1,0.8,0.2,0.8,1,0.2,0.2,0.2,1), ncol=3), shuffle.traits = 1:3) population <- breeding.diploid(population, phenotyping = "all", heritability = 0.5) get.dendrogram.heatmap(population, gen=1, type="pheno")
Function calculate a dendogram for the traits
get.dendrogram.trait( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, traits = NULL, type = "pheno" )get.dendrogram.trait( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, traits = NULL, type = "pheno" )
population |
Population list |
path |
provide a path if the dendrogram would be saved as a png-file |
database |
Groups of individuals to consider |
gen |
Quick-insert for database (vector of all generations to consider) |
cohorts |
Quick-insert for database (vector of names of cohorts to consider) |
id |
Individual IDs to search/collect in the database |
traits |
Traits to include in the dendrogram (default: all traits) |
type |
Which traits values to consider (default: "pheno", alt: "bv", "bve") |
Dendrogram plot for traits
population <- creating.diploid(nsnp=1000, nindi=100, n.additive = c(100,100,100), shuffle.cor = matrix(c(1,0.8,0.2,0.8,1,0.2,0.2,0.2,1), ncol=3), shuffle.traits = 1:3) population <- breeding.diploid(population, phenotyping = "all", heritability = 0.5) get.dendrogram.trait(population, gen=1, type="pheno")population <- creating.diploid(nsnp=1000, nindi=100, n.additive = c(100,100,100), shuffle.cor = matrix(c(1,0.8,0.2,0.8,1,0.2,0.2,0.2,1), ncol=3), shuffle.traits = 1:3) population <- breeding.diploid(population, phenotyping = "all", heritability = 0.5) get.dendrogram.trait(population, gen=1, type="pheno")
Function to calculate Nei's distance between two or more population
get.distance( population, type = "nei", marker = "all", per.marker = FALSE, gen1 = NULL, database1 = NULL, cohorts1 = NULL, id1 = NULL, gen2 = NULL, database2 = NULL, cohorts2 = NULL, id2 = NULL, database.list = NULL, gen.list = NULL, cohorts.list = NULL )get.distance( population, type = "nei", marker = "all", per.marker = FALSE, gen1 = NULL, database1 = NULL, cohorts1 = NULL, id1 = NULL, gen2 = NULL, database2 = NULL, cohorts2 = NULL, id2 = NULL, database.list = NULL, gen.list = NULL, cohorts.list = NULL )
population |
population list |
type |
Chose type of distance to compute (default: Neis standard genetic distance "nei"). Alt: Reynolds distance ("reynold"), Cavalli-Sforza ("cavalli"), Neis distance ("nei_distance"), Neis minimum distance ("nei_minimum") |
marker |
Vector with SNPs to consider (Default: "all" - use of all markers) |
per.marker |
Set to TRUE to return per marker statistics on genetic distances |
gen1 |
Quick-insert for database (vector of all generations to consider) |
database1 |
First Groups of individuals to consider |
cohorts1 |
Quick-insert for database (vector of names of cohorts to consider) |
id1 |
Individual IDs to search/collect in the database |
gen2 |
Quick-insert for database (vector of all generations to consider) |
database2 |
Second Groups of individuals to consider |
cohorts2 |
Quick-insert for database (vector of names of cohorts to consider) |
id2 |
Individual IDs to search/collect in the database |
database.list |
List of databases to consider (use when working with more than 2 populations) |
gen.list |
Quick-insert for database (vector of all generations to consider) |
cohorts.list |
Quick-insert for database (vector of names of cohorts to consider) |
Population list
data(ex_pop) get.distance(ex_pop, database1 = cbind(1,1), database2 = cbind(1,2))data(ex_pop) get.distance(ex_pop, database1 = cbind(1,1), database2 = cbind(1,2))
Function to compute marker frequency in QTL-markers
get.effect.freq( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, sort = FALSE )get.effect.freq( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, sort = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
sort |
Set to FALSE to not sort markers according to position on the genome |
Matrix with allele frequencies in the QTLs
data(ex_pop) get.effect.freq(ex_pop, gen=1)data(ex_pop) get.effect.freq(ex_pop, gen=1)
Function to estimate the effective population size
get.effective.size( population, gen = NULL, database = NULL, cohorts = NULL, id = NULL )get.effective.size( population, gen = NULL, database = NULL, cohorts = NULL, id = NULL )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
Estimated effective population size
data(ex_pop) get.effective.size(population=ex_pop, gen=5)data(ex_pop) get.effective.size(population=ex_pop, gen=5)
Function to export parametrization of the fixed effects
get.fixed.effects.p( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.fixed.effects.p( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: FALSE) |
Estimated breeding value of in gen/database/cohorts selected individuals
data(ex_pop) population <- add.fixed.effects(ex_pop, fixed.effects = cbind(1,5)) population <- breeding.diploid(population, heritability = 0.3, fixed.effects.p = rbind(c(1,0), c(0,1)), phenotyping.gen=2) get.fixed.effects.p(population, gen=2)data(ex_pop) population <- add.fixed.effects(ex_pop, fixed.effects = cbind(1,5)) population <- breeding.diploid(population, heritability = 0.3, fixed.effects.p = rbind(c(1,0), c(0,1)), phenotyping.gen=2) get.fixed.effects.p(population, gen=2)
Function to derive genotypes of selected individuals
get.geno( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, chromosome = "all", export.alleles = FALSE, non.genotyped.as.missing = FALSE, use.id = TRUE, array = NULL, remove.missing = TRUE )get.geno( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, chromosome = "all", export.alleles = FALSE, non.genotyped.as.missing = FALSE, use.id = TRUE, array = NULL, remove.missing = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
chromosome |
Limit the genotype output to a selected chromosome (default: "all") |
export.alleles |
If TRUE export underlying alleles instead of just 012 |
non.genotyped.as.missing |
Set to TRUE to replace non-genotyped markers with NA |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
array |
Use only markers available on the array |
remove.missing |
Remove markers not genotyped in any individual from the export |
Genotype data for in gen/database/cohorts selected individuals
data(ex_pop) geno <- get.geno(ex_pop, gen=2)data(ex_pop) geno <- get.geno(ex_pop, gen=2)
Function to derive genotyping timepoint
get.geno.time( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, use.all.copy = TRUE )get.geno.time( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, use.all.copy = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
use.all.copy |
Set to TRUE to extract phenotyping |
genotyping timepoint
data(ex_pop) get.class(ex_pop, gen=2)data(ex_pop) get.class(ex_pop, gen=2)
Function to if selected individuals are genotyped
get.genotyped( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, use.all.copy = FALSE )get.genotyped( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, use.all.copy = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
use.all.copy |
Set to TRUE to extract phenotyping |
Check if in gen/database/cohorts selected individuals are genotyped
data(ex_pop) get.genotyped(ex_pop, gen=2)data(ex_pop) get.genotyped(ex_pop, gen=2)
Function to derive which markers are genotyped for the selected individuals
get.genotyped.snp( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, export.alleles = FALSE, use.id = TRUE, array = NULL )get.genotyped.snp( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, export.alleles = FALSE, use.id = TRUE, array = NULL )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
export.alleles |
If TRUE export underlying alleles instead of just 012 |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
array |
Use only markers available on the array |
Binary Coded is/isnot genotyped level for in gen/database/cohorts selected individuals
data(ex_pop) genotyped.snps <- get.genotyped.snp(ex_pop, gen=2)data(ex_pop) genotyped.snps <- get.genotyped.snp(ex_pop, gen=2)
Function to derive haplotypes of selected individuals
get.haplo( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, chromosome = "all", export.alleles = FALSE, non.genotyped.as.missing = FALSE, use.id = TRUE, array = NULL, remove.missing = TRUE )get.haplo( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, chromosome = "all", export.alleles = FALSE, non.genotyped.as.missing = FALSE, use.id = TRUE, array = NULL, remove.missing = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
chromosome |
Limit the genotype output to a selected chromosome (default: "all") |
export.alleles |
If TRUE export underlying alleles instead of just 012 |
non.genotyped.as.missing |
Set to TRUE to replace non-genotyped markers with NA |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
array |
Use only markers available on the array |
remove.missing |
Remove markers not genotyped in any individual from the export |
Haplotype data for in gen/database/cohorts selected individuals
data(ex_pop) haplo <- get.haplo(ex_pop, gen=2)data(ex_pop) haplo <- get.haplo(ex_pop, gen=2)
Function to derive the internal ID given to each individual
get.id( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, keep.order = FALSE )get.id( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, keep.order = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
keep.order |
To not change order of individuals when ids are provided (default: FALSE) |
Individual ID for in gen/database/cohorts selected individuals
data(ex_pop) get.id(ex_pop, gen=2)data(ex_pop) get.id(ex_pop, gen=2)
Function to put together indices for GxE / multi trait
get.index( population, traits = NULL, locations = NULL, trait.weights = NULL, location.weights = NULL )get.index( population, traits = NULL, locations = NULL, trait.weights = NULL, location.weights = NULL )
population |
Population list |
traits |
Which traits to include in the index (all weight with factor 1) |
locations |
Which locations to include in the index (all weight weight factor 1) |
trait.weights |
Vector with a weight per trait |
location.weights |
Vector weight a weight per location |
Index
population = creating.diploid(nsnp =1000, nindi = 100) population = creating.trait(population, n.additive = c(10,10), n.location=3, replace.traits = TRUE) get.index(population, trait.weights = c(1,2), location.weights = c(1,2,3))population = creating.diploid(nsnp =1000, nindi = 100) population = creating.trait(population, n.additive = c(10,10), n.location=3, replace.traits = TRUE) get.index(population, trait.weights = c(1,2), location.weights = c(1,2,3))
Function to extract bv/pheno/geno of selected individuals
get.infos( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.infos( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Info list [[1]] phenotypes [[2]] genomic values [[3]] Z [[4/5/6]] additive/epistatic/dice marker effects
data(ex_pop) get.infos(ex_pop, gen=2)data(ex_pop) get.infos(ex_pop, gen=2)
Function to derive if an individual is the first copy of itself in the database (based on position)
get.is.first( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, keep.order = FALSE )get.is.first( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, keep.order = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
keep.order |
To not change order of individuals when ids are provided (default: FALSE) |
Individual ID for in gen/database/cohorts selected individuals
data(ex_pop) get.id(ex_pop, gen=2)data(ex_pop) get.id(ex_pop, gen=2)
Function to derive if an individual is the last copy of itself in the database (based on position)
get.is.last( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, keep.order = FALSE )get.is.last( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, keep.order = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
keep.order |
To not change order of individuals when ids are provided (default: FALSE) |
Logical vector
data(ex_pop) get.is.last(ex_pop, gen=2)data(ex_pop) get.is.last(ex_pop, gen=2)
Function to export litter ID of each individual
get.litter( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.litter( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Litter ID for in gen/database/cohorts selected individuals
data(ex_pop) get.litter(ex_pop, gen=2)data(ex_pop) get.litter(ex_pop, gen=2)
Function to export the litter effect of selected individuals
get.litter.effect( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.litter.effect( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Litter effects for in gen/database/cohorts selected individuals
data(ex_pop) get.litter.effect(ex_pop, gen=2)data(ex_pop) get.litter.effect(ex_pop, gen=2)
Function to calculate minor allele frequencies
get.maf(population, database = NULL, gen = NULL, cohorts = NULL, id = NULL)get.maf(population, database = NULL, gen = NULL, cohorts = NULL, id = NULL)
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
Allele frequency of the minor allele
data(ex_pop) get.maf(ex_pop, gen = 1)data(ex_pop) get.maf(ex_pop, gen = 1)
Function to derive the genomic map for a given population list
get.map(population, use.snp.nr = FALSE, morgan.position.per.chromosome = TRUE)get.map(population, use.snp.nr = FALSE, morgan.position.per.chromosome = TRUE)
population |
Population list |
use.snp.nr |
Set to TRUE to display SNP number and not SNP name |
morgan.position.per.chromosome |
Set to FALSE to Morgan position continuously over the genome |
Genomic map of the population list
data(ex_pop) map <- get.map(ex_pop)data(ex_pop) map <- get.map(ex_pop)
Function to calculate the number of generations in the population list
get.ngen(population)get.ngen(population)
population |
Population list |
Numeric value
data(ex_pop) get.ngen(ex_pop)data(ex_pop) get.ngen(ex_pop)
Function to calculate the number of individuals in the population list
get.nindi( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, extended = FALSE, count.copy = FALSE )get.nindi( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, extended = FALSE, count.copy = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
extended |
Set to TRUE to export information on number of phenotyped, genotyped, and both pheno&genotyped individuals |
count.copy |
Set to TRUE to double count individuals if multiple copies of an individual are included in gen/database/cohorts |
Numeric value
data(ex_pop) get.nindi(ex_pop, gen = 1)data(ex_pop) get.nindi(ex_pop, gen = 1)
Function to export the number of observation of each underlying phenotype
get.npheno( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.all.copy = FALSE, use.id = TRUE )get.npheno( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.all.copy = FALSE, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.all.copy |
Set to TRUE to extract phenotyping |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Phenotypes for in gen/database/cohorts selected individuals
data(ex_pop) get.pheno(ex_pop, gen=2)data(ex_pop) get.pheno(ex_pop, gen=2)
Function to calculate the number of traits in the population list
get.ntrait(population)get.ntrait(population)
population |
Population list |
Numeric value
data(ex_pop) get.ngen(ex_pop)data(ex_pop) get.ngen(ex_pop)
Function to perform a principle component analysis
get.pca( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, coloring = "group", components = c(1, 2), plot = TRUE, pch = 1, export.color = FALSE, use.id = FALSE )get.pca( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, coloring = "group", components = c(1, 2), plot = TRUE, pch = 1, export.color = FALSE, use.id = FALSE )
population |
Population list |
path |
Location were to save the PCA-plot |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
coloring |
Coloring by "group", "sex", "plain" |
components |
Default: c(1,2) for the first two principle components |
plot |
Set to FALSE to not generate a plot |
pch |
Point type in the PCA plot |
export.color |
Set to TRUE to export the per point coloring |
use.id |
Set TRUE to display IDs instead of dots in the PCA plot |
Principle components of gen/database/cohorts selected individuals
data(ex_pop) get.pca(ex_pop, gen=2)data(ex_pop) get.pca(ex_pop, gen=2)
Derive pedigree for selected individuals
get.pedigree( population, database = NULL, gen = NULL, cohorts = NULL, founder.zero = TRUE, raw = FALSE, use.id = TRUE, id = NULL, use.first.copy = FALSE, include.error = FALSE, depth = 1 )get.pedigree( population, database = NULL, gen = NULL, cohorts = NULL, founder.zero = TRUE, raw = FALSE, use.id = TRUE, id = NULL, use.first.copy = FALSE, include.error = FALSE, depth = 1 )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
founder.zero |
Parents of founders are displayed as "0" (default: TRUE) |
raw |
Set to TRUE to not convert numbers into Sex etc. |
use.id |
Set to TRUE to extract individual IDs |
id |
Individual IDs to search/collect in the database |
use.first.copy |
Set to TRUE to use database-position of the first copy of an individual (default: FALSE) |
include.error |
Set to TRUE to include errors simulated in the pedigree |
depth |
Depth (1) for parents, (2) for grandparents, (3) for grandgrandparents etc. |
Pedigree-file for in gen/database/cohorts selected individuals
data(ex_pop) pedigree = get.pedigree(ex_pop, gen=2)data(ex_pop) pedigree = get.pedigree(ex_pop, gen=2)
Derive pedigree for selected individuals
get.pedigree_old( population, database = NULL, gen = NULL, cohorts = NULL, founder.zero = TRUE, raw = FALSE, use.id = TRUE, id = NULL, use.first.copy = FALSE, include.error = FALSE, depth = 1 )get.pedigree_old( population, database = NULL, gen = NULL, cohorts = NULL, founder.zero = TRUE, raw = FALSE, use.id = TRUE, id = NULL, use.first.copy = FALSE, include.error = FALSE, depth = 1 )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
founder.zero |
Parents of founders are displayed as "0" (default: TRUE) |
raw |
Set to TRUE to not convert numbers into Sex etc. |
use.id |
Set to TRUE to extract individual IDs |
id |
Replaced by use.id ((consistency with all other get.xxx functions)) |
use.first.copy |
Set to TRUE to use database-position of the first copy of an individual (default: FALSE) |
include.error |
Set to TRUE to include errors simulated in the pedigree |
depth |
Depth (1) for parents, (2) for grandparents, (3) for grandgrandparents etc. |
Pedigree-file for in gen/database/cohorts selected individuals
data(ex_pop) get.pedigree_old(ex_pop, gen=2)data(ex_pop) get.pedigree_old(ex_pop, gen=2)
Draw a pedigree for selected individuals
get.pedigree.visual( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, depth.pedigree = 3, storage.save = 1.1, use.id = TRUE, cex = NULL, path = NULL, showgraph = TRUE, outline = FALSE, compact = FALSE )get.pedigree.visual( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, depth.pedigree = 3, storage.save = 1.1, use.id = TRUE, cex = NULL, path = NULL, showgraph = TRUE, outline = FALSE, compact = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
depth.pedigree |
Depth of the pedigree in generations |
storage.save |
The closer this is to 1 the more strict older animals will be filtered out of the pedigree (default: 1.1, min: 1) |
use.id |
Set to TRUE to extract individual IDs |
cex |
Size of individual labels |
path |
NULL or a character value means whether the pedigree graph will be saved in a pdf file. The graph in the pdf file is a legible vector drawing, and labels isn't overlapped especially when the number of individuals is big and width of the individual label is long in one generation. It is recommended that saving a pedigree graph in the pdf file. The default value is NULL (this is taken from visPedigree documentation). |
showgraph |
A logical value indicating whether a plot will be shown in the defaulted graphic device, such as the Plots panel of Rstudio. It is useful for quick viewing of the pedigree graph without opening the pdf file. However, the graph on the defaulted graphic device may be not legible, such as overlapped labels, aliasing lines due to the restricted width and height. It's a good choice to set showgraph = FALSE when the pedigree is large. The default value is TRUE (this is taken from visPedigree documentation). |
outline |
A logical value indicating whether shapes without label will be shown. A graph of the pedigree without individuals' label is shown when setting outline = TRUE. It is very useful for viewing the outline of the pedigree and finding the immigrant individuals in each generation when the width of a pedigree graph is longer than the maximum width (200 inches) of the pdf file. The defaulted value is FALSE (this is taken from visPedigree documentation). |
compact |
A logical value indicating whether IDs of full-sib individuals in one generation will be deleted and replaced with the number of full-sib individuals. For example, if there are 100 full-sib individuals in one generation, they will be deleted from the pedigree and be replaced with one individual label of "100" when compact = TRUE. The default value is FALSE (this is taken from visPedigree documentation). |
Pedigree visualization
population = creating.diploid(nsnp=100, nindi=10) population = breeding.diploid(population, breeding.size=10) population = breeding.diploid(population, selection.m.database=cbind(c(1,2),1,1,5), breeding.size=10) population = breeding.diploid(population, selection.m.database=cbind(c(2,3),1,1,5), breeding.size=10) get.pedigree.visual(population, gen=4)population = creating.diploid(nsnp=100, nindi=10) population = breeding.diploid(population, breeding.size=10) population = breeding.diploid(population, selection.m.database=cbind(c(1,2),1,1,5), breeding.size=10) population = breeding.diploid(population, selection.m.database=cbind(c(2,3),1,1,5), breeding.size=10) get.pedigree.visual(population, gen=4)
Derive pedigree for selected individuals including grandparents
get.pedigree2( population, database = NULL, gen = NULL, cohorts = NULL, shares = FALSE, founder.zero = TRUE, raw = FALSE, include.error = FALSE )get.pedigree2( population, database = NULL, gen = NULL, cohorts = NULL, shares = FALSE, founder.zero = TRUE, raw = FALSE, include.error = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
shares |
Determine actual inherited shares of grandparents |
founder.zero |
Parents of founders are displayed as "0" (default: TRUE) |
raw |
Set to TRUE to not convert numbers into Sex etc. |
include.error |
Set to TRUE to include errors simulated in the pedigree |
Pedigree-file (grandparents) for in gen/database/cohorts selected individuals
data(ex_pop) get.pedigree2(ex_pop, gen=3)data(ex_pop) get.pedigree2(ex_pop, gen=3)
Derive pedigree for selected individuals including parents/grandparents
get.pedigree3( population, database = NULL, gen = NULL, cohorts = NULL, founder.zero = TRUE, id = FALSE, raw = FALSE, include.error = FALSE )get.pedigree3( population, database = NULL, gen = NULL, cohorts = NULL, founder.zero = TRUE, id = FALSE, raw = FALSE, include.error = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
founder.zero |
Parents of founders are displayed as "0" (default: TRUE) |
id |
Set to TRUE to extract individual IDs |
raw |
Set to TRUE to not convert numbers into Sex etc. |
include.error |
Set to TRUE to include errors simulated in the pedigree |
Pedigree-file (parents + grandparents) for in gen/database/cohorts selected individuals
data(ex_pop) get.pedigree3(ex_pop, gen=3)data(ex_pop) get.pedigree3(ex_pop, gen=3)
Generate a ped and map file (PLINK format) for selected groups and chromosome
get.pedmap( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, non.genotyped.as.missing = FALSE, use.id = TRUE )get.pedmap( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, non.genotyped.as.missing = FALSE, use.id = TRUE )
population |
Population list |
path |
Location to save pedmap-file |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
non.genotyped.as.missing |
Set to TRUE to replaced non-genotyped entries with "./." |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Ped and map-file for in gen/database/cohorts selected individuals
data(ex_pop) file_path <- tempdir() get.pedmap(path=file_path, ex_pop, gen=2) file.remove(paste0(file_path, ".ped")) file.remove(paste0(file_path, ".map"))data(ex_pop) file_path <- tempdir() get.pedmap(path=file_path, ex_pop, gen=2) file.remove(paste0(file_path, ".ped")) file.remove(paste0(file_path, ".map"))
Function to export pen ID
get.pen( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.pen( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Pen ID for in gen/database/cohorts selected individuals
data(ex_pop) get.pen.effect(ex_pop, gen=2)data(ex_pop) get.pen.effect(ex_pop, gen=2)
Function to export pen-effects
get.pen.effect( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.pen.effect( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Phenotypes for in gen/database/cohorts selected individuals
data(ex_pop) get.pen.effect(ex_pop, gen=2)data(ex_pop) get.pen.effect(ex_pop, gen=2)
Function to export underlying phenotypes
get.pheno( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.all.copy = FALSE, use.id = TRUE )get.pheno( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.all.copy = FALSE, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.all.copy |
Set to TRUE to extract phenotyping |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Phenotypes for in gen/database/cohorts selected individuals
data(ex_pop) get.pheno(ex_pop, gen=2)data(ex_pop) get.pheno(ex_pop, gen=2)
Function to export offspring phenotypes
get.pheno.off( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.pheno.off( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Avg. phenotype of the offspring of in gen/database/cohorts selected individuals
data(ex_pop) get.pheno.off(ex_pop, gen=2)data(ex_pop) get.pheno.off(ex_pop, gen=2)
Function to export number of observations used for offspring phenotypes
get.pheno.off.count( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.pheno.off.count( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Number of offspring with phenotypes for in gen/database/cohorts selected individuals
data(ex_pop) get.pheno.off.count(ex_pop, gen=2)data(ex_pop) get.pheno.off.count(ex_pop, gen=2)
Function to export underlying phenotypes
get.pheno.single( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.all.copy = FALSE, use.id = TRUE )get.pheno.single( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.all.copy = FALSE, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.all.copy |
Set to TRUE to extract phenotyping |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Phenotypes for in gen/database/cohorts selected individuals
data(ex_pop) get.pheno.single(ex_pop, gen=2)data(ex_pop) get.pheno.single(ex_pop, gen=2)
Function to derive timepoint of phenotyping for each individual
get.pheno.time( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, use.all.copy = TRUE )get.pheno.time( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, use.all.copy = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
use.all.copy |
Set to TRUE to extract phenotyping |
Timepoint (of phenotyping) of in gen/database/cohorts selected individuals
data(ex_pop) get.pheno.time(ex_pop, gen=2)data(ex_pop) get.pheno.time(ex_pop, gen=2)
Function calculate a phylogenetic tree
get.phylogenetic.tree( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, method = NULL, use.id = TRUE, circular = FALSE )get.phylogenetic.tree( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, method = NULL, use.id = TRUE, circular = FALSE )
population |
Population list |
path |
provide a path if the dendrogram would be saved as a png-file |
database |
Groups of individuals to consider |
gen |
Quick-insert for database (vector of all generations to consider) |
cohorts |
Quick-insert for database (vector of names of cohorts to consider) |
id |
Individual IDs to search/collect in the database |
method |
Method used to calculate genetic distances (default: "Nei", alt: "Rogers", "Prevosti", "Modified Rogers" |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
circular |
Set to TRUE to generate a fan/circular layout tree |
Dendrogram plot for traits
data(ex_pop) get.phylogenetic.tree(ex_pop, gen=1, circular=TRUE)data(ex_pop) get.phylogenetic.tree(ex_pop, gen=1, circular=TRUE)
Generate a binary plink-file for selected groups and chromosome
get.plink( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, chromosome = "all", non.genotyped.as.missing = FALSE, fam.id = FALSE, type = 0, use.id = TRUE, bve.pedigree.error = TRUE )get.plink( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, chromosome = "all", non.genotyped.as.missing = FALSE, fam.id = FALSE, type = 0, use.id = TRUE, bve.pedigree.error = TRUE )
population |
Population list |
path |
Location to save vcf-file |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
chromosome |
Limit the genotype output to a selected chromosome (default: "all") |
non.genotyped.as.missing |
Set to TRUE to replaced non-genotyped entries with "./." |
fam.id |
Set TRUE to set the fam-ID to the individual ID |
type |
Set 1 to only write paternal haplotype, set 2 to only write maternal haplotype, set 0 for both (default) |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
bve.pedigree.error |
Set to FALSE to ignore/correct for any pedigree errors |
binary plink-file for in gen/database/cohorts selected individuals
data(ex_pop) data(ex_pop) file_path <- tempdir() get.vcf(path=file_path, ex_pop, gen=2) file.remove(paste0(file_path, ".vcf"))data(ex_pop) data(ex_pop) file_path <- tempdir() get.vcf(path=file_path, ex_pop, gen=2) file.remove(paste0(file_path, ".vcf"))
Function to export founder pool
get.pool( population, gen = NULL, database = NULL, cohorts = NULL, id = NULL, plot = FALSE, import.position.calculation = NULL, decodeOriginsU = decodeOriginsR, use.id = TRUE )get.pool( population, gen = NULL, database = NULL, cohorts = NULL, id = NULL, plot = FALSE, import.position.calculation = NULL, decodeOriginsU = decodeOriginsR, use.id = TRUE )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
plot |
Set TRUE to generate a visualization of genetic origins |
import.position.calculation |
Function to calculate recombination point into adjacent/following SNP |
decodeOriginsU |
Used function for the decoding of genetic origins [[5]]/[[6]] |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Founder pool of in gen/database/cohorts selected individuals
data(ex_pop) get.pool(ex_pop, gen=2)data(ex_pop) get.pool(ex_pop, gen=2)
Function to derive the founder pool of individuals
get.pool.founder( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.pool.founder( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Founder pool of in gen/database/cohorts selected individuals
data(ex_pop) get.pool.founder(ex_pop, gen=2)data(ex_pop) get.pool.founder(ex_pop, gen=2)
Function to the position of QTLs (for snp/chr use get.qtl.effects()
get.qtl(population)get.qtl(population)
population |
Population list |
Vector of SNP positions
data(ex_pop) positions <- get.qtl(ex_pop)data(ex_pop) positions <- get.qtl(ex_pop)
Function to extract QTL effect sizes
get.qtl.effects(population)get.qtl.effects(population)
population |
Population list |
List with [[1]] single SNP QTLs [[2]] epistatic SNP QTLs [[3]] dice QTL
data(ex_pop) effects <- get.qtl.effects(ex_pop)data(ex_pop) effects <- get.qtl.effects(ex_pop)
Function to extract QTL effect variance for single SNP QTLs in a given gen/database/cohort
get.qtl.variance( population, gen = NULL, database = NULL, cohorts = NULL, id = NULL )get.qtl.variance( population, gen = NULL, database = NULL, cohorts = NULL, id = NULL )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to consider) |
database |
Groups of individuals to consider |
cohorts |
Quick-insert for database (vector of names of cohorts to consider) |
id |
Individual IDs to search/collect in the database |
matrix with SNP / Chr / estimated effect variance
data(ex_pop) effects <- get.qtl.variance(ex_pop)data(ex_pop) effects <- get.qtl.variance(ex_pop)
Function to derive genetic origin
get.recombi( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.recombi( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Recombination points for in gen/database/cohorts selected individuals
data(ex_pop) get.recombi(ex_pop, gen=2)data(ex_pop) get.recombi(ex_pop, gen=2)
Function to export underlying reliabilities
get.reliability( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.reliability( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Estimated reliability for BVE for in gen/database/cohorts selected individuals
data(ex_pop) get.reliability(ex_pop, gen=2)data(ex_pop) get.reliability(ex_pop, gen=2)
Function to export last breeding values based on the selection index
get.selectionbve( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.selectionbve( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Last applied selection index for in gen/database/cohorts selected individuals
data(ex_pop) get.selectionbve(ex_pop, gen=2)data(ex_pop) get.selectionbve(ex_pop, gen=2)
Function to export last used selection index (mostly relevant for Miesenberger 1997 stuff)
get.selectionindex( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.selectionindex( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Last applied selection index for in gen/database/cohorts selected individuals
data(ex_pop) get.selectionindex(ex_pop, gen=2)data(ex_pop) get.selectionindex(ex_pop, gen=2)
Function to extract the sex of selected individuals
get.sex( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, male.female.coding = F )get.sex( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, male.female.coding = F )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names |
male.female.coding |
Set to TRUE to display male/female instead of 1/2 |
data(ex_pop) get.sex(ex_pop, gen=2)data(ex_pop) get.sex(ex_pop, gen=2)
Function to calculate the number of individuals per generation
Function to calculate the number of individuals per generation
get.size(population) get.size(population)get.size(population) get.size(population)
population |
Population list |
matrix with numeric values
matrix with numeric values
data(ex_pop) get.size(ex_pop) data(ex_pop) get.size(ex_pop)data(ex_pop) get.size(ex_pop) data(ex_pop) get.size(ex_pop)
Function to derive snapshot of genotyping/phenotyping state of selected individuals
get.snapshot( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, phenotype.data = FALSE, gain.data = FALSE, digits = 3, use.all.copy = TRUE, time.diff = NA )get.snapshot( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, phenotype.data = FALSE, gain.data = FALSE, digits = 3, use.all.copy = TRUE, time.diff = NA )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
phenotype.data |
Set to TRUE to include information of number of phenotypes generated |
gain.data |
Set to TRUE to add information on changes in genetic level between cohorts (default: FALSE) |
digits |
Number of digits provided for the gain.data output (default: 3) |
use.all.copy |
Set to TRUE to extract phenotyping |
time.diff |
Set to a target time interval to receive information between transitions to other cohorts (default: NA) |
Snapshot-matrix
data(ex_pop) get.snapshot(ex_pop, gen = 2)data(ex_pop) get.snapshot(ex_pop, gen = 2)
Function to derive snapshot of genotyping/phenotyping state of selected individuals
get.snapshot.single( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, phenotype.data = FALSE, gain.data = FALSE, digits = 3, time.diff = 1, min.time = -Inf, max.time = Inf, use.all.copy = TRUE, verbose = TRUE, time.points = NULL, include.culled = FALSE )get.snapshot.single( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, phenotype.data = FALSE, gain.data = FALSE, digits = 3, time.diff = 1, min.time = -Inf, max.time = Inf, use.all.copy = TRUE, verbose = TRUE, time.points = NULL, include.culled = FALSE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
phenotype.data |
Set to TRUE to include information of number of phenotypes generated |
gain.data |
Set to TRUE to add information on changes in genetic level between cohorts (default: FALSE) |
digits |
Number of digits provided for the gain.data output (default: 3) |
time.diff |
Set to a target time interval to receive information between transitions to other cohorts (default: NA) |
min.time |
Earliest time point relevant for output results (default: -Inf) |
max.time |
Latest time point relevant for output results (default: Inf) |
use.all.copy |
Set to TRUE to extract phenotyping |
verbose |
Set to FALSE to not display any prints (default: TRUE) |
time.points |
Use this parameter to manual provide a vector of time points on results should be generated for (default: NULL) |
include.culled |
Set to TRUE to also include culled individuals in the statistics provided |
Snapshot Matrix
data(ex_pop) get.snapshot.single(ex_pop, cohorts = "Cohort_2_M")data(ex_pop) get.snapshot.single(ex_pop, cohorts = "Cohort_2_M")
Function to derive time point of generation for each individual
get.time.point( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.time.point( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE) |
Time point of generation for in gen/database/cohorts selected individuals
data(ex_pop) get.time.point(ex_pop, gen=2)data(ex_pop) get.time.point(ex_pop, gen=2)
Function to export parametrization of the fixed effects in transformation function
get.trafo.p( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, include = NULL )get.trafo.p( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE, include = NULL )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: FALSE) |
include |
Which observations to include in the calculation (default: NULL (all)) |
Parameter input used in the transformation function
data(ex_pop) get.trafo.p(ex_pop, gen = 2)data(ex_pop) get.trafo.p(ex_pop, gen = 2)
Function to export parametrization of the fixed effects in transformation function
get.trafo.p.single( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )get.trafo.p.single( population, database = NULL, gen = NULL, cohorts = NULL, id = NULL, use.id = TRUE )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: FALSE) |
List with transformation parameters per observation
data(ex_pop) get.trafo.p.single(ex_pop, gen = 2)data(ex_pop) get.trafo.p.single(ex_pop, gen = 2)
Function to export trait names in the population list
get.trait.name(population)get.trait.name(population)
population |
Population list |
Numeric value
data(ex_pop) get.ngen(ex_pop)data(ex_pop) get.ngen(ex_pop)
Function to export estimated SNP effects
get.uhat(population, extend = FALSE, plot = TRUE, trait.plot = 1)get.uhat(population, extend = FALSE, plot = TRUE, trait.plot = 1)
population |
Population list |
extend |
Set to TRUE to export u_hat estimates from all breeding values instead of just the last (default: FALSE) |
plot |
Set to FALSE to not display overview of estimated SNP effects (default: TRUE) |
trait.plot |
Select trait for which to generate the visualization (default: 1) |
matrix with estimated marker effects
data(ex_pop) population = breeding.diploid(ex_pop, bve.gen = 2:3, genotyped.gen = 2:3, bve = TRUE, estimate.u = TRUE) get.uhat(population)data(ex_pop) population = breeding.diploid(ex_pop, bve.gen = 2:3, genotyped.gen = 2:3, bve = TRUE, estimate.u = TRUE) get.uhat(population)
Function to derive underlying variance components (add/dom)
get.variance( population, gen = NULL, database = NULL, cohorts = NULL, id = NULL )get.variance( population, gen = NULL, database = NULL, cohorts = NULL, id = NULL )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
Table with realized narrow/broad-sense heritability, sigma_g,a,d
data(ex_pop) get.variance(ex_pop, gen = 2)data(ex_pop) get.variance(ex_pop, gen = 2)
Function to derive variance components
get.variance.components(population)get.variance.components(population)
population |
Population list |
Estimated variance components
data(ex_pop) population = breeding.diploid(ex_pop, bve = TRUE, bve.gen = 2) get.variance.components(population)data(ex_pop) population = breeding.diploid(ex_pop, bve = TRUE, bve.gen = 2) get.variance.components(population)
Generate a vcf-file for selected groups and chromosome
get.vcf( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, chromosome = "all", non.genotyped.as.missing = FALSE, use.id = FALSE, file.append = FALSE )get.vcf( population, path = NULL, database = NULL, gen = NULL, cohorts = NULL, id = NULL, chromosome = "all", non.genotyped.as.missing = FALSE, use.id = FALSE, file.append = FALSE )
population |
Population list |
path |
Location to save vcf-file |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
id |
Individual IDs to search/collect in the database |
chromosome |
Limit the genotype output to a selected chromosome (default: "all") |
non.genotyped.as.missing |
Set to TRUE to replaced non-genotyped entries with "./." |
use.id |
Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names |
file.append |
Set extend an existing vcf-file ((without writting a header)) |
VCF-file for in gen/database/cohorts selected individuals
data(ex_pop) file_path <- tempdir() get.vcf(path=file_path, ex_pop, gen=2) file.remove(paste0(file_path, ".vcf"))data(ex_pop) file_path <- tempdir() get.vcf(path=file_path, ex_pop, gen=2) file.remove(paste0(file_path, ".vcf"))
Function to exclude individuals from a database
group.diff( population, database = NULL, gen = NULL, cohorts = NULL, remove.gen = NULL, remove.database = NULL, remove.cohorts = NULL )group.diff( population, database = NULL, gen = NULL, cohorts = NULL, remove.gen = NULL, remove.database = NULL, remove.cohorts = NULL )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
remove.gen |
Generations of individuals to remove from the database (same IDs!) |
remove.database |
Groups of individuals to remove from the database (same IDs!) |
remove.cohorts |
Cohorts of individuals to remove from the database (same IDs!) |
Database excluding removals
data(ex_pop) database <- group.diff(ex_pop, gen=1, remove.database=cbind(1,1))data(ex_pop) database <- group.diff(ex_pop, gen=1, remove.database=cbind(1,1))
Function to compute empirical kinship for a set of individuals)
inbreeding.emp( population = NULL, animals = NULL, gen = NULL, database = NULL, cohorts = NULL, use.id = TRUE )inbreeding.emp( population = NULL, animals = NULL, gen = NULL, database = NULL, cohorts = NULL, use.id = TRUE )
population |
Population list |
animals |
List of animals to compute kinship for |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
use.id |
Set TRUE to use animal IDs for column/row-names in the output matrix (default: TRUE) |
Empirical kinship matrix (IBD-based since Founders)
data(ex_pop) inbreeding <- inbreeding.emp(population=ex_pop, database=cbind(3,1,1,25))data(ex_pop) inbreeding <- inbreeding.emp(population=ex_pop, database=cbind(3,1,1,25))
Function to derive pedigree based inbreeding
inbreeding.exp( population, gen = NULL, database = NULL, cohorts = NULL, depth.pedigree = 7, start.kinship = NULL, elements = NULL, storage.save = 1.5, verbose = TRUE )inbreeding.exp( population, gen = NULL, database = NULL, cohorts = NULL, depth.pedigree = 7, start.kinship = NULL, elements = NULL, storage.save = 1.5, verbose = TRUE )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
depth.pedigree |
Depth of the pedigree in generations |
start.kinship |
Relationship matrix of the individuals in the first considered generation |
elements |
Vector of individuals from the database to include in pedigree matrix |
storage.save |
Lower numbers will lead to less memory but slightly higher computing time (default: 1.5, min: 1) |
verbose |
Set to FALSE to not display any prints |
Pedigree-based inbreeding in gen/database/cohort selected individuals
data(ex_pop) inbreeding <- inbreeding.exp(population=ex_pop, gen=5)data(ex_pop) inbreeding <- inbreeding.exp(population=ex_pop, gen=5)
Function to manually enter breeding values
insert.bv( population, bvs, na.override = FALSE, count = 1, count.only.increase = TRUE )insert.bv( population, bvs, na.override = FALSE, count = 1, count.only.increase = TRUE )
population |
Population list |
bvs |
Matrix of phenotypes to enter (one row per individual with 1 element coding individual name) |
na.override |
Set to TRUE to also enter NA values (Default: FALSE - those entries will be skipped) |
count |
Counting for economic cost calculation (default: 1 - (one observation (for "pheno"), one genotyping (for "bve"))) |
count.only.increase |
Set to FALSE to reduce the number of observation for a phenotype to "count" (default: TRUE) |
Population-List with newly entered breeding values
data(ex_pop) bv <- get.bv(ex_pop, gen=2, use.id = FALSE) new.bve <- cbind( colnames(bv), bv[,1]) ## Unrealistic but you do not get better than this! ex_pop <- insert.bv(ex_pop, bvs=new.bve)data(ex_pop) bv <- get.bv(ex_pop, gen=2, use.id = FALSE) new.bve <- cbind( colnames(bv), bv[,1]) ## Unrealistic but you do not get better than this! ex_pop <- insert.bv(ex_pop, bvs=new.bve)
Function to manually enter estimated breeding values
insert.bve( population, bves, type = "bve", na.override = FALSE, count = 1, count.only.increase = TRUE )insert.bve( population, bves, type = "bve", na.override = FALSE, count = 1, count.only.increase = TRUE )
population |
Population list |
bves |
Matrix of breeding values to enter (one row per individual with 1 element coding individual name) |
type |
which time of values to input (default: "bve", alt: "bv", "pheno") |
na.override |
Set to TRUE to also enter NA values (Default: FALSE - those entries will be skipped) |
count |
Counting for economic cost calculation (default: 1 - (one observation (for "pheno"), one genotyping (for "bve"))) |
count.only.increase |
Set to FALSE to reduce the number of observation for a phenotype to "count" (default: TRUE) |
Population-List with newly entered estimated breeding values
data(ex_pop) bv <- get.bv(ex_pop, gen=2, use.id = FALSE) new.bve <- cbind( colnames(bv), bv[,1]) ## Unrealistic but you do not get better than this! ex_pop <- insert.bve(ex_pop, bves=new.bve)data(ex_pop) bv <- get.bv(ex_pop, gen=2, use.id = FALSE) new.bve <- cbind( colnames(bv), bv[,1]) ## Unrealistic but you do not get better than this! ex_pop <- insert.bve(ex_pop, bves=new.bve)
Function to manually enter phenotypes
insert.pheno( population, phenos, na.override = FALSE, count = 1, count.only.increase = TRUE )insert.pheno( population, phenos, na.override = FALSE, count = 1, count.only.increase = TRUE )
population |
Population list |
phenos |
Matrix of phenotypes to enter (one row per individual with 1 element coding individual name) |
na.override |
Set to TRUE to also enter NA values (Default: FALSE - those entries will be skipped) |
count |
Counting for economic cost calculation (default: 1 - (one observation (for "pheno"), one genotyping (for "bve"))) |
count.only.increase |
Set to FALSE to reduce the number of observation for a phenotype to "count" (default: TRUE) |
Population-List with newly entered phenotypes
data(ex_pop) bv <- get.bv(ex_pop, gen=2, use.id = FALSE) new.bve <- cbind( colnames(bv), bv[,1]) ## Unrealistic but you do not get better than this! ex_pop <- insert.pheno(ex_pop, phenos=new.bve)data(ex_pop) bv <- get.bv(ex_pop, gen=2, use.id = FALSE) new.bve <- cbind( colnames(bv), bv[,1]) ## Unrealistic but you do not get better than this! ex_pop <- insert.pheno(ex_pop, phenos=new.bve)
Function to manually enter phenotypes (with repeated records)
insert.pheno.single(population, phenos, count.only.increase = TRUE)insert.pheno.single(population, phenos, count.only.increase = TRUE)
population |
Population list |
phenos |
Matrix of breeding values to enter (one row per individual: 1st column: individual, 2nd column: trait nr, 3rd-nth column records) |
count.only.increase |
Set to FALSE to reduce the number of observation for a phenotype to "count" (default: TRUE) |
Population-List with newly entered phenotypes
data(ex_pop) bv <- get.bv(ex_pop, gen=2, use.id = FALSE) new.bve <- cbind( colnames(bv), 1, bv[,1]) ## Unrealistic but you do not get better than this! ex_pop <- insert.pheno.single(ex_pop, phenos=new.bve)data(ex_pop) bv <- get.bv(ex_pop, gen=2, use.id = FALSE) new.bve <- cbind( colnames(bv), 1, bv[,1]) ## Unrealistic but you do not get better than this! ex_pop <- insert.pheno.single(ex_pop, phenos=new.bve)
Function to simulate a breeding program based on a JSON-file from MoBPSweb
json.simulation( file = NULL, log = NULL, total = NULL, fast.mode = FALSE, progress.bars = FALSE, size.scaling = NULL, rep.max = 1, verbose = TRUE, miraculix.cores = NULL, miraculix.chol = NULL, skip.population = FALSE, time.check = FALSE, time.max = 7200, export.population = FALSE, export.gen = NULL, export.timepoint = NULL, export.cor = FALSE, fixed.generation.order = NULL, generation.cores = NULL, manual.select.check = FALSE )json.simulation( file = NULL, log = NULL, total = NULL, fast.mode = FALSE, progress.bars = FALSE, size.scaling = NULL, rep.max = 1, verbose = TRUE, miraculix.cores = NULL, miraculix.chol = NULL, skip.population = FALSE, time.check = FALSE, time.max = 7200, export.population = FALSE, export.gen = NULL, export.timepoint = NULL, export.cor = FALSE, fixed.generation.order = NULL, generation.cores = NULL, manual.select.check = FALSE )
file |
Path to a json-file generated by the user-interface |
log |
Provide Path where to write a log-file of your simulation (or false to not write a log-file) |
total |
Json-file imported via jsonlite::read_json |
fast.mode |
Set to TRUE work on a small genome with few markers |
progress.bars |
Set to TRUE to display progress bars |
size.scaling |
Scale the size of nodes by this factor (especially for testing smaller examples) |
rep.max |
Maximum number of repeats to use in fast.mode |
verbose |
Set to FALSE to not display any prints |
miraculix.cores |
Number of cores used in miraculix applications (default: 1) |
miraculix.chol |
Set to FALSE to manually deactive the use of miraculix for any cholesky decompostion even though miraculix is active |
skip.population |
Set to TRUE to not execute breeding actions (only cost/time estimation will be performed) |
time.check |
Set to TRUE to automatically check simulation run-time before executing breeding actions |
time.max |
Maximum length of the simulation in seconds when time.check is active |
export.population |
Path were to export the population to (at state selected in export.gen/timepoint) |
export.gen |
Last generation to simulate before exporting population to file |
export.timepoint |
Last timepoint to simulate before exporting population to file |
export.cor |
Set TRUE to export correlation matrices |
fixed.generation.order |
Vector containing the order of cohorts to generate (Advanced // Testing Parameter!) |
generation.cores |
Number of cores used for the generation of new individuals (This will only be active when generating more than 500 individuals) |
manual.select.check |
Set to FALSE to not automatically remove cohorts from Manual select with they lead to an invalid breeding scheme |
Population-list
data(ex_json) population <- json.simulation(total=ex_json)data(ex_json) population <- json.simulation(total=ex_json)
Function to plot genetic/breeding values for multiple generation/cohorts
kinship.development( population, database = NULL, gen = NULL, cohorts = NULL, json = FALSE, ibd.obs = 50, hbd.obs = 10, display.cohort.name = FALSE, display.time.point = FALSE, equal.spacing = FALSE, time_reorder = FALSE, display.hbd = FALSE )kinship.development( population, database = NULL, gen = NULL, cohorts = NULL, json = FALSE, ibd.obs = 50, hbd.obs = 10, display.cohort.name = FALSE, display.time.point = FALSE, equal.spacing = FALSE, time_reorder = FALSE, display.hbd = FALSE )
population |
population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
json |
If TRUE extract which cohorts to plot according to the json-file used in json.simulation |
ibd.obs |
Number of Individual pairs to sample for IBD estimation |
hbd.obs |
Number of Individuals to sample for HBD estimation |
display.cohort.name |
Set TRUE to display the name of the cohort in the x-axis |
display.time.point |
Set TRUE to use time point of generated to sort groups |
equal.spacing |
Equal distance between groups (independent of time.point) |
time_reorder |
Set TRUE to order cohorts according to the time point of generation |
display.hbd |
Set to TRUE to also display HBD in plot |
Estimated of avg. kinship/inbreeding based on IBD/HBD
data(ex_pop) kinship.development(ex_pop,gen=1:5)data(ex_pop) kinship.development(ex_pop,gen=1:5)
Function to compute empirical kinship for a set of individuals
kinship.emp( population = NULL, animals = NULL, gen = NULL, database = NULL, cohorts = NULL, sym = FALSE, use.id = TRUE )kinship.emp( population = NULL, animals = NULL, gen = NULL, database = NULL, cohorts = NULL, sym = FALSE, use.id = TRUE )
population |
Population list |
animals |
List of animals to compute kinship for |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
sym |
If True derive matrix entries below principle-diagonal |
use.id |
Set TRUE to use animal IDs for column/row-names in the output matrix (default: TRUE) |
Empirical kinship matrix (IBD-based since Founders)
data(ex_pop) kinship <- kinship.emp(population=ex_pop, database=cbind(2,1,1,25))data(ex_pop) kinship <- kinship.emp(population=ex_pop, database=cbind(2,1,1,25))
Function to compute empirical kinship for a set of individuals (not all pairs of individuals are evaluated)
kinship.emp.fast( population = NULL, animals = NULL, gen = NULL, database = NULL, cohorts = NULL, ibd.obs = 200, hbd.obs = 50 )kinship.emp.fast( population = NULL, animals = NULL, gen = NULL, database = NULL, cohorts = NULL, ibd.obs = 200, hbd.obs = 50 )
population |
Population list |
animals |
List of animals to compute kinship for |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
ibd.obs |
Number of Individual pairs to sample for IBD estimation |
hbd.obs |
Number of Individuals to sample for HBD estimation |
Empirical kinship matrix (IBD-based since Founders) per gen/database/cohort
data(ex_pop) kinship.emp.fast(population=ex_pop,gen=2)data(ex_pop) kinship.emp.fast(population=ex_pop,gen=2)
Function to compute empirical kinship for a set of individuals (not all pairs of individuals are evaluated)
kinship.emp.fast.between( population = NULL, gen1 = NULL, database1 = NULL, cohorts1 = NULL, gen2 = NULL, database2 = NULL, cohorts2 = NULL, ibd.obs = 50 )kinship.emp.fast.between( population = NULL, gen1 = NULL, database1 = NULL, cohorts1 = NULL, gen2 = NULL, database2 = NULL, cohorts2 = NULL, ibd.obs = 50 )
population |
Population list |
gen1 |
Quick-insert for database1 (vector of all generations to export) |
database1 |
First Groups of individuals to consider for the export |
cohorts1 |
Quick-insert for database1 (vector of names of cohorts to export) |
gen2 |
Quick-insert for database2 (vector of all generations to export) |
database2 |
Second Groups of individuals to consider for the export |
cohorts2 |
Quick-insert for database2 (vector of names of cohorts to export) |
ibd.obs |
Number of Individual pairs to sample for IBD estimation |
Empirical kinship matrix (IBD-based since Founders) per gen/database/cohort
data(ex_pop) kinship.emp.fast(population=ex_pop,gen=2)data(ex_pop) kinship.emp.fast(population=ex_pop,gen=2)
Function to derive expected kinship
kinship.exp( population, gen = NULL, database = NULL, cohorts = NULL, depth.pedigree = 7, start.kinship = NULL, elements = NULL, mult = 1, storage.save = 1.05, verbose = TRUE, include.error = TRUE, elements.copy = FALSE )kinship.exp( population, gen = NULL, database = NULL, cohorts = NULL, depth.pedigree = 7, start.kinship = NULL, elements = NULL, mult = 1, storage.save = 1.05, verbose = TRUE, include.error = TRUE, elements.copy = FALSE )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
depth.pedigree |
Depth of the pedigree in generations |
start.kinship |
Relationship matrix of the individuals in the first considered generation |
elements |
Vector of individuals from the database to include in pedigree matrix |
mult |
Multiplicator of kinship matrix (default: 1; set to 2 for a pedigree relationship matrix) |
storage.save |
Lower numbers will lead to less memory but slightly higher computing time (default: 1.5, min: 1) |
verbose |
Set to FALSE to not display any prints |
include.error |
Set to FALSE to ignore/correct any errors in the pedigree |
elements.copy |
Set to TRUE to automatically remove duplicated entries for individuals/database from the output matrix (default: FALSE) |
Pedigree-based kinship matrix for in gen/database/cohort selected individuals
data(ex_pop) kinship <- kinship.exp(population=ex_pop, gen=2)data(ex_pop) kinship <- kinship.exp(population=ex_pop, gen=2)
Generate LD pot
ld.decay( population, genotype.dataset = NULL, chromosome = 1, dist = NULL, step = 5, max = 500, max.cases = 100, database = NULL, gen = NULL, cohorts = NULL, type = "snp", plot = FALSE, xlim = NULL, ylim = NULL )ld.decay( population, genotype.dataset = NULL, chromosome = 1, dist = NULL, step = 5, max = 500, max.cases = 100, database = NULL, gen = NULL, cohorts = NULL, type = "snp", plot = FALSE, xlim = NULL, ylim = NULL )
population |
Population list |
genotype.dataset |
Genotype dataset (default: NULL - just to save computation time when get.geno was already run) |
chromosome |
Only consider a specific chromosome in calculations (default: 1) |
dist |
Manuel input of marker distances to analyze |
step |
Stepsize to calculate LD |
max |
Maximum distance between markers to consider for LD-plot |
max.cases |
Maximum number of marker pairs to consider of each distance (default: 100; randomly sampled!) |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
type |
Compute LD decay according to following distance measure between markers (default: "snp", alt: "bp", "cM") |
plot |
Set to FALSE to not generate an LD plot |
xlim |
Axis limits for the x-axis in the LD plot |
ylim |
Axis limits for the y-axis in the LD plot |
LD-decay plot for in gen/database/cohorts selected individuals
data(ex_pop) ld.decay(population=ex_pop, gen=5)data(ex_pop) ld.decay(population=ex_pop, gen=5)
Genome for maize according to Lee et al.
maize_chipmaize_chip
Torsten Pook [email protected]
Lee et al 2002
Function to project a matrix in the space of positive definite matrices
matrix.posdef(A, verbose = TRUE, matrix.name = "Matrix", epsilon = 1e-07)matrix.posdef(A, verbose = TRUE, matrix.name = "Matrix", epsilon = 1e-07)
A |
Input matrix to project |
verbose |
Set to FALSE to not display any prints |
matrix.name |
This is just for internal prints |
epsilon |
This factor is added to the diagonal to avoid numerical issues with semi-definit matrices |
Positive definite matrix
Function to merge cohorts in a population list
merging.cohorts(population, cohorts, name.cohort = NULL)merging.cohorts(population, cohorts, name.cohort = NULL)
population |
Population list |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
name.cohort |
Name of the newly added cohort |
data(ex_pop) population <- breeding.diploid(ex_pop, add.gen = 7, breeding.size = 50) population <- breeding.diploid(population, add.gen = 7, breeding.size = 50, selection.m.database = cbind(6,1), selection.f.database = cbind(6,2)) population <- merging.cohorts(population, cohorts = c("Cohort_7_M", "Cohort_8_M"))data(ex_pop) population <- breeding.diploid(ex_pop, add.gen = 7, breeding.size = 50) population <- breeding.diploid(population, add.gen = 7, breeding.size = 50, selection.m.database = cbind(6,1), selection.f.database = cbind(6,2)) population <- merging.cohorts(population, cohorts = c("Cohort_7_M", "Cohort_8_M"))
Generation of the trait in a starting population
merging.trait( population, merge = NULL, trait.name = NULL, bv.standard = FALSE, mean.target = NULL, var.target = NULL, verbose = TRUE, set.zero = FALSE, new.phenotype.correlation = NULL, new.residual.correlation = NULL )merging.trait( population, merge = NULL, trait.name = NULL, bv.standard = FALSE, mean.target = NULL, var.target = NULL, verbose = TRUE, set.zero = FALSE, new.phenotype.correlation = NULL, new.residual.correlation = NULL )
population |
Population list |
merge |
Vector containing the traits to merge (e.g. c(2,3)) |
trait.name |
Name of the trait generated |
bv.standard |
Set TRUE to standardize trait mean and variance via bv.standardization() |
mean.target |
Target mean |
var.target |
Target variance |
verbose |
Set to FALSE to not display any prints |
set.zero |
Set to TRUE to have no effect on the 0 genotype (or 00 for QTLs with 2 underlying SNPs) |
new.phenotype.correlation |
(OLD! - use new.residual.correlation) Correlation of the simulated enviromental variance |
new.residual.correlation |
Correlation of the simulated enviromental variance |
Population-list with one or more additional new traits
population <- creating.diploid(nsnp=1000, nindi=100) population <- creating.trait(population, n.additive=c(100,100)) population <- merging.trait(population, merge = c(1,2))population <- creating.diploid(nsnp=1000, nindi=100) population <- creating.trait(population, n.additive=c(100,100)) population <- merging.trait(population, merge = c(1,2))
Function to selection index weights according to Miesenberger 1997
miesenberger.index(V, G, V1 = NULL, RG = NULL, r, w, zw = NULL)miesenberger.index(V, G, V1 = NULL, RG = NULL, r, w, zw = NULL)
V |
Phenotypic covariance matrix |
G |
Genomic covariance matrix |
V1 |
Inverted phenotypic covariance matrix |
RG |
Genomic correlation matrix |
r |
reliability for the breeding value estimation |
w |
relative weighting of each trait (per genetic SD) |
zw |
Estimated breeding value |
weights of the selection index
Internal function to store genotypes bit-wise
miraculix(population)miraculix(population)
population |
Population list |
Population list
# This is only relevant with the package miraculix is installed and used population <- creating.diploid(nsnp=100, nindi=50, miraculix=FALSE) population <- miraculix(population)# This is only relevant with the package miraculix is installed and used population <- creating.diploid(nsnp=100, nindi=50, miraculix=FALSE) population <- miraculix(population)
Function to change the base-pair in a specific loci
mutation.intro( population, gen = NULL, database = NULL, cohorts = NULL, qtl.posi, target.variant = NULL, haplo.set = 1 )mutation.intro( population, gen = NULL, database = NULL, cohorts = NULL, qtl.posi, target.variant = NULL, haplo.set = 1 )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
qtl.posi |
Marker number to mutate |
target.variant |
target variant to obtain (( if haplotype already is correct do not introduce a mutation )) |
haplo.set |
Select chromosome set (default: 1 , alt: 2, 1:2 (to edit both)) |
Population-List with mutated marker for the selected individual
data(ex_pop) ex_pop <- mutation.intro(ex_pop, database = cbind(1,1,1), qtl.posi=100)data(ex_pop) ex_pop <- mutation.intro(ex_pop, database = cbind(1,1,1), qtl.posi=100)
Function to set a new base generation for the population
new.base.generation( population, base.gen = NULL, base.database = NULL, base.cohorts = NULL, delete.previous.gen = FALSE, delete.breeding.totals = FALSE, delete.bve.data = FALSE, add.chromosome.ends = TRUE, founder.pool = 1 )new.base.generation( population, base.gen = NULL, base.database = NULL, base.cohorts = NULL, delete.previous.gen = FALSE, delete.breeding.totals = FALSE, delete.bve.data = FALSE, add.chromosome.ends = TRUE, founder.pool = 1 )
population |
Population list |
base.gen |
Vector containing all new base generations |
base.database |
Matrix containing all database entries to be used as new base generation |
base.cohorts |
Vector containing all cohorts to be used as new base generations |
delete.previous.gen |
Delete all data before base.gen (default: FALSE) |
delete.breeding.totals |
Delete all breeding totals before base.gen (default: FALSE) |
delete.bve.data |
Delete all previous bve data (default: FALSE) |
add.chromosome.ends |
Add chromosome ends as recombination points |
founder.pool |
AAA |
Population-List with mutated marker for the selected individual
data(ex_pop) ex_pop <- new.base.generation(ex_pop, base.gen=2)data(ex_pop) ex_pop <- new.base.generation(ex_pop, base.gen=2)
In this function the OGC selection according to Meuwissen 1997 is performed
OGC( A, u, Q, cAc = NA, single = TRUE, verbose = FALSE, max_male = Inf, max_female = Inf )OGC( A, u, Q, cAc = NA, single = TRUE, verbose = FALSE, max_male = Inf, max_female = Inf )
A |
relationship matrix |
u |
breeding values |
Q |
sex indicator |
cAc |
target gain in inbreeding |
single |
If FALSE multiple individuals can be removed at the same type (this is faster but potentially inaccurate!) |
verbose |
Set to FALSE to not display any prints |
max_male |
maximum number of male with positive contributions |
max_female |
maximum number of females with positive contributions |
[[1]] Contributions [[2]] expected inbreeding gain
Function to simulate a step in a breeding scheme
ogc.mobps( population, animallist, relationship.matrix.ogc, depth.pedigree.ogc, bve.pedigree.error, ogc.target = "min.sKin", ogc.uniform = NULL, ogc.lb = NULL, ogc.ub = NULL, ogc.ub.sKin = NULL, ogc.lb.BV = NULL, ogc.ub.BV = NULL, ogc.eq.BV = NULL, ogc.ub.sKin.increase = NULL, ogc.lb.BV.increase = NULL, bve.p_i.list = NULL, miraculix = FALSE, miraculix.mult = FALSE, import.position.calculation = NULL, decodeOriginsU = decodeOriginsR, nbits = NULL, store.sparse = FALSE, verbose = TRUE, bit.storing = FALSE )ogc.mobps( population, animallist, relationship.matrix.ogc, depth.pedigree.ogc, bve.pedigree.error, ogc.target = "min.sKin", ogc.uniform = NULL, ogc.lb = NULL, ogc.ub = NULL, ogc.ub.sKin = NULL, ogc.lb.BV = NULL, ogc.ub.BV = NULL, ogc.eq.BV = NULL, ogc.ub.sKin.increase = NULL, ogc.lb.BV.increase = NULL, bve.p_i.list = NULL, miraculix = FALSE, miraculix.mult = FALSE, import.position.calculation = NULL, decodeOriginsU = decodeOriginsR, nbits = NULL, store.sparse = FALSE, verbose = TRUE, bit.storing = FALSE )
population |
Population list |
animallist |
List of individuals to include in ogc |
relationship.matrix.ogc |
Method to calculate relationship matrix for OGC (Default: "pedigree", alt: "vanRaden", "CE", "non_stand", "CE2", "CM") |
depth.pedigree.ogc |
Depth of the pedigree in generations (default: 7) |
bve.pedigree.error |
Set to FALSE to ignore/correct for any pedigree errors |
ogc.target |
Target of OGC (default: "min.sKin" - minimize inbreeding; alt: "max.BV" / "min.BV" - maximize genetic gain; both under constrains selected below) |
ogc.uniform |
This corresponds to the uniform constrain in optiSel |
ogc.lb |
This corresponds to the lb constrain in optiSel |
ogc.ub |
This corresponds to the ub constrain in optiSel |
ogc.ub.sKin |
This corresponds to the ub.sKin constrain in optiSel |
ogc.lb.BV |
This corresponds to the lb.BV constrain in optiSel |
ogc.ub.BV |
This corresponds to the ub.BV constrain in optiSel |
ogc.eq.BV |
This corresponds to the eq.BV constrain in optiSel |
ogc.ub.sKin.increase |
This corresponds to the upper bound (current sKin + ogc.ub.sKin.increase) as ub.sKin in optiSel |
ogc.lb.BV.increase |
This corresponds to the lower bound (current BV + ogc.lb.BV.increase) as lb.BV in optiSel |
bve.p_i.list |
XXX |
miraculix |
XXX |
miraculix.mult |
XXX |
import.position.calculation |
XXX |
decodeOriginsU |
XXX |
nbits |
XXX |
store.sparse |
XXX |
verbose |
Set to FALSE to not display any prints |
bit.storing |
Set to TRUE if the MoBPS (not-miraculix! bit-storing is used) |
contributions of each individual in selection
population <- creating.diploid(nsnp=1000, nindi=100, n.additive = 10) population <- breeding.diploid(population, breeding.size=100, selection.size=c(25,25), ogc = TRUE)population <- creating.diploid(nsnp=1000, nindi=100, n.additive = 10) population <- breeding.diploid(population, breeding.size=100, selection.size=c(25,25), ogc = TRUE)
Function to optimize the number of cores used in the generation of new individuals
optimize.cores( population = NULL, test.size = 2500, max.cores = 10, verbose = TRUE, plot = TRUE )optimize.cores( population = NULL, test.size = 2500, max.cores = 10, verbose = TRUE, plot = TRUE )
population |
Population list |
test.size |
Number of individuals to generate for each core number (default: 2500) |
max.cores |
Maximum number of cores to test (default: 10) |
verbose |
Set to FALSE to not display any prints |
plot |
Set to FALSE to not generate a plot of computing times per core |
Population-list with one or more additional new traits
population = optimize.cores(max.cores=1, test.size=500)population = optimize.cores(max.cores=1, test.size=500)
Function to derive pedigree matrix
pedigree.matrix( population, gen = NULL, database = NULL, cohorts = NULL, depth.pedigree = 7, start.kinship = NULL, elements = NULL, storage.save = 1.05, verbose = TRUE )pedigree.matrix( population, gen = NULL, database = NULL, cohorts = NULL, depth.pedigree = 7, start.kinship = NULL, elements = NULL, storage.save = 1.05, verbose = TRUE )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
depth.pedigree |
Depth of the pedigree in generations |
start.kinship |
Relationship matrix of the individuals in the first considered generation |
elements |
Vector of individuals from the database to include in pedigree matrix |
storage.save |
Lower numbers will lead to less memory but slightly higher computing time (default: 1.5, min: 1) |
verbose |
Set to FALSE to not display any prints |
Pedigree-based kinship matrix for in gen/database/cohort selected individuals
data(ex_pop) pedigree_matrix <- pedigree.matrix(population=ex_pop, gen=2)data(ex_pop) pedigree_matrix <- pedigree.matrix(population=ex_pop, gen=2)
Function to simulate a given pedigree
pedigree.simulation( pedigree, keep.ids = FALSE, plot = TRUE, dataset = NULL, vcf = NULL, chr.nr = NULL, bp = NULL, snp.name = NULL, hom0 = NULL, hom1 = NULL, bpcm.conversion = 0, nsnp = 0, freq = "beta", sex.s = "fixed", chromosome.length = NULL, length.before = 5, length.behind = 5, real.bv.add = NULL, real.bv.mult = NULL, real.bv.dice = NULL, snps.equidistant = NULL, 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.dominant = 0, n.qualitative = 0, n.quantitative = 0, var.additive.l = NULL, var.dominant.l = NULL, var.qualitative.l = NULL, var.quantitative.l = NULL, 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, trait.cor = NULL, trait.cor.include = NULL, share.genotyped = 1, genotyped.s = NULL, map = NULL, remove.invalid.qtl = TRUE, verbose = TRUE, bv.standard = FALSE, mean.target = NULL, var.target = NULL, progress.bar = TRUE, is.maternal = NULL, is.paternal = NULL, vcf.maxsnp = Inf, halffounder = TRUE, output.extended = FALSE )pedigree.simulation( pedigree, keep.ids = FALSE, plot = TRUE, dataset = NULL, vcf = NULL, chr.nr = NULL, bp = NULL, snp.name = NULL, hom0 = NULL, hom1 = NULL, bpcm.conversion = 0, nsnp = 0, freq = "beta", sex.s = "fixed", chromosome.length = NULL, length.before = 5, length.behind = 5, real.bv.add = NULL, real.bv.mult = NULL, real.bv.dice = NULL, snps.equidistant = NULL, 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.dominant = 0, n.qualitative = 0, n.quantitative = 0, var.additive.l = NULL, var.dominant.l = NULL, var.qualitative.l = NULL, var.quantitative.l = NULL, 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, trait.cor = NULL, trait.cor.include = NULL, share.genotyped = 1, genotyped.s = NULL, map = NULL, remove.invalid.qtl = TRUE, verbose = TRUE, bv.standard = FALSE, mean.target = NULL, var.target = NULL, progress.bar = TRUE, is.maternal = NULL, is.paternal = NULL, vcf.maxsnp = Inf, halffounder = TRUE, output.extended = FALSE )
pedigree |
Pedigree-file (matrix with 3 columns (Individual ID, Father ID, Mother ID), optional forth columns with earliest generations to generate an individual) |
keep.ids |
Set to TRUE to keep the IDs from the pedigree-file instead of the default MoBPS ids |
plot |
Set to FALSE to not generate an overview of inbreeding and number of individuals over time |
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 associated 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 |
freq |
frequency of allele 1 when randomly generating a dataset |
sex.s |
Specify which newly added individuals are male (1) or female (2) |
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) |
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 |
n.dominant |
Number of dominante QTL |
n.qualitative |
Number of qualitative epistatic QTL |
n.quantitative |
Number of quantitative epistatic QTL |
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 |
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 shuffled 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 |
trait.cor |
Target correlation between QTL-based traits (underlying true genomic values) |
trait.cor.include |
Vector of traits to be included in the modelling of corrlated traits (default: all - needs to match with trait.cor) |
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 |
progress.bar |
Set to FALSE to not use progress bars in the simulation (Keep log-files lean!) |
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) |
halffounder |
Set to FALSE to make individuals with only one known parent founders (default: TRUE; will additional generate a missing unrelated parent) |
output.extended |
Set TRUE to export more information about the population list |
add.chromosome |
If TRUE add an additional chromosome to the dataset |
Population-list
pedigree <- matrix(c(1,0,0, 2,0,0, 3,0,0, 4,1,2, 5,1,3, 6,1,3, 7,1,3, 8,4,6, 9,4,7), ncol=3, byrow=TRUE) population = pedigree.simulation(pedigree, nsnp = 100)pedigree <- matrix(c(1,0,0, 2,0,0, 3,0,0, 4,1,2, 5,1,3, 6,1,3, 7,1,3, 8,4,6, 9,4,7), ncol=3, byrow=TRUE) population = pedigree.simulation(pedigree, nsnp = 100)
Internal function to perform imputing/phasing (path chosen for the web-based application)
pedmap.to.phasedbeaglevcf( ped_path = NULL, map_path = NULL, vcf_path = NULL, beagle_jar = "/home/nha/beagle.03Jul18.40b.jar", plink_dir = "/home/nha/Plink/plink", db_dir = "/home/nha/Plink/DB/", verbose = TRUE )pedmap.to.phasedbeaglevcf( ped_path = NULL, map_path = NULL, vcf_path = NULL, beagle_jar = "/home/nha/beagle.03Jul18.40b.jar", plink_dir = "/home/nha/Plink/plink", db_dir = "/home/nha/Plink/DB/", verbose = TRUE )
ped_path |
Directory of the ped-file |
map_path |
Directory of the map-file |
vcf_path |
Directory of the vcf-file (this will override any ped/map-file input) |
beagle_jar |
Directory of BEAGLE |
plink_dir |
Directory of Plink |
db_dir |
Directory to save newly generated files (ped/map will be stored in the original folder) |
verbose |
Set to FALSE to not display any prints |
Phased vcf file in vcf_path
Genome for pig according to Rohrer et al.
pig_chippig_chip
Torsten Pook [email protected]
Rohrer et al 1994
Basic plot of the population list
## S3 method for class 'population' plot(x, type = "bve", gen = NULL, database = NULL, cohorts = NULL, ...)## S3 method for class 'population' plot(x, type = "bve", gen = NULL, database = NULL, cohorts = NULL, ...)
x |
Population-list |
type |
Default "bve" - bv.development, alt: "kinship" - kinship.development(), "pca" - get.pca() |
gen |
generations to consider |
database |
groups to consider |
cohorts |
cohorts to consider |
... |
remaining stuff |
Summary of the population list including number of individuals, genome length and trait overview
data(ex_pop) plot(ex_pop)data(ex_pop) plot(ex_pop)
Function to recalculate genomic values
recalculate.bv( population, gen = NULL, database = NULL, cohorts = NULL, bv.ignore.traits = NULL, store.comp.times = TRUE )recalculate.bv( population, gen = NULL, database = NULL, cohorts = NULL, bv.ignore.traits = NULL, store.comp.times = TRUE )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
bv.ignore.traits |
Vector of traits to ignore in the calculation of the genomic value (default: NULL; Only recommended for high number of traits and experienced users!) |
store.comp.times |
If TRUE store computation times in $info$comp.times.general (default: TRUE) |
Population list
data(ex_pop) population <- recalculate.bv(ex_pop, gen=2)data(ex_pop) population <- recalculate.bv(ex_pop, gen=2)
Function to recalculate genomic values
recalculate.manual( population, gen = NULL, database = NULL, cohorts = NULL, e0 = NULL, e1 = NULL, e2 = NULL, store.comp.times = TRUE )recalculate.manual( population, gen = NULL, database = NULL, cohorts = NULL, e0 = NULL, e1 = NULL, e2 = NULL, store.comp.times = TRUE )
population |
Population list |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
e0 |
Effect matrix for 0 genotype (default: Will be automatically extracted) |
e1 |
Effect matrix for 1 genotype (default: Will be automatically extracted) |
e2 |
Effect matrix for 2 genotype (default: Will be automatically extracted) |
store.comp.times |
If TRUE store computation times in $info$comp.times.general (default: TRUE) |
Population list
data(ex_pop) population <- recalculate.manual(ex_pop, gen = 1)data(ex_pop) population <- recalculate.manual(ex_pop, gen = 1)
Standard haldane function
recombination.function.haldane(noc, length.genome)recombination.function.haldane(noc, length.genome)
noc |
number of recombination points |
length.genome |
Length of the genome |
Vector of recombination events
recombination.function.haldane(5, 10)recombination.function.haldane(5, 10)
Function to rename a cohort
renaming.cohort(population, old.name, new.name, verbose = TRUE)renaming.cohort(population, old.name, new.name, verbose = TRUE)
population |
Population list |
old.name |
Quick-insert for database (vector of names of cohorts to export) |
new.name |
Groups of individuals to remove from the database (same IDs!) |
verbose |
Set to FALSE to not display any prints |
population list
data(ex_pop) population <- renaming.cohort(ex_pop, old.name="Cohort_4", new.name = "NewName")data(ex_pop) population <- renaming.cohort(ex_pop, old.name="Cohort_4", new.name = "NewName")
Function to calculate row-wise median values
rowMedian(A)rowMedian(A)
A |
Matrix |
row-wise median values of a matrix
Matrix with modified diagonal entries
A <- matrix(c(1,2,3,4), ncol=2) x <- rowMedian(A)A <- matrix(c(1,2,3,4), ncol=2) x <- rowMedian(A)
Function to scale relationship matricies
scaling.relationship(A, Z, p)scaling.relationship(A, Z, p)
A |
Population list |
Z |
genotype matrix |
p |
allele frequency |
scaled genomic relationship matrix
Function to overwrite age.points of individuals
set.age.point( population, database = NULL, gen = NULL, cohorts = NULL, time.point = 0 )set.age.point( population, database = NULL, gen = NULL, cohorts = NULL, time.point = 0 )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
time.point |
Input value for the age point (time of birth) of an individual (default: 0) |
Population-List with newly entered class values
data(ex_pop) population <- set.age.point(ex_pop, database=cbind(1,1), time.point = 2)data(ex_pop) population <- set.age.point(ex_pop, database=cbind(1,1), time.point = 2)
Function to overwrite class values for individuals
set.class( population, database = NULL, gen = NULL, cohorts = NULL, new.class = 0 )set.class( population, database = NULL, gen = NULL, cohorts = NULL, new.class = 0 )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
new.class |
Class to change to (either single character or vector for each individual when just a single group is selected) |
Population-List with newly entered class values
data(ex_pop) population <- set.class(ex_pop, database=cbind(1,1), new.class = 2)data(ex_pop) population <- set.class(ex_pop, database=cbind(1,1), new.class = 2)
Set default parameter values in breeding.diploid
set.default( population, parameter.name = NULL, parameter.value = NULL, parameter.remove = NULL, reset.all = FALSE )set.default( population, parameter.name = NULL, parameter.value = NULL, parameter.remove = NULL, reset.all = FALSE )
population |
Population list |
parameter.name |
Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL) |
parameter.value |
Genetic variance of traits with no underlying QTL |
parameter.remove |
Remove a specific previously generated parameter default |
reset.all |
Set to TRUE to remove all prior parameter values |
Population-list with one or more additional new traits
data(ex_pop) population <- set.default(ex_pop, parameter.name="heritability", parameter.value=0.3)data(ex_pop) population <- set.default(ex_pop, parameter.name="heritability", parameter.value=0.3)
Function to scale trait for genetic differences based on founder pools
set.mean.pool( population, pool = NULL, mean = NULL, trait = NULL, gen = NULL, database = NULL, cohorts = NULL, reference = "pool", max.effects = Inf )set.mean.pool( population, pool = NULL, mean = NULL, trait = NULL, gen = NULL, database = NULL, cohorts = NULL, reference = "pool", max.effects = Inf )
population |
Population list |
pool |
Vector with pools considered (default: 1:length(mean)) |
mean |
Vector with the target mean for the different pools |
trait |
Which trait to set the new mean for |
gen |
Quick-insert for database (vector of all generations to export) (THIS CAN ONLY BE APPLIED ON FOUNDERS, if empty -> default: 1) |
database |
Groups of individuals to consider for the export (THIS CAN ONLY BE APPLIED ON FOUNDERS) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) (THIS CAN ONLY BE APPLIED ON FOUNDERS) |
reference |
Target mean is compared again the reference (default: "pool" - average genomic value in the respective pool, alt: "all") |
max.effects |
Maximum number of locations in the genome that will be assigned an effect for pool-based correction |
Class of in gen/database/cohorts selected individuals
population = creating.diploid(nsnp = 100, nindi = 10, n.additive = 100, founder.pool = 1) population = creating.diploid(population=population, nindi = 10, founder.pool = 2) population = set.mean.pool(population, mean = c(100,110))population = creating.diploid(nsnp = 100, nindi = 10, n.additive = 100, founder.pool = 1) population = creating.diploid(population=population, nindi = 10, founder.pool = 2) population = set.mean.pool(population, mean = c(100,110))
Function to set time point of birth for individuals
set.time.point( population, database = NULL, gen = NULL, cohorts = NULL, time.point = 0 )set.time.point( population, database = NULL, gen = NULL, cohorts = NULL, time.point = 0 )
population |
Population list |
database |
Groups of individuals to consider for the export |
gen |
Quick-insert for database (vector of all generations to export) |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
time.point |
Input value for the time point (time the cohort of the individual was generated) (default: 0) |
Population-List with newly entered time points
data(ex_pop) population <- set.time.point(ex_pop, database=cbind(1,1), time.point = 2)data(ex_pop) population <- set.time.point(ex_pop, database=cbind(1,1), time.point = 2)
Genome for sheep according to Prieur et al.
sheep_chipsheep_chip
Torsten Pook [email protected]
Prieur et al 2017
Efficient function to perform sort(unique(v))
sortd(v)sortd(v)
v |
Vector |
numerical sorted vector without duplicates
v <- c(1,1,4,5) sortd(v)v <- c(1,1,4,5) sortd(v)
Function to perform single step GBLUP according to Legarra 2014
ssGBLUP(A11, A12, A22, G)ssGBLUP(A11, A12, A22, G)
A11 |
pedigree relationship matrix of non-genotyped individuals |
A12 |
pedigree relationship matrix between non-genotyped and genotyped individuals |
A22 |
pedigree relationship matrix of genotyped individuals |
G |
genomic relationship matrix of genotyped individuals |
Single step relationship matrix
Summary of the population list
## S3 method for class 'population' summary(object, ...)## S3 method for class 'population' summary(object, ...)
object |
Population-list |
... |
additional arguments affecting the summary produced |
Summary of the population list including number of individuals, genome length and trait overview
data(ex_pop) summary(ex_pop)data(ex_pop) summary(ex_pop)
Internal function to write a couple of list entries in a new list
vlist(list, skip = NULL, first = NULL, select = NULL)vlist(list, skip = NULL, first = NULL, select = NULL)
list |
list you want to print details of |
skip |
Skip first that many list-elements |
first |
Only display first that many list-elements |
select |
Display only selected list-elements |
Selected elements of a list
data(ex_pop) vlist(ex_pop$breeding[[1]], select=3:10)data(ex_pop) vlist(ex_pop$breeding[[1]], select=3:10)
write.pedigree.mixblup
write.pedigree( population, path, gen = NULL, database = NULL, cohorts = NULL, id = NULL, depth.pedigree = 7, storage.save = 1.5, verbose = TRUE, mixblup.reliability = FALSE, blupf90 = FALSE, include.error = TRUE )write.pedigree( population, path, gen = NULL, database = NULL, cohorts = NULL, id = NULL, depth.pedigree = 7, storage.save = 1.5, verbose = TRUE, mixblup.reliability = FALSE, blupf90 = FALSE, include.error = TRUE )
population |
Population list |
path |
AA |
gen |
AA |
database |
AA |
cohorts |
AA |
id |
AA |
depth.pedigree |
AA |
storage.save |
AA |
verbose |
AA |
mixblup.reliability |
AA |
blupf90 |
FALSE for mixblup; TRUE for MixBLUP |
include.error |
AA |
pedigree table