limma - special case of contrasting
0
0
Entering edit mode
@mitja-mitrovic-5648
Last seen 9.6 years ago
Dear Ryan, I apologize for the late response. Yes, I think it works now, although what I did is the following: # my targets file No. CEL_file donor treatment cell_type 1 file1.CEL 1 A TR 2 file2.CEL 1 B TR 3 file3.CEL 2 A TR 4 file4.CEL 2 B TR 5 file5.CEL 2 A TG 6 file6.CEL 2 B TG 7 file7.CEL 3 A TR 8 file8.CEL 3 B TR 9 file9.CEL 3 A TG 10 file10.CEL 3 B TG data <- ReadAffy(filenames=targets$CEL_file) data_rma <- rma(data) treat <- factor(paste(targets$treatment,targets$cell_type,sep=".")) design <- model.matrix(~0+treat) # my design matrix treatA.TG treatA.TR treatB.TG treatB.TR 1 0 1 0 0 2 0 0 0 1 3 0 1 0 0 4 0 0 0 1 5 1 0 0 0 6 0 0 1 0 7 0 1 0 0 8 0 0 0 1 9 1 0 0 0 10 0 0 1 0 designcorfit <- duplicateCorrelation(data_rma,design,block=targets$donor) designcorfit$consensus fit <- lmFit(data_rma,design,block=targets$donor,correlation=designcorfit$con sensus) cm <- makeContrastsTreatA.TG - TreatA.TR+TreatB.TG+TreatB.TR/3 levels = design) # my contrast matrix Contrasts Levels treatA.TG - treatA.TR + treatB.TG + treatB.TR)/3 treatA.TG 1.0000000 treatA.TR -0.3333333 treatB.TG -0.3333333 treatB.TR -0.3333333 fit2 <- contrasts.fit (fit, cm) efit2 <- eBayes(fit2) The produced table of DEGs seems to be what one would expect. Being a limma newbie I'd just like to make sure I'm conducting the experiment in a proper way: would it be more appropriate to use the treatment-contrasts parametrization approach? Doing so I got same DEGs ranked in the same order with slightly lower p-vals, overall. I also can't seem to crack the "role of an intercept". I'd be most grateful if you could clarify these two things to me. Thanks in advance! Mitja On Sun, Dec 9, 2012 at 8:14 PM, Ryan C. Thompson <rct@thompsonclan.org>wrote: > Assuming that your design matrix has columns C1.A, C2.A, C1.B, and C2.B, > wouldn't the contrast simply be "C1.A - (C1.B+C2.A+C2.B)/3"? I.e. "C1.A > minus mean of everything else". If your design matrix has an intercept > column, it might be a little trickier to define that contrast, but still > possible. You might just want to redo your design matrix to have the above > columns and no intercept by doing "design <- model.matrix(~0 + celltype * > treatment + donor, data=targets)", as recommended in the user's guide. > > I think this gives you what you're looking for. > > Hope this helps, > -Ryan > > > On Sun 09 Dec 2012 11:01:04 AM PST, Mitja Mitrovic wrote: > >> Dear Gordon! >> >> sorry for being unclear. A and B are two distinct cell-surface proteins, >> whereas C1 and C2 are two different cell types, that were exposed to those >> treatments. Therefore I'd like to extract DEGs between cells with cell >> type >> C1 and expressing protein A (C1.A) and the rest of the cell populations >> (i.e. the combinations C1.B, C2.A and C2.B). Additionally, I have to >> control for the fact that in most instances cells were derived from the >> same donor. Do you see a straight forward way of getting the afore >> mentioned DEGs? >> >> Kind regards, >> >> Mitja >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane. >> science.biology.informatics.conductor >> > [[alternative HTML version deleted]]
• 803 views
ADD COMMENT

Login before adding your answer.

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