Remove batch effects in meta-analysis
0
0
Entering edit mode
5.7 years ago

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.

R • 2.8k views
ADD COMMENT
0
Entering edit mode

Looks like you've passed in a data-frame to a function that expected a matrix. Could you check the class of all.

ADD REPLY
0
Entering edit mode

Thank you so much, your answer was reasonable and accurate. Your saying is correct, the class of all is "data.frame". I convert all to a character matrix by the following command,

all<- data.matrix(all, rownames.force = NA)

and ComBat function was run without error.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Okay, cool. Thank you, Morteza!

ADD REPLY
0
Entering edit mode

Cool. Can I suggest that you avoid using all as a variable name, since it is a base-R function name

ADD REPLY
0
Entering edit mode

Thank you so much for your valuable guidance.

ADD REPLY

Login before adding your answer.

Traffic: 2572 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6