Learn R Programming

BatchQC (version 1.0.17)

batchQC_svregress_adjusted: Regress the surrogate variables out of the expression data

Description

Regress the surrogate variables out of the expression data

Usage

batchQC_svregress_adjusted(data.matrix, modmatrix, sva.object)

Arguments

data.matrix
Given data or simulated data from rnaseq_sim()
modmatrix
Model matrix for outcome of interest and other covariates besides batch
sva.object
SVA object

Value

Surrogate variables regress adjusted data

Examples

Run this code
nbatch <- 3
ncond <- 2
npercond <- 10
data.matrix <- rnaseq_sim(ngenes=50, nbatch=nbatch, ncond=ncond, npercond=
    npercond, basemean=10000, ggstep=50, bbstep=2000, ccstep=800, 
    basedisp=100, bdispstep=-10, swvar=1000, seed=1234)
batch <- rep(1:nbatch, each=ncond*npercond)
condition <- rep(rep(1:ncond, each=npercond), nbatch)
pdata <- data.frame(batch, condition)
modmatrix = model.matrix(~as.factor(condition), data=pdata)
sva.object <- batchQC_sva(data.matrix, mod=modmatrix)
batchQC_svregress_adjusted(data.matrix, modmatrix, sva.object)

Run the code above in your browser using DataLab