I wonder, in order to do correct TMM-normalization, do I have to add groups in the DGE-object so that the calcNormFactors function knows which groups to perform the normalisation between?
dge <- DGEList(counts,group=ss$groups) #Should I include group=ss$groups??
dge <- calcNormFactors(dge, method="TMM")
des <- model.matrix(~0+ss$groups)
v <- voom(dge,plot = T)
fit <- lmFit(v, design=des)
...
...
What I experience is that I get slight different number of differentially expressed genes depending on if I include group or not in the DGE-object. If I don't include group, does it normalize between all samples, and not specific groups? Which one is more correct?
I set design to the fit object, please see update. is that wrong? I seem to get a few more significant genes when including design in voom.
Your questions are answered by the documentation. You need to use the design matrix both for voom and for the fitting linear models. That's what the design matrix is for.