create_genotype: Generate genotype (for single SNP model only)

Description Usage Arguments Value Examples

View source: R/rlib_simulation_util.R

Description

Given MAF range and sample size, generate dosage genotype (0, 1, 2) for one site.

Usage

1
create_genotype(maf, nsample, nreplicate)

Arguments

maf

MAF range, c(maf_low, maf_high)

nsample

number of individual to simulate

nreplicate

number of replicates to simulation

Value

a list of length nreplicate where each element contains a data.frame of simulation genotype (for each haplotype) along with allele frequency.

Examples

1
2
3
4
5
create_genotype(
  maf = c(0.05, 0.3),
  nsample = 300,
  nreplicate = 1000
)

liangyy/mixqtl documentation built on Sept. 17, 2020, 11:36 a.m.