I am more a DESeq2 user and switch to edgeR recently. I received scripts from other dev. With DESeq I used to directly inject raw counts...Here the guy pre-normalise count using, is that ok ?
Is this double normalization because I think edgeR intrinsically normalize reads, right ? So I was wondering if I should remove this part of code before edgeR call. What do you think ?
Roughly :
###### Useless section ? ######
q <- apply(counts,2,function(x) quantile(x[x>0],prob=0.75))
ncounts <- sweep(counts,2,q/median(q),"/")
################################# Should I just use counts ?
dge <- DGEList(ncounts,genes=rownames(ncounts))
design <- model.matrix(~0+dge$group) # no intercept #x0 = 1, force model throught the origin
colnames(design) <- gsub("^dge$group","",colnames(design))
cm <- makeContrasts(contrasts=comp,levels=dge$group)
y <- estimateDisp(dge,design,robust=T)
fit.y <- glmFit(y,design)
lrt <- glmLRT(fit.y,contrast=cm)