pedigree.simulation {MoBPS} | R Documentation |
Simulation of a given pedigree
Description
Function to simulate a given pedigree
Usage
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,
change.order = FALSE,
bv.total = 0,
polygenic.variance = 100,
bve.mult.factor = NULL,
bve.poly.factor = NULL,
base.bv = NULL,
add.chromosome.ends = TRUE,
new.phenotype.correlation = NULL,
new.residual.correlation = NULL,
new.breeding.correlation = NULL,
add.architecture = NULL,
snp.position = NULL,
position.scaling = FALSE,
bit.storing = FALSE,
nbits = 30,
randomSeed = NULL,
miraculix = TRUE,
miraculix.dataset = TRUE,
n.additive = 0,
n.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,
share.genotyped = 1,
genotyped.s = NULL,
map = NULL,
remove.invalid.qtl = TRUE,
verbose = TRUE,
bv.standard = FALSE,
mean.target = NULL,
var.target = NULL,
is.maternal = NULL,
is.paternal = NULL,
vcf.maxsnp = Inf
)
Arguments
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 assosiated chromosome for each marker (default: all on the same) |
bp |
Vector containing the physical position (bp) for each marker (default: 1,2,3...) |
snp.name |
Vector containing the name of each marker (default ChrXSNPY - XY chosen accordingly) |
hom0 |
Vector containing the first allelic variant in each marker (default: 0) |
hom1 |
Vector containing the second allelic variant in each marker (default: 1) |
bpcm.conversion |
Convert physical position (bp) into a cM position (default: 0 - not done) |
nsnp |
number of markers to generate in a random dataset |
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) |
change.order |
If TRUE sort markers according to given marker positions |
bv.total |
Number of traits (If more than traits via real.bv.X use traits with no directly underlying QTL) |
polygenic.variance |
Genetic variance of traits with no underlying QTL |
bve.mult.factor |
Multiplicate trait value times this |
bve.poly.factor |
Potency trait value over this |
base.bv |
Average genetic value of a trait |
add.chromosome.ends |
Add chromosome ends as recombination points |
new.phenotype.correlation |
(OLD! - use new.residual.correlation) Correlation of the simulated enviromental variance |
new.residual.correlation |
Correlation of the simulated enviromental variance |
new.breeding.correlation |
Correlation of the simulated genetic variance (child share! heritage is not influenced! |
add.architecture |
Add genetic architecture (marker positions) |
snp.position |
Location of each marker on the genetic map |
position.scaling |
Manual scaling of snp.position |
bit.storing |
Set to TRUE if the MoBPS (not-miraculix! bit-storing is used) |
nbits |
Bits available in MoBPS-bit-storing |
randomSeed |
Set random seed of the process |
miraculix |
If TRUE use miraculix package for data storage, computations and dataset generation |
miraculix.dataset |
Set FALSE to deactive miraculix package for dataset generation |
n.additive |
Number of additive QTL |
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 shuffeled traits |
skip.rest |
Internal variable needed when adding multipe chromosomes jointly |
enter.bv |
Internal parameter |
name.cohort |
Name of the newly added cohort |
template.chip |
Import genetic map and chip from a species ("cattle", "chicken", "pig") |
beta.shape1 |
First parameter of the beta distribution for simulating allele frequencies |
beta.shape2 |
Second parameter of the beta distribution for simulating allele frequencies |
time.point |
Time point at which the new individuals are generated |
creating.type |
Technique to generate new individuals (usage in web-based application) |
trait.name |
Name of the trait generated |
share.genotyped |
Share of individuals genotyped in the founders |
genotyped.s |
Specify with newly added individuals are genotyped (1) or not (0) |
map |
map-file that contains up to 5 colums (Chromsome, SNP-id, M-position, Bp-position, allele freq - Everything not provides it set to NA). A map can be imported via MoBPSmaps::ensembl.map() |
remove.invalid.qtl |
Set to FALSE to deactive the automatic removal of QTLs on markers that do not exist |
verbose |
Set to FALSE to not display any prints |
bv.standard |
Set TRUE to standardize trait mean and variance via bv.standardization() - automatically set to TRUE when mean/var.target are used |
mean.target |
Target mean |
var.target |
Target variance |
is.maternal |
Vector coding if a trait is caused by a maternal effect (Default: all FALSE) |
is.paternal |
Vector coding if a trait is caused by a paternal effect (Default: all FALSE) |
vcf.maxsnp |
Maximum number of SNPs to include in the genotype file (default: Inf) |
add.chromosome |
If TRUE add an additional chromosome to the dataset |
Value
Population-list
Examples
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=1000)