Main functions

runSimulation()

Run phenotype simulation.

simulatePhenotypes()

Command line execution for PhenotypeSimulator.

Phenotype functions

correlatedBgEffects()

Simulate correlated background effects.

geneticBgEffects()

Simulate infinitesimal genetic effects (reflecting sample kinship).

geneticFixedEffects()

Simulate genetic variant effects.

noiseBgEffects()

Simulate observational noise effects.

noiseFixedEffects()

Simulate noise fixed effects.

Genotype functions

expGen2probGen()

Rewrite expected genotypes into genotype probabilities.

getAlleleFrequencies()

Compute allele frequencies from genotype data.

getCausalSNPs()

Draw random SNPs from genotypes.

probGen2expGen()

Compute expected genotypes from genotype probabilities.

read_lines()

Scan file for specific line numbers

simulateGenotypes()

Simulate bi-allelic genotypes.

standardiseGenotypes()

Standardise genotypes.

Input functions

getKinship()

Get genetic kinship.

readStandardGenotypes()

Read genotypes from file.

Output functions

savePheno()

Save final phenotype and phenotype components.

writeStandardOutput()

Write simulated data into formats used by standard GWAS software.

Simulation helper functions

setModel()

Set simulation model.

General helper functions

addNonNulls()

Add all non-NULL elements of list.

commaList2vector()

Comma-separated string to numeric vector.

rescaleVariance()

Scale phenotype component.

simulateDist()

Data simulation for different distributions.

testNumerics()

Test lists for different properties of numerics.

transformNonlinear()

Phenotype transformation.

vmessage()

Print userinfo.