how to set the design in limma
0
0
Entering edit mode
6.3 years ago
Learner ▴ 280

I just want to make sure that I am doing this right

If I want to select the first three column of my data to be my control the design should look like below?

design <- model.matrix(~c(rep(0,3),rep(1,3)))

is this the same for DESq2?

limma • 1.4k views
ADD COMMENT
0
Entering edit mode

Assuming there are only 6 samples and your final three columns are the non-control samples, this will work. However, you might want to give the columns of the design matrix more meaningful names than generated by your code. For example,

design <- model.matrix(~ c(0,0,0,1,1,1))

colnames(design) <- c("baseline", "treatment")

In this design the second column corresponds to the difference between treatment and control, so this should be used as your contrast.

ADD REPLY
0
Entering edit mode

@russhh are you sure that when we have the control , we should assign 0 to it and not 1?

ADD REPLY
0
Entering edit mode

Theoretically it doesn't matter. Try it both ways, see how your experimental changes (contrast coefficients) differ when you use the two different model matrices: look at boxplots of the raw counts when you're doing this. Personally, I think it makes sense for the control to be the baseline. There are many other ways to set up a model matrix for this experiment: you could have ones for control and zeros for treated in column1 and zeros for control and ones for treated in column2; you could have all ones in column1 and -1 for control, 1 for treated in column2. I've probably just confused matters....

ADD REPLY

Login before adding your answer.

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