simulSnpEffectsTraits12: Simul breeding game

View source: R/breeding_game.R

simulSnpEffectsTraits12R Documentation

Simul breeding game

Description

Simulate the additive SNP effects of traits 1 and 2 jointly, with some degree of pleiotropy.

Usage

simulSnpEffectsTraits12(
  snp.ids,
  sigma.beta2 = c(trait1 = 0.017, trait2 = 10^(-4)),
  prop.pleio = 0.4,
  cor.pleio = -0.7,
  verbose = 1
)

Arguments

snp.ids

vector of SNP identifiers for which effects should be simulated

sigma.beta2

vector of variances of additive SNP effects for both traits

prop.pleio

proportion of SNPs having an effect on both traits

cor.pleio

genotypic correlation at these SNPs

verbose

verbosity level (0/1)

Value

list with a matrix of SNP effects and a vector identifying which SNPs are pleiotropic

Author(s)

Timothee Flutre

Examples

## Not run: set.seed(1859)
X <- simulGenosDose(nb.genos=825, nb.snps=2000)
snp.effects <- simulSnpEffectsTraits12(snp.ids=colnames(X))
sum(snp.effects$is.pleiotropic)
regplot(snp.effects$Beta[,1], snp.effects$Beta[,2])

## End(Not run)

timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.