Entering edit mode
4.3 years ago
anikng
•
0
Treat Time
Sample1 Placebo 0h
Sample2 Placebo 0h
Sample3 Placebo 1h
Sample4 Placebo 1h
Sample7 Drug 0h
Sample8 Drug 0h
Sample9 Drug 1h
Sample10Drug 1h
For an experiment with above factors, I identified DEGs,
Group <- factor(paste(targets$Treat,targets$Time,sep="."))
cbind(targets,Group=Group)
design <- model.matrix(~0+Group)
colnames(design) <- levels(Group)
fit <- glmQLFit(y, design)
my.contrasts <- makeContrasts(
+ Drug.1vs0 = Drug.1h-Drug.0h,
+ Placebo.2vs0 = Placebo.2h-Placebo.0h,
+ levels=design)
qlf <- glmQLFTest(fit, contrast=my.contrasts[,"Drug.1vs0"])
But when new factor is added, for ex, Genotype,
Treat Time Genotype
Sample1 Placebo 0h a
Sample2 Placebo 0h a
Sample3 Placebo 1h a
Sample4 Placebo 1h a
.
.
Sample4 Placebo 1h c
Sample7 Drug 0h c
Sample8 Drug 0h c
Sample9 Drug 1h c
Sample10Drug 1h c
Can I combine the "Genotype" factor and follow the steps as above?
Group <- factor(paste(targets$Treat,targets$Time,targets$Genotype,sep="."))
My aim is to extract genes that are induced at 1hr of drug treatment only for Genotype b (not a and c)