rmRNAseq (version 0.1.0)

sc_Symm: Simulating Count Data From The Output of Real Data Analysis (corSymm)

Description

This function generates bootstrap samples using parametric bootstrap method.

Usage

sc_Symm(BetaMat, Sigma2Vec, RhoVec, WeightMat, lib.size, design, Subject,
  Time, nrep)

Arguments

BetaMat

a matrix of estimates of regression coefficients.

Sigma2Vec

a vector of shrinkage estimates of error variances.

RhoVec

a vector of estimates of correlation.

WeightMat

a matrix of weights of all genes obtaining from voom.

lib.size

library size in voom method, we choose .75 quantile as library size.

design

a design matrix.

Subject

a vector of subjects/experimental units.

Time

a vector of time points.

nrep

simulation iteration.

Value

a matrix of count data that has nrow(BetaMat) rows and nrow(design) columns.

Examples

Run this code
# NOT RUN {
data(resSymm)
v <- resSymm$ori.res$v[1:20,]
newlm <- resSymm$ori.res$newlm[1:20,]
BetaMat <- data.matrix(newlm[grep("fixed.", names(newlm))])
Sigma2Vec <- newlm$s2_shrunken
RhoVec <- data.matrix(newlm[grep("rho.", names(newlm))])
WeightMat <- v$weights
lib.size <- v$targets$lib.size
nrep <- 1
Subject <- covset$ear
Time <- covset$time
simcounts <- rmRNAseq:::sc_Symm(BetaMat, Sigma2Vec, RhoVec, WeightMat,
lib.size, design, Subject, Time,nrep)
dim(simcounts)
# }

Run the code above in your browser using DataLab