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,
change.order = FALSE,
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
)
number of inidividuals to generate in a random dataset
Share of newly added female individuals (deterministic if sex.s="fixed", alt: sex.s="random")
number of markers to generate in a random dataset
Number of generations to simulate (default: 100)
Number of final individuals to include (default: nindi)
Share of female individuals in the final generation
Set to TRUE to export map, population list and pedigree relationship
Set to FALSE to not generate LD-decay plot and allele frequency spectrum
Set FALSE to not display progress bars. Setting verbose to FALSE will automatically deactive progress bars
Depth of the pedigree in generations (default: 7)
SNP dataset, use "random", "allhetero" "all0" when generating a dataset via nsnp,nindi
Path to a vcf-file used as input genotypes (correct haplotype phase is assumed!)
Vector containing the assosiated chromosome for each marker (default: all on the same)
Vector containing the physical position (bp) for each marker (default: 1,2,3...)
Vector containing the name of each marker (default ChrXSNPY - XY chosen accordingly)
Vector containing the first allelic variant in each marker (default: 0)
Vector containing the second allelic variant in each marker (default: 1)
Convert physical position (bp) into a cM position (default: 0 - not done)
frequency of allele 1 when randomly generating a dataset
Specify which newly added individuals are male (1) or female (2)
Length of the newly added chromosome (default: 5)
Length before the first SNP of the dataset (default: 5)
Length after the last SNP of the dataset (default: 5)
Use equidistant markers (computationally faster! ; default: TRUE)
If TRUE sort markers according to given marker positions
Location of each marker on the genetic map
Manual scaling of snp.position
Set to TRUE if the MoBPS (not-miraculix! bit-storing is used)
Bits available in MoBPS-bit-storing
Set random seed of the process
If TRUE use miraculix package for data storage, computations and dataset generation
Set FALSE to deactive miraculix package for dataset generation
Import genetic map and chip from a species ("cattle", "chicken", "pig")
First parameter of the beta distribution for simulating allele frequencies
Second parameter of the beta distribution for simulating allele frequencies
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()
Set to FALSE to not display any prints
Maximum number of SNPs to include in the genotype file (default: Inf)
# NOT RUN {
population <- founder.simulation(nindi=100, nsnp=1000, n.gen=5)
# }
Run the code above in your browser using DataLab