In our data example (see the target file in Table 1 in vignette),
we have used a paired design (by subject) to assess the differential expression
between two treatments B and C vs a control treatment A. That is, we want to obtain the
microRNAS that are differentially expressed between conditions A vs B and A vs C.
The linear model that we are going to fit to every miRNA is defined by equation:
y = Treatment + Subject + error term. This model is going to
estimate the treatment effect and then, the comparison between the different treatments
are done in terms of contrasts between the estimates of the treatment effects.
To fit the model, we need first to define a design matrix. The design matrix is an
incidence matrix that relates each array/sample/file to its given experimental
conditions, in our case, relates each file to one of the three treatments and
with its particular subject.
If treatment is a factor variable, we can define de desing matrix using
model.matrix(~ -1 + treatment + subject). Then the linear model can be fitted using
fit=lmFit(eset,design). This will get the treatment estimates for each
microRNA in the eset object:
treatmentA treatmentB treatmentC subject2
hsa-miR-152 7.5721 7.656 7.566 -0.1157
hsa-miR-15a* 0.9265 1.066 1.211 -0.2242
hsa-miR-337-5p 6.2448 7.298 7.084 -0.4489
We can define the contrasts of interest using a contrast matrix as in
CM=cbind(MSC\_AvsMSC\_B=c(1,-1,0),
MSC\_AvsMSC\_C=c(1,0,-1))
And then, we can estimate those contrats using fit2=contrasts.fit(fit,CM). Finally, we
can obtain moderated statistics using fit2=eBayes(fit2).
The function 'basicLimma' implemented in AgiMicroRna produces the last fit2
object, that has in fit2\$coeff the M values, in fit\$t the moderated-t
statistic of the contrasts, and in fit2\$p.value the corresponding
p value of each particular contrasts. Be aware that these p values must be corrected by
multiple testing.
MSC\_AvsMSC\_B MSC\_AvsMSC\_C
hsa-miR-152 0.67567761 0.977326746
hsa-miR-15a* 0.68019442 0.413657270
hsa-miR-337-5p 0.03737814 0.075248741
See limmaUsersGuide() for a complete description of the limma package.