deseq_fn | R Documentation |
Computes gene-wise p-values from DESeq2 method using observation-wise dispersion estimates
deseq_fn(y, x, phi, indiv)
y |
a numeric matrix of dim |
x |
a numeric design matrix of dim |
phi |
a numeric design matrix of size |
indiv |
a vector of length |
ind |
## Not run: #rm(list=ls()) set.seed(123) ##generate some fake data ######################## n <- 100 r <- 12 phi <- matrix(rep(1:3), 4, ncol=1, nrow=r) sigma <- 0.4 b0 <- 1 #under the null: b1 <- 0 #under the alternative: b1 <- 0.7 y.tilde <- b0 + b1*phi + rnorm(r, sd = sigma) y <- floor(exp(t(matrix(rnorm(n*r, sd = sqrt(sigma*abs(y.tilde))), ncol=n, nrow=r) + matrix(rep(y.tilde, n), ncol=n, nrow=r)))) x <- matrix(1:2, ncol=1, nrow=r/2) indiv=rep(1:4, each=3) #run test temp <- deseq_fn(y, x, phi, indiv) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.