Description Usage Arguments Details Value Author(s) References Examples
This is an extention of the madsim package on CRAN. We extend the package to have a time-decay on the differential expression to simulate a situation where the gene expression was sampled some time before the effect of the condition under study manifested. This situation is likely to occur in prospective studies. The function pmadsim() allows to generate two biological conditions synthetic microarray dataset with known characteristics in differential expression and followup time. These data have similar behavior as those obtained with current microarray platforms. Hence, they can be used for performance evaluation of data meta-analysis methods.
1 2 3 4 | pmadsim(mdata = NULL, n = 10000, ratio = 0,
fparams = data.frame(m1=7,m2=7,shape2=4,lb=4,ub=14,pde=0.02,sym=0.5),
dparams = data.frame(lambda1=0.13, lambda2=2, muminde=1, sdde=0.5),
sdn = 0.4, rseed = 50)
|
mdata |
a data frame with numerical values to be used as seed,
its length should be greater than 100. When set to
NULL (default) data generated are fully synthetic:
|
n |
an integer specifying the number of genes in the data generated:
|
ratio |
a flag (0,1) allowing to have log2 intensitie or log2 ratio:
|
fparams |
a data frame containing 7 components defining the data
lower (lb) and upper bound (ub), the beta distribution
shape (shape2) parameter, the percentage of differentially
expressed (pde) number of genes and the partition of the
number of down and up regulated (sym) genes: |
dparams |
a data frame containing 4 components defining how low and
high expressed genes are distributed (lambda1), and
how changes are for DE genes (lambda2, muminde, sdde): |
sdn |
a positive scalar used as standard deviation for the
additive gaussian noise: |
rseed |
an integer used as seed for generating random number
by the computer in use: |
followup |
logical indicating whether there should be a followup-effect
stratified |
logical indicating whether there should be a stratum effect
User provides a subset of parameters. A detailed description of these parameters is available in the reference given below. Default parameters settings (in arguments above) can be modified.
Returned is a data frame containing 3 components
xdata |
a dataset with sizes, the number of rows and columns, specified by input parameters n and m1+m2, respectively |
xid |
a vector of indexes with values are from the set (0, -1, 1). These values are used for non differentially expressed, down- and up-regulated genes |
followup |
a vector of followup time for the observations in xdata |
stratum |
a vector of stratum indicators for the observations in xdata |
xsd |
a scalar containing the standard deviation of first column of the dataset generated |
Doulaye Dembele, Einar Holsbø
Dembele D. (2013), A Flexible Microarray Data Simulation Model. Microarrays, 2013, 2(2):115-130
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # load a sample of real microarray data
data(madsim_test)
# set parameters settings
mdata <- madsim_test$V1;
fparams <- data.frame(m1 = 7, m2 = 7, shape2 = 4, lb = 4, ub = 14,pde=0.02,sym=0.5);
dparams <- data.frame(lambda1 = 0.13, lambda2 = 2, muminde = 1, sdde = 0.5);
sdn <- 0.4; rseed <- 50;
# generate fully synthetic data
mydata1 <- pmadsim(mdata = NULL, n = 10000, ratio = 0, fparams, dparams, sdn, rseed);
# use true affymetrix data to generate synthetic data
mydata2 <- pmadsim(mdata = madsim_test, n=10000, ratio=0,fparams,dparams,sdn,rseed);
A1 <- 0.5*(mydata1$xdata[,12] + mydata1$xdata[,1]);
M1 <- mydata1$xdata[,12] - mydata1$xdata[,1];
A2 <- 0.5*(mydata2$xdata[,12] + mydata2$xdata[,1]);
M2 <- mydata2$xdata[,12] - mydata2$xdata[,1];
# draw MA plot using samples 1 and 12
op <- par(mfrow = c())
plot(A1,M1)
plot(A2,M2)
par(op)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.