Question: Remove batch effects in meta-analysis
0
gravatar for Morteza Hadizadeh
3 months ago by
Physiology Research Center, Institute of Basic and Clinical Physiology Sciences, Kerman University of Medical Sciences, Kerman, Iran
Morteza Hadizadeh10 wrote:

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 • 264 views
ADD COMMENTlink modified 3 months ago by zx87547.5k • written 3 months ago by Morteza Hadizadeh10

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

ADD REPLYlink written 3 months ago by russhh4.4k

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 REPLYlink written 3 months ago by Morteza Hadizadeh10

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 REPLYlink written 3 months ago by Kevin Blighe43k

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 REPLYlink written 3 months ago by Morteza Hadizadeh10

Okay, cool. Thank you, Morteza!

ADD REPLYlink written 3 months ago by Kevin Blighe43k

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

ADD REPLYlink written 3 months ago by russhh4.4k

Thank you so much for your valuable guidance.

ADD REPLYlink written 3 months ago by Morteza Hadizadeh10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 921 users visited in the last hour