limma paired design matrix 3 factors
3
0
Entering edit mode
@wimtrypsteen-6897
Last seen 10.1 years ago
Belgium

Hi all

I've been unsuccesfully browsing forums, limma user guide to find an answer to the following question, I know there are many posts on this allready, so forgive me mine:

We performed following experiment: we infected a celline with a virus and extracted RNA at 4 timepoints after infection. These 4 timepoints are paired to an uninfected condition. This experiment was performed twice to reach 16 samples in total for array analysis.

   experiment time treatment
1     1              2h     uninf
2     1              6h     uninf
3     1             18h     uninf
4     1             30h     uninf
5     1              2h       inf
6     1              6h       inf
7     1             18h       inf
8     1             30h       inf
9     2              2h     uninf
10    2              6h     uninf
11    2             18h     uninf
12    2             30h     uninf
13    2              2h       inf
14    2              6h       inf
15    2             18h       inf
16    2             30h       inf

I am trying to get differential expression at the individual timepoints (2 pairs of uninf vs inf) but creating the correct design matrix to account for paired samples doesn't work for me yet.

Any advice would be more than welcome to provide the correct design and contrast matrix.

Greetings

Wim

 

limma paired design and contrast matrix • 2.2k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 3 hours ago
United States

Depending on how the experiment was done, there may or may not be any batch effect here. You might take a look at a PCA plot of your data to see if there is much separation between batches.

The easiest way to set this up would probably be a cell-means model. Let's say the data.frame you show above is called 'df':

df$trttime <- paste(df$treatment, df$time, sep = "_")
design <- model.matrix(~0 + trttime + experiment, df)
colnames(design) <- gsub("df", "", colnames(design))
contrast <- makeContrasts(inf_2h - uninf_2h, inf_6h - uninf_6h, <other comparisons>, levels = design)

Then you proceed with the usual lmFit(), contrasts.fit(), eBayes() steps.

Does that help?

 

 


 

ADD COMMENT
0
Entering edit mode
@wimtrypsteen-6897
Last seen 10.1 years ago
Belgium

Dear James

Thanks for your answer and time.

I also tried similar design matrices and that worked fine but I am specifically struggling with the pairing of the uninf to infected per experiment. (So first within experiment and than together..) I tried blocking with duplicateCorrelation but I got the exact same result as with what you suggest. Pairing should make results stronger?

Greetings

Wim
 

ADD COMMENT
1
Entering edit mode

Hi Wim,

If I understand your experiment correctly, there is no pairing here. There might be a batch effect (if you ran the two experiments at much different times, or used different reagents, etc), which the 'experiment' term will control for.

But taking cells and putting them in two different flasks, and then treating each flask differently is not pairing. Pairing is when you have e.g., five mice, and you treat all of them with two different treatments at different times. In that situation you might want to control for mouse-specific expression levels by fitting a subject-level effect. But you don't have anything like that, so I wouldn't worry.

Jim

ADD REPLY
0
Entering edit mode
@wimtrypsteen-6897
Last seen 10.1 years ago
Belgium

Hi James

Thanks again for your reply, here is a little bit more information on the experimental setup:

For the experimental setup we started from 1 flask op cells and divided the cells into 2 fractions. 1 fraction we infected with wild type virus and the other fraction with a 'mock' virus (so same treatment but with a mock virus). Both fractions are handled and cultured in the same fashion.

This experiment was performed in duplo.

Would this be pairing? If not, than indeed I don't need to worry :)

Greetings

Wim

ADD COMMENT
0
Entering edit mode

I wouldn't say so. You can run duplicateCorrelation() to see if there is any evidence for any correlation between fractions, but I would think the correlation will be very low.

ADD REPLY

Login before adding your answer.

Traffic: 696 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