Hi there, I am completely stumped in the analysis of my RNAseq data set using limma. But is there is a possibility to extract the mean expression levels for each sample (averaged among 3 biol. replicates and adjusted for block effects) from the lmFit output or can these be calculate with the help of the estimated coefficients? I have 4 genotypes and for each genotype 3 biological replicates. Prior to do any differential expression analysis, I would like extract the mean expression levels for each gene and each genotype adjusted for any block effects in my experimental design.
so far, I followed the limma pipeline:
design <- model.matrix(~0 + genotype + block)
v <- voom(dge, design, plot=TRUE)
fit <- lmFit (v, design)
Thanks for your input and help.
Thanks for your reply. So the fit$coef of lmFit are the adjusted mean log2CPM for each genotype? I guess I got confused with the coeficients used for DE determination and the lmFit function description, which says: "The coefficients of the fitted models describe the differences between the RNA sources hybridized to the arrays".
What the coefficients describe is a function of the design matrix that you used. Your design matrix is a 'cell means' model, which computes the mean for each group. Since you also have block in the model, the computed means are adjusted for the block factor.
You also want to specify
to make sure that the block effects add to zero. Then the block effects won't bias the genotype coefficient, which will then be interpretable as genotype means.
Thanks, James and Gordon, for your help and clarifications! My R script to obtain genotype means adjusted for block effects:
You actually need