Simulate data from the same model(s) used in the rmaverick inference step. Data can be generated from models with or without admixture.

sim_data(
  n = 10,
  ploidy = 2,
  loci = 10,
  allele_num = 5,
  lambda = 1,
  admix_on = FALSE,
  alpha = 1,
  K = 3,
  pop_col_on = TRUE,
  ploidy_col_on = TRUE
)

Arguments

n

number of samples

ploidy

ploidy of every sample. If scalar then the same value applies to all samples

loci

number of loci

allele_num

number of alleles per locus

lambda

prior parameter on allele frequency distribution

admix_on

whether to simulate from the admixture model

alpha

the admixture parameter

K

the number of subpopulations

pop_col_on

whether to simulate data with a population column

ploidy_col_on

whether to simulate data with a ploidy column