Simulate the genetic data of individuals, with or without including family members.
sim_fixed_family()
Simulation with fixed family size
sim_no_family()
Simulation without family history
sim_random_family()
Simulation with random family sizes
sim_test()
Simulation directly in the R session without family history
sim_varied_family()
Simulation with varying family sizes
Assign refined representations of phenotypes and run regressions to infere which SNPs are causal.
assign_GWAX_phenotype()
Create phenotype status by proxy
assign_ltfh_phenotype()
Calculate posterior mean genetic liabilities
analysis_association()
Run association analysis
Import simulations and analyses to R, perform augmentations and calculations of results.
load_phenotypes()
Import phenotype data
load_results()
Import and merge results
augment_results()
Augment results for plotting
calculate_cov()
Calculate covariance matrix of liabilities
calculate_error_types()
Calculate error types
Once data has been imported to R and augmented to contain the necessary columns, these functions can be used for visualising different aspects of the results. The plots can either be saved to disk or returned as ggplot2 objects.
plot_estimates_vs_true()
Plot true effects against estimated effects of SNPs
plot_manhattan()
Manhattan plot of p-values
plot_pmgl_vs_true()
Plot true genetic liabilities against posterior mean genetic liabilities
plot_pval_QQ()
Plot a QQ-plot of p-values
plot_pval_hist()
Plot a histogram of p-values
compare_beta()
Plot transformed linear GWAS beta values against the LTFH_transformed values.
These are miscellaneous helper functions also exported by the package.
convert_geno_file()
Convert files to .bed
covmatrix()
Create covariance matrix for liabilities