fsva: A function for performing frozen surrogate variable analysis as proposed in Parker, Corrada Bravo and Leek 2013
Description
This function performs frozen surrogate variable analysis as described in Parker, Corrada Bravo and Leek 2013.
The approach uses a training database to create surrogate variables which are then used
to remove batch effects both from the training database and a new data set for prediction purposes.
For inferential analysis see sva, svaseq, with low level functionality available
through irwsva.build and ssva.
A m genes by n arrays matrix of expression data from the database/training data
mod
The model matrix for the terms included in the analysis for the training data
sv
The surrogate variable object created by running sva on dbdat using mod.
newdat
(optional) A set of test samples to be adjusted using the training database
method
If method ="fast" then the SVD is calculated using an online approach, this may introduce slight bias. If method="exact" the exact SVD is calculated, but will be slower
Value
db An adjusted version of the training database where the effect of batch/expression heterogeneity has been removednew An adjusted version of the new samples, adjusted one at a time using the fsva methodology.newsv Surrogate variables for the new samples