sim_fixed_family: Simulation with fixed family size

Description Usage Arguments Details Value Warning

View source: R/sim_fixed_family.R

Description

Simulate genetic data, including genotypes, phenotype status and liabilities, for individuals and their family, where each individual has a fixed number of siblings specified by the sib parameter.

Usage

1
sim_fixed_family(n, m, q, hsq, k, sib = 0, path = "")

Arguments

n

number of genotypes (individuals).

m

number of SNPS per genotype.

q

number of causal SNPs, i.e. SNPs that effect chances of having the phenotype.

hsq

squared heritability parameter.

k

prevalence of phenotype.

sib

number of siblings per individual.

path

directory where the files will be stored. If nothing is specified, sim_fixed_family writes its files in the current working directory.

Details

Parents' genotypes are simulated and used for creating the genotypes of the individuals and their siblings. For the methodology behind the simulation, see vignette("liability-distribution").
sim_fixed_family makes use of parallel computation in order to decrease the running time. As one CPU core is left unused, the user should be able to do other work while the simulation is running.

Value

Does not return any value, but prints the following five files to the path parameter specified in the function call:

Warning

Simulating large datasets takes time and generates large files. For details on time complexity and required disk space, see vignette("sim-benchmarks").
The largest file generated is genotypes.ped. See convert_geno_file() to convert it to another file format, thereby reducing its size significantly.


FireGutter/geneference documentation built on Dec. 17, 2021, 8:27 p.m.