PopulationSNPSet: Simulation of a population of genotypic profiles

View source: R/PopulationSNPSet.R

PopulationSNPSetR Documentation

Simulation of a population of genotypic profiles

Description

PopulationSNPSet is used to generate a population matrix, where each row is a genotypic profile corresponding to an individual. It can be used to generate a matrix of genotypes according to an observed dependence structure. This function is based on the GenOrd package.

Usage

PopulationSNPSet(n, Sigma = NULL, maf = NULL, marginal = NULL,
  X = NULL)

Arguments

n

the desired number of individuals

Sigma

a correlation matrix

maf

a vector of minor allele frequencies; if this is given, Hardy-Weinberg equilibrium is assumed

marginal

a list of marginal distributions, where each element of the list is a vector of length 1 or 2 of cumulative probabilities. See the ordsample function from the GenOrd package for more information

X

an observed matrix of genotypic profiles; if this is given, the sample is simulated according to the dependence structure and marginal distributions observed in X.

Value

A matrix X of size N x p of genotypic profiles (displayed as rows).

References

Alessandro Barbiero and Pier Alda Ferrari (2015). GenOrd: Simulation of Discrete Random Variables with Given Correlation Matrix and Marginal Distributions. R package version 1.4.0. https://CRAN.R-project.org/package=GenOrd


fhebert/SNPSetSimulations documentation built on Jan. 9, 2025, 3:17 a.m.