Description Usage Arguments Value Examples
View source: R/rlib_covariate.R
Given total read count (trc, N x 1) and library size (lib_size, N x 1) along with covarites (N x C), regress covariates against log(trc / lib_size / 2) by two-step approach 1. Regress all covariates against response and select significant ones (alpha = 0.05) 2. Regress the selected covariates against response and return the predicted response
1 | regress_against_covariate(trc, lib_size, covariates)
|
trc |
total read count (dimension = N x 1) |
lib_size |
library size (dimension = N x 1) If it is set to NULL, we consider trc as y and do not do any transformation. |
covariates |
covariates (dimension = C x N) with the first column indicating the covariate name |
predicted response based on the selected covariates (if no covariates are selected, fill in zeros)
1 2 3 4 5 6 7 8 | regress_against_covariate(
trc = rpois(100, 100),
lib_size = rpois(100, 10000),
covariates = cbind(
data.frame(name = paste0('cov', 1:10)),
as.data.frame(matrix(runif(1000), nrow = 10))
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.