batchQC_analyze: Checks for presence of batch effect and reports whether the...

Description Usage Arguments Value Examples

View source: R/batchQC.R

Description

Checks for presence of batch effect and reports whether the batch needs to be adjusted

Usage

1

Arguments

data.matrix

Given data or simulated data from rnaseq_sim()

batch

Batch covariate

mod

Model matrix for outcome of interest and other covariates besides batch

Value

pca Principal Components Analysis object of the data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)
batchQC_analyze(data.matrix, batch, mod=modmatrix)

BatchQC documentation built on May 20, 2017, 10:32 p.m.

Search within the BatchQC package
Search all R packages, documentation and source code