Entering edit mode
5.7 years ago
Morteza Hadizadeh
▴
60
Hi every one,
In Meta-Analysis, after combining two data (expression matrix from two microarray study) with the following command,
all<- merge(data1, data2, by= "Entrez")
and for remove batch effects from "all", I used SVA package, but I encounter the following error
library(sva)
allc<- ComBat(all, batch)
Found2batches
Adjusting for0covariate(s) or covariate level(s)
Standardizing Data across genes
Error in ((dat - t(design %*% B.hat))^2) %*% rep(1/n.array, n.array) :
requires numeric/complex matrix/vector arguments
I would be grateful if you could guide me to Fix this error.
Looks like you've passed in a data-frame to a function that expected a matrix. Could you check the class of
all
.Thank you so much, your answer was reasonable and accurate. Your saying is correct, the class of
all
is "data.frame". I convertall
to a character matrix by the following command,and ComBat function was run without error.
For which batches were you adjusting? - linked thread: extract difference gene from two platform
If you are adjusting for batch effects between GSE50512 and GSE22133, then you have likely just also removed the very effect that you wanted to measure, i.e., male versus female breast cancer. As Wouter was saying, batch effect is confounding the effect that you want to measure.
Dear Dr. Blighe,
In the breast cancer section, we act according to your opinion. This is not related to breast cancer. As I said, I am a beginner in Meta-analysis, It was purely for learning and teaching. thank you for devoting your time to answering my questions and helping me to increase my knowledge on this matter.
Okay, cool. Thank you, Morteza!
Cool. Can I suggest that you avoid using
all
as a variable name, since it is a base-R function nameThank you so much for your valuable guidance.