simX {FunctanSNP} | R Documentation |
Generate the sequence (genotypes) data containing only 0, 1 and 2
Description
This function provides a method for generating sequence data containing only 0, 1 and 2, which can be used to simulate the generation of sequence genotypes.
Usage
simX(n, m, seed = 1, d.ratio = 0)
Arguments
n |
an interger variable specifying the number of samples to be generated. |
m |
an interger variable specifying the sequence length of each sample. |
seed |
an integer variable specifying the random seed used for random sequence generation. |
d.ratio |
a numeric variable between 0 and 1 indicating the deletion ratio of sample sequences, default value is 0. |
Value
An "simX" object that contains the list of the following items.
location: a numeric vector defining the sampling sites of the sequence data.
X: a matrix with n rows and m columns representing the sequence data.
See Also
See Also as plotRawdata
, SNPgvf
.
Examples
library(FunctanSNP)
n <- 2
m <- 50
simdata1 <- simX(n, m, seed = 1, d.ratio = 0)
simdata2 <- simX(n, m, seed = 1, d.ratio = 0.3)
plotRawdata(location = simdata1$location, X = simdata1$X)
plotRawdata(location = simdata2$location, X = simdata2$X)
[Package FunctanSNP version 0.1.0 Index]