sim_phenos: Generate phenotypes for three populations YRI, CEU, and CHB.

Description Usage Arguments Value

View source: R/sim_phenos.R

Description

Generate phenotypes for three populations YRI, CEU, and CHB.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
sim_phenos(
  seed = 1234,
  geno_mat,
  chunk_size,
  cores_used,
  af_vec,
  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,
  ld
)

Arguments

geno_mat

a BEDMartix of dimension N (number of individuals from all three populations) by M (number of SNPs).

chunk_size

the size of chunk we perform matrix multiplication

cores_used

the number of cores used in parallel computing

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.

maf_vec

the vector of MAF for all SNPs

Value

a list of phenotypes for YRI (pheno_YRI), CEU (pheno_CEU), and CHB (pheno_CHB).


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