Entering edit mode
Djie Tjwan Thung
▴
90
@djie-tjwan-thung-5053
Last seen 10.2 years ago
Dear list,
I have a question about removing the effects of a small number of
technical
variables on an expression matrix. I have found that these technical
variables, related to various aspects of the array and experiment,
strongly
correlate to the first few principal components of the expression
matrix.
Now I have already succesfully removed batch effects using the ComBat
function and was wondering if one could also remove confounding
continous
technical variables by using ComBat:
- Is it a valid approach to use ComBat for this?
- If so, how can ComBat be used for this?
- Or am I alternatively better off using linear models?
My approach, was like this:
#Call ComBat
#technical.var is a numerical vector containing numeric measures of
the
technical variable for each sample
#mod is the model matrix containing outcome and covariates of interest
adjusted.exprs.matrix <- ComBat(exprs.matrix, batch=technical.var, mod
=
mod)
However ComBat treats technical.var as a factor. Furthermore the
function
crashes:
Error in solve.default(t(design) %*% design) :
Lapack routine dgesv: system is exactly singular
If ComBat isnt a good method for this am I better off fitting a linear
model including the technical variables and variables of interest and
remove the components due to technical variables, like this is done in
the
removeBatchEffect() function in limma? And possibly altering this
function
as to also handle continous variables? Or other alternatives?
As the removal of batch effects will be incorporated in some sort of
pipeline, I'm interested in returning a cleaned up expression matrix.
So
when further analysis is done on the dataset, for example linear
regression, the technical variables don't have to be included anymore
as
covariates.
I'd appreciate any input!
Kind regards,
Djie Thung
[[alternative HTML version deleted]]