simulate_phenotype: Simulate phenotype given a set of common and rare variants.

Description Usage Arguments Value Author(s)

View source: R/simulate_phenotype_at_locus.R View source: R/simulate_phenotype.R

Description

Simulate phenotype given a set of common and rare variants.

Simulate phenotype for a single locus based on 3 sets of dieffect distribution parameters.

Usage

1
2
3
simulate_phenotype(x, locus, means = c(1, 2, 3), std_devs = c(1, 1, 1))

simulate_phenotype(x, locus, means = c(1, 2, 3), std_devs = c(1, 1, 1))

Arguments

x

a vcf object from vcfR package

thr_common_rare

maf threshold for common and rare alleles

N_rare

number of rare alleles to affect the trait

beta_params_rare

parameters of the Beta distribution to simulate effect of rare alleles

perc_negative_rare

how many (per cent) rare alleles have negative effect

N_common

number of common alleles to affect the trait

beta_params_common

parameters of the Beta distribution to simulate effect of common alleles

perc_negative_common

how many (per cent) common alleles have negative effect

e

a vector of mean and sd for the error term. Default (0, 1).

Value

a vector of simulated phenotypes

a vector of simulated phenotypes

Author(s)

Marcin Kierczak <marcin.kierczak__INSERT_AT__scilifelab.se>

Marcin Kierczak <marcin.kierczak__INSERT_AT__scilifelab.se>


NBISweden/a_johansson_2020 documentation built on April 18, 2021, 1:09 a.m.