Description Usage Arguments Value See Also Examples
View source: R/genotypeFunctions.R
Simulate bi-allelic genotypes.
1 2 3 4 5 6 7 8 | simulateGenotypes(
N,
NrSNP = 5000,
frequencies = c(0.1, 0.2, 0.4),
sampleID = "ID_",
snpID = "SNP_",
verbose = TRUE
)
|
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. |
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).
1 2 3 | N10NrSNP10 <- simulateGenotypes(N=10, NrSNP=10)
N10NrSNP10 <- simulateGenotypes(N=10, NrSNP=10,
frequencies=c(0.2,0.3,0.4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.