Adjusted Expression Values using linear model
1
0
Entering edit mode
@nathan-s-watson-haigh-2987
Last seen 9.7 years ago
Using limma, my design matrix includes a "contamination" parameter: C.d60 T.d60 C.d67 T.d67 Contamination 1 1 0 0 0 0 2 1 0 0 0 1 3 1 0 0 0 0 4 1 0 0 0 1 5 0 1 0 0 0 6 0 1 0 0 1 7 0 1 0 0 1 8 0 1 0 0 1 9 0 1 0 0 0 10 0 0 1 0 0 11 0 0 1 0 0 12 0 0 1 0 0 13 0 0 1 0 1 14 0 0 0 1 0 15 0 0 0 1 0 16 0 0 0 1 0 I'd like to generate some heatmaps following the identification of differentially expressed genes using limma. But I'd like to use adjusted expression values such that the contamination effect is removed as it detracts from the visual impact of the differences identified by my contrasts of interest. On an individual gene basis, I think the following works: gene <- "Bt.24880.1.S1_at" # unadjusted expression values exprs(eSet[gene]) Control 60 r1 Control 60 r2 Control 60 r3 Control 60 r4 Bt.24880.1.S1_at 2.295918 7.957752 2.218133 6.945419 Metyrapone 60 r1 Metyrapone 60 r2 Metyrapone 60 r3 Bt.24880.1.S1_at 2.218133 8.563977 8.299052 Metyrapone 60 r4 Metyrapone 60 r5 Control 67 r1 Control 67 r2 Bt.24880.1.S1_at 8.374774 2.409801 2.413245 2.218133 Control 67 r3 Control 67 r4 Metyrapone 67 r1 Metyrapone 67 r2 Bt.24880.1.S1_at 2.218133 7.635587 2.218133 2.218133 Metyrapone 67 r3 Bt.24880.1.S1_at 2.413245 # adjusted expression levels - removing the "contamination" exprs(eSet[gene]) - fit2$coefficients[gene,"Contamination"]*design[,"Contamination"] Control 60 r1 Control 60 r2 Control 60 r3 Control 60 r4 Bt.24880.1.S1_at 2.295918 2.355300 2.218133 1.342967 Metyrapone 60 r1 Metyrapone 60 r2 Metyrapone 60 r3 Bt.24880.1.S1_at 2.218133 2.961525 2.696600 Metyrapone 60 r4 Metyrapone 60 r5 Control 67 r1 Control 67 r2 Bt.24880.1.S1_at 2.772323 2.409801 2.413245 2.218133 Control 67 r3 Control 67 r4 Metyrapone 67 r1 Metyrapone 67 r2 Bt.24880.1.S1_at 2.218133 2.033135 2.218133 2.218133 Metyrapone 67 r3 Bt.24880.1.S1_at 2.413245 My questions are: 1) Is this the correct way to adjust the expression levels to "remove" the contamination effect? 2) How do I do a similar thing for all genes on all 16 arrays? Cheers, Nathan -------------------------------------------------------- Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries J M Rendel Laboratory Rockhampton QLD 4701 Australia Tel: +61 (0)7 4923 8121 Fax: +61 (0)7 4923 8222 Web: <http: www.csiro.au="" people="" nathan.watson-haigh.html=""> http://www.csiro.au/people/Nathan.Watson-Haigh.html -------------------------------------------------------- [[alternative HTML version deleted]]
limma limma • 833 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 6 hours ago
United States
Hi Nathan, Nathan S. Watson-Haigh wrote: > Using limma, my design matrix includes a "contamination" parameter: > > C.d60 T.d60 C.d67 T.d67 Contamination > 1 1 0 0 0 0 > 2 1 0 0 0 1 > 3 1 0 0 0 0 > 4 1 0 0 0 1 > 5 0 1 0 0 0 > 6 0 1 0 0 1 > 7 0 1 0 0 1 > 8 0 1 0 0 1 > 9 0 1 0 0 0 > 10 0 0 1 0 0 > 11 0 0 1 0 0 > 12 0 0 1 0 0 > 13 0 0 1 0 1 > 14 0 0 0 1 0 > 15 0 0 0 1 0 > 16 0 0 0 1 0 > > > I'd like to generate some heatmaps following the identification of > differentially expressed genes using limma. But I'd like to use adjusted > expression values such that the contamination effect is removed as it > detracts from the visual impact of the differences identified by my > contrasts of interest. > > On an individual gene basis, I think the following works: > gene <- "Bt.24880.1.S1_at" > # unadjusted expression values > exprs(eSet[gene]) > Control 60 r1 Control 60 r2 Control 60 r3 Control 60 r4 > Bt.24880.1.S1_at 2.295918 7.957752 2.218133 6.945419 > Metyrapone 60 r1 Metyrapone 60 r2 Metyrapone 60 r3 > Bt.24880.1.S1_at 2.218133 8.563977 8.299052 > Metyrapone 60 r4 Metyrapone 60 r5 Control 67 r1 Control 67 > r2 > Bt.24880.1.S1_at 8.374774 2.409801 2.413245 > 2.218133 > Control 67 r3 Control 67 r4 Metyrapone 67 r1 Metyrapone 67 > r2 > Bt.24880.1.S1_at 2.218133 7.635587 2.218133 > 2.218133 > Metyrapone 67 r3 > Bt.24880.1.S1_at 2.413245 > > # adjusted expression levels - removing the "contamination" > exprs(eSet[gene]) - > fit2$coefficients[gene,"Contamination"]*design[,"Contamination"] > Control 60 r1 Control 60 r2 Control 60 r3 Control 60 r4 > Bt.24880.1.S1_at 2.295918 2.355300 2.218133 1.342967 > Metyrapone 60 r1 Metyrapone 60 r2 Metyrapone 60 r3 > Bt.24880.1.S1_at 2.218133 2.961525 2.696600 > Metyrapone 60 r4 Metyrapone 60 r5 Control 67 r1 Control 67 > r2 > Bt.24880.1.S1_at 2.772323 2.409801 2.413245 > 2.218133 > Control 67 r3 Control 67 r4 Metyrapone 67 r1 Metyrapone 67 > r2 > Bt.24880.1.S1_at 2.218133 2.033135 2.218133 > 2.218133 > Metyrapone 67 r3 > Bt.24880.1.S1_at 2.413245 > > > My questions are: > 1) Is this the correct way to adjust the expression levels to "remove" the > contamination effect? Well, yes and no. What you have done above is extract the parameter estimates for the contamination effect for a particular gene. This doesn't remove anything, it just extracts certain values. However, assuming there is a contamination effect, fitting the model this way will 'capture' the portion of the expression value attributable to the contamination, so any contrasts made that don't include this parameter estimate will in essence have removed it. > 2) How do I do a similar thing for all genes on all 16 arrays? Assuming that you want to remove the contamination effect rather than see what the estimates are, you just want to fit the model and make contrasts as normal. Best, Jim > > Cheers, > Nathan > > > -------------------------------------------------------- > Dr. Nathan S. Watson-Haigh > OCE Post Doctoral Fellow > CSIRO Livestock Industries > J M Rendel Laboratory > Rockhampton > QLD 4701 > Australia > > Tel: +61 (0)7 4923 8121 > Fax: +61 (0)7 4923 8222 > Web: <http: www.csiro.au="" people="" nathan.watson-haigh.html=""> > http://www.csiro.au/people/Nathan.Watson-Haigh.html > -------------------------------------------------------- > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Hildebrandt Lab 8220D MSRB III 1150 W. Medical Center Drive Ann Arbor MI 48109-0646 734-936-8662
ADD COMMENT

Login before adding your answer.

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