knitr::opts_chunk$set(echo = TRUE)
We are looking for a dataset (real or simulated) in which there is more of a population or family structure. I ran across the following two papers on bioarchiv which could be of interest:
In those two papers and accompanying packages they explain and provide some algorithms to simulate more complex genotype data.
rm(list = ls()) pacman::p_load(gaston) pacman::p_load(glmnet) pacman::p_load(magrittr) pacman::p_load(snpStats) pacman::p_load_gh('StoreyLab/popkin') pacman::p_load_gh('StoreyLab/bnpsd') pacman::p_load(MASS) devtools::load_all("~/git_repositories/ggmix/")
source("~/git_repositories/ggmix/simulation/model_functions.R") dat <- make_INDmixed_model_not_simulator(n = 1000, p = 10000, ncausal = 100, k = 5, s = 0.5, Fst = 0.1, b0 = 1, beta_mean = 1, eta = 0.10, sigma2 = 4) dat2 <- make_ADmixed_model_not_simulator(n = 1000, p = 10000, ncausal = 100, k = 5, s = 0.5, Fst = 0.1, b0 = 0, beta_mean = 1, eta = 0.10, sigma2 = 4)
popkin::plotPopkin(list(dat$kin, dat2$kin), titles = c("independent","mixed"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.