Hi all,
I am using Limma for the first time to analyze my two-color microarray data. So, I would like to know the best way to proceed to create my Targets file. My experiment has the following technical replicates:
CY3 CY5
1. gene of interest control
2. gene of interest control
3. control gene of interest
4. control gene of interest
5. gene of interest (treated) control (treated)
6. gene of interest (treated) control (treated)
7. control (treated) gene of interest(treated)
. 1=2 / 3=4 / 5=6
My question is: how can I proceed in this part below?
biolrep<- c(1, 1, 2,2, 3) ## I am not sure about this part
design <- c(-1,1,-1,1) ## I am not sure about this part too
corfit<- duplicateCorrelation(MA, design, ndups = 1, block=biolrep)
fit <- lmFit(MA, design, block = biolrep, cor = corfit$consensus)
fit<-eBayes(fit)
topTable(fit, adjust = "BH")
Thanks in advance
cheers,
Sanches
Dear Gordon Smyth,
Thanks for your reply.
So, in this case, do I have to write my script the following way below?
targets <- cbind(Cy3=c("Gene of interest","Gene of interest", "Control", "Control", "Gene of interest_Treatment", "Gene of interest_Treatment", "Control_Treatment"), Cy5=c("Control", "Control", "Gene of interest", "Gene of interest", "Control_Treatment", "Control_Treatment", "Gene of interest_Treatment")) rownames(targets) <- paste("Array",1:7) parameters <- cbind(C=c(-1,-1, 0, 0, 1, 1, 2), T=c(0, 0, -1, -1, 2 , 2, 1)) rownames(parameters) <- c("Reference","Control","Treatment") # What is the right way to write this part? modelMatrix(targets, parameters) modelMatrix(targets, ref="Reference") design<- model.matrix(targets, parameters)
# OBS.: I ran the script but it appears an error.
Thanks in advance.
No, that isn't right, for a few different reasons. If you use the 'parameters' argument to modelMatrix() then it has to refer to samples that appear in your experiment. You can't just make up names like "Reference" that don't actually appear in your targets file.
Anyway, see my answer below.