Limma Voom Design and Contrast Matrix- Can my parameter also be a factor?
1
0
Entering edit mode
Rita • 0
@rita-24908
Last seen 3.6 years ago
United States

Hello,

I would like to run Limma-Voom to identify the differentially expressed genes between males and females irrespective of their treatment. I have already completed the DEseq2 analysis however, I am having trouble with determining the correct design and contrast matrix for my investigation. It is a mixed-effects model with a random effect for the donor, nested within the sex grouping and I am using limma-voom with the duplicateCorrelation() function.

Please see my original post to my project if there is any confusion in understanding what I am trying to ask. Deseq2 Paired Samples Design

                             MetaData

                                  Donor  Treatment Sex 
              A79_WithFBS          A79    WithFBS   M
              A86_WithFBS          A86    WithFBS   M
              A88_WithFBS          A88    WithFBS   M
              A95_WithFBS          A95    WithFBS   M
              A96_WithFBS          A96    WithFBS   F
              B78_WithFBS          B78    WithFBS   F
              A79_WithoutFBS       A79  WithoutFBS  M
              A86_WithoutFBS       A86  WithoutFBS  M
              A88_WithoutFBS       A88  WithoutFBS  M
              A95_WithoutFBS       A95  WithoutFBS  M
              A96_WithoutFBS       A96  WithoutFBS  F
              B78_WithoutFBS       B78  WithoutFBS  F

                             CountData

                             A79_WithFBS A86_WithFBS A88_WithFBS A95_WithFBS A96_WithFBS B78_WithFBS A79_WithoutFBS A86_WithoutFBS A88_WithoutFBS A95_WithoutFBS A96_WithoutFBS B78_WithoutFBS
             WASH7P              20          17          53          19          49          49           28             29           17              9                 44          17
             AL627309.5           5          12          21           4          13           6           13             18            5              6                  9          28
             WASH9P              32          57          19          52          53          43           83             27           57             28                178          43

Will my model and contrast look like this (below) in that case? If so, how does limma voom know that I am interested in the DEG between males and females (how will it know that Sex is my parameter)?

design <- model.matrix(~ 0 + Treatment ,metaDatamalesMFBatch128)

contrasts <- makeContrasts(TreatmentWithFBS-TreatmentWithoutFBS, 
                           levels=colnames(design))

voom_dge <- voom(GctscountMFBatch128, design, plot=TRUE)

cor <- duplicateCorrelation(voom_dge, design, block = metaDatamalesMFBatch128$Donor )

cor$consensus.correlation

#---------------------------------------------------------------------------------------------------------
#OR will my parameter also be a factor, in this case, Sex, to get DEG between males and females?

design <- model.matrix(~ 0 + Sex+Treatment ,metaDatamalesMFBatch128)

contrasts <- makeContrasts(SexM-SexF, 
                           levels=colnames(design))

voom_dge <- voom(GctscountMFBatch128, design, plot=TRUE)

cor <- duplicateCorrelation(voom_dge, design, block = metaDatamalesMFBatch128$Donor )

cor$consensus.correlation

#Thank you in advance for your assistance!
RNASeqRData limma RNASeq RNASeqR • 1.0k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia

See Section 9.7 on multi-level models in the limma User's Guide. If you handle the Donor repeated measures as a duplicateCorrelation block, then you have a simple experiment with four groups (F treated; M treated; F untreated and M untreated) so you can analyse it using the usual method for most designs:

library(edgeR)
Group <- factor(paste(Treatment, Sex, sep="."))
design <- model.matrix(~ 0 + Group)
colnames(design) <- levels(Group)
fit <- voomLmFit(GctscountBA, design, block=Donor)

Then extract contrasts for any comparison you want to make.

ADD COMMENT

Login before adding your answer.

Traffic: 833 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6