mergeBatches: Merge two ExpressionSet objects by doing quantile...

Description Usage Arguments Value Author(s) Examples

Description

mergeBatches combines x and y into an ExpressionSet, performs quantile normalization and adjusts for batch effects by subtracting the mean expression in each batch (and then adding the grand mean so that the mean expression per gene is unaltered).

Usage

1
mergeBatches(x, y, mc.cores=1)

Arguments

x

ExpressionSet object with data from batch 1.

y

Either ExpressionSet object with data from batch 2, or simulatedSamples object with data from multiple simulations.

mc.cores

Number of processors to be used (ignored when y is an ExpressionSet)

Value

When y is an ExpressionSet, mergeBatches returns an ExpressionSet with combined expressions. Its featureData contains a variable "batch" indicating the batch that each sample corresponded to.

When y is a simulatedSamples object, mergeBatches is applied to combine x with each dataset in y and a list of ExpressionSet objects is returned.

Author(s)

David Rossell

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Fake data from 2 batches
x <- matrix(rnorm(6),nrow=2)
colnames(x) <- paste('x',1:3,sep='')
y <- matrix(1+rnorm(6),nrow=2)
colnames(y) <- paste('y',1:3,sep='')
x <- new("ExpressionSet",exprs=x)
y <- new("ExpressionSet",exprs=y)
exprs(x)
exprs(y)

#Merge & adjust
z <- mergeBatches(x,y)
exprs(z)

casper documentation built on Dec. 17, 2020, 2:01 a.m.