Learn R Programming

MultiPhen (version 2.0.3)

mPhen.sampleGeno: Sample genotypes

Description

...

Usage

mPhen.sampleGeno(n = 100, sampSize = 100, chr="0",pos = 1:n, 
snpids = paste(chr,pos,sep="_"),meanAlleleFreq=0.2, mu = 10,
samples =paste("id",1:sampSize,sep="_"),imputed = FALSE, dirichlet = 1)

Arguments

n

Number of genotypes to sample

sampSize

Number of individuals to sample

chr

Name of chromosome

pos

Positions of genotypes on chromosome

snpids

Ids of genotypes

meanAlleleFreq

The mean allele frequency to simulate

mu

A weight parameter which controls how close to the meanAlleleFreq the allele frequencies are sampled, via a beta distribution. A higher number implies allele frequencies stay closer to mean

samples

The sample ids

imputed

Whether to simulate imputed data

dirichlet

The weight of a dirichlet distribution used to simulated imputed data

Value

Returns matrix of genotypes, with individuals by rows, and snps by column, or a 3 dimensional array if imputed is TRUE