Hi everyone,
I'm relatively new to using edgeR and I'm doing some work looking at a 2 factor toxicology (treatment [4 levels] & time [3 levels]) transcript project.
I've been following along with a couple bioconductor vignettes and am at the point where I'm fitting my data to the glmQLfit portion. However, when I look at the output for the headers, rather then getting the gene ID's and the groups (as in the edgeR user guide pg 71), I'm getting the intercept and the groups. Is there anything that would cause this? I've included the code that I'm using to get the result explained here. Thanks in advance!
Code:
>design <- model.matrix(~group+time)
>normfact <- estimateDisp(normfact, design, robust = TRUE)
>normfact
>normfact$common.dispersion
>summary(normfact$tagwise.dispersion)
>plotBCV(normfact)
>fit <- glmQLFit(normfact, design, robust=TRUE)
>head(fit$coefficients)
OUTPUT:
(Intercept) groupN groupT groupTN timeB12 timeC24
1 -12.63176 -0.0467496225 -0.34751354 -0.116757410 -0.03835614 0.053469181
2 -10.47211 0.0502074972 0.04794780 0.040551811 -0.01753715 -0.022839745
4 -13.73637 -0.2918577680 -0.46750819 -0.118112091 -0.27250320 -0.320790026
6 -12.90871 -0.2677782345 0.04047747 -0.004869292 0.27539573 0.110037160
8 -14.13635 -0.1915214490 -0.04989598 -0.163178952 0.08314316 0.123834088
9 -10.32999 -0.0002245027 -0.02992052 -0.028494481 -0.01449350 -0.005435779
Thank you for the quick response! So is that necessary then moving forward in DE analyses then? Or will it bring the gene ID's in from the DGE object? I only ask as example 4.4. from the edgeR user guide didn't appear to do anything special in the design matrix for including the gene ID's unless I'm missing something? Maybe I'm not quite following correctly?
If you add the gene annotations to your DGEList at the outset, when you use topTags, they will be added to your list of genes.
edgeR will use whatever gene IDs are in the data object
normfact
.You can insert gene IDs and gene annotation into the edgeR pipeline at any point, but they are not input via the design matrix. Usually people insert the gene annotation at the beginning when the DGEList is created. In any case, it doesn affect the DE results.
Your data object
normfact
might even contain a data.frame of gene annotation, which would be incorporated into any topTags table produced by edgeR. From the code you show, we can't telll whethernormfact
contains such annotation or not.Perfect! Thank you both for the help!