adding batch effects as a covariate in additive model in edgeR
0
0
Entering edit mode
Victoria • 0
@victoria-21093
Last seen 5.1 years ago

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 • 828 views
ADD COMMENT

Login before adding your answer.

Traffic: 567 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