simulateGenotypes {PhenotypeSimulator}R Documentation

Simulate bi-allelic genotypes.

Description

Simulate bi-allelic genotypes.

Usage

simulateGenotypes(
  N,
  NrSNP = 5000,
  frequencies = c(0.1, 0.2, 0.4),
  sampleID = "ID_",
  snpID = "SNP_",
  verbose = TRUE
)

Arguments

N

Number of samples for which to simulate bi-allelic genotypes.

NrSNP

Number of SNPs to simulate.

frequencies

Vector of allele frequencies [double] from which to sample.

sampleID

Prefix [string] for naming samples (will be followed by sample number from 1 to N when constructing id_samples).

snpID

Prefix [string] for naming SNPs (will be followed by SNP number from 1 to NrSNP when constructing id_snps).

verbose

[boolean] If TRUE, progress info is printed to standard out.

Value

Named list with [N x NrSNP] matrix of simulated genotypes (genotypes), their SNP frequencies (freq), a vector of sample IDs (id_samples) and a vector of SNP IDs (id_snps).

See Also

standardiseGenotypes

Examples

N10NrSNP10 <- simulateGenotypes(N=10, NrSNP=10)
N10NrSNP10 <- simulateGenotypes(N=10, NrSNP=10,
frequencies=c(0.2,0.3,0.4))

[Package PhenotypeSimulator version 0.3.4 Index]