Question: adding batch effects as a covariate in additive model in edgeR
0
gravatar for Victoria
3 months ago by
Victoria0
Victoria0 wrote:

Hello everyone,

I have RNA-Seq data from human tissues and I was wondering if I can add the batches in my additive model like this? (The batches are different dates of RNA extraction from tissue.)

x <- read.delim("rawCountMatrix.txt", row.names = "Gene") 
group <- factor(c(1,2,2,2,2,2,1,1,1,1)) 
RIN <- c(5.6,7.6,6.7,5.6,7.6,6.4,6.8,7.7,5.7,8.3) 
Age <- c(106,89,76,82,87,87,73,77,78,88) 
PMI <- c(20.58,15.16,20.17,19.16,21.66,22,22,13.5,12.83,14.5)
Batch <- factor(c("a","a","b","a","a","c","a","c","a","c")) 

design <- model.matrix(~group + Age + RIN + PMI + Batch)

y <- DGEList(counts=x,group=group) 
y <- calcNormFactors(y) 
design <- model.matrix(~group + RIN + Age + PMI) 
y <- estimateDisp(y,design)

fit <- glmFit(y,design) 
lrt <- glmLRT(fit)

If yes, is it the best way to consider batch effects for a well designed study?

I appreciate any help or comments!

edger batch effects • 83 views
ADD COMMENTlink written 3 months ago by Victoria0
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 16.09
Traffic: 172 users visited in the last hour