main: main function for simulation

Description Usage Arguments Value

View source: R/sim_main.R

Description

main function for simulation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
main(
  sim_label = 1,
  N_YRI,
  N_CEU,
  N_CHB,
  p_YRI,
  p_CEU,
  p_CHB,
  h2_YRI,
  h2_CEU,
  h2_CHB,
  prare_YRI,
  prare_CEU,
  prare_CHB,
  dist = "gaussian",
  ld = "strong",
  chunk_size,
  cores_used
)

Arguments

sim_label

denotes the x-th simulation

N_YRI

the number of YRI individuals

N_CEU

the number of CEU individuals

N_CHB

the number of CHB individuals

p_YRI

the proportion of causal SNPs in YRI population

p_CEU

the proportion of causal SNPs in CEU population

p_CHB

the proportion of causal SNPs in CHB population

h2_YRI

heritability of this phenotype in YRI population

h2_CEU

heritability of this phenotype in CEU population

h2_CHB

heritability of this phenotype in CHB population

prare_YRI

proportion of causal rare SNPs in YRI population

prare_CEU

proportion of causal rare SNPs in CEU population

prare_CHB

proportion of causal rare SNPs in CHB population

dist

distribution of effect sizes, default is "gaussian". Options can be "gaussian", "exponential", "laplace". Note that LDpred simulates non-zero effect sizes from laplace distribution.

ld

linkage disequilibrium. Options can be "strong" or "weak". We simulate nearby snps together when ld is strong. We simulate snps evenly spread over all variants when ld is weak.

chunk_size

the size of chunk we perform matrix multiplication

cores_used

the number of cores used in parallel computing

Value

phenotypes for three populations and effect sizes for three populations


KaiqianZhang/prsim documentation built on Feb. 7, 2022, 10:58 p.m.