View source: R/founder.simulation.R
| founder.simulation | R Documentation |
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
)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.