Entering edit mode
Jamal
•
0
@jamal-13612
Last seen 5.1 years ago
hi guys, I want to create a contrasts matrix to compare the Affymetrix array (two types of genotypes, two treatment groups (infected) and controls for each genotype and three times for each genotype), for comparison, I wrote the code below Please guide. Where is the problem?
TF <- paste(P1$Genotype, P1$Time, P1$Treatment, sep=".") TF <- factor(TF) design <- model.matrix(~0+TF) fit <- lmFit(exprs(ndata.raw), design) cont.matrix <- makeContrasts( q1= q.1.E - q.1.C, q6= q.6.E - q.6.C, q24= q.24.E - q.24.C, Q1= Q.1.E - Q.1.C, Q6= Q.6.E - Q.6.C, Q24= Q.24.E - Q.24.C, Diff_1h = (Q.1.E - Q.1.C) - (q.1.E - q.1.C), Diff_6h = (Q.6.E - Q.6.C) - (q.6.E - q.6.C), Diff_24h = (Q.24.E - Q.24.C) - (q.24.E - q.24.C), levels=design)
Is this part of the code (Diff_24h = (Q.24.E - Q.24.C) - (q.24.E - q.24.C)) is correct to compare the two genotypes?