Limma Design matrix for time series+treatment+batch effect
1
0
Entering edit mode
@senthilduraikannukailasam-21472
Last seen 5.4 years ago

dear all, I'm trying to get a DEG analysis of a microarray data.

I have 9 placebo and 9 treated mouse samples. The

3 replicates for each condition factors: 1. TimeOfTreatment <- "2days", " 7days", "12days" 2. TreatmentType <- "placebo" , "drug" 3. BatchID <- "001" , "002"

  TimeOfTreatment <- rep(c("2","4","6","2","4","6","2","4","6"),2)
  TreatmentType <- rep(c("placebo","drug"),9)
  BatchID  <- rep(c("1","1","2","1","1","1","2","1","1"),2)
  groupS <- paste(TimeOfTreatment,TreatmentType,sep= "_")

  model.matrix(~ 0 + groupS + Batch)

Now, I'm not sure how to get the contrast matrix!
For say , 1. I wanted to compare the DGE between all Treated and untreated samples. 2. Between Drug Treated 6th day with Drug Treated 4th day. 3. Between Drug Treated 4th day with Drug Treated 2nd day.

limma factorial design matrix microarray • 1.3k views
ADD COMMENT
2
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 9 hours ago
The city by the bay

Just use makeContrasts. You will have to fix your names so that they are syntactically valid, though.

I wanted to compare the DGE between all Treated and untreated samples.

Compare averages of the groupS levels, e.g., (A1 + A2 + A3)/3 - (B1 + B2 + B3)/3.

Between Drug Treated 6th day with Drug Treated 4th day. 3. Between Drug Treated 4th day with Drug Treated 2nd day.

Compare the relevant levels of groupS, e.g., Drug4 - Drug2, and so on.

ADD COMMENT

Login before adding your answer.

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