LIMMA makeContrasts question
2
0
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia
Dear TS, You are wanting to select genes which satisfy several conditions. There is no way to do this with a single contrast. You need to compute all three contrasts and then select genes: cm = makeContrasts(ON=ON-WT, KO1=KO1-WT, KO2=KO2-WT, levels=design) fit <- lmFit(data, design) fit2 <- contrasts.fit(fit, cm) fit2 <- eBayes(fit2) results <- decideTests(fit2) selectedgenes <- results[,"ON"]*results[,"KO1"]== -1 & results[,"ON"]*results[,"KO2"]== -1 sum(selectedgenes) write.fit(fit2[selectedgenes,], file="myresults.txt") Unfortunately I don't know of any good introductions to linear models which are suitable for a biology audience. Best wishes Gordon >Date: Thu, 30 Nov 2006 21:23:15 -0500 >From: "T S" <tsm8015 at="" gmail.com=""> >Subject: [BioC] LIMMA makeContrasts question >To: bioconductor at stat.math.ethz.ch >Message-ID: > <4a912b5b0611301823n5be74787o2e249ec9657041b6 at mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >Hi, > >I am a complete beginner to Linear Models and using the LIMMA package. >First I have a general question as to what are good intro texts >explaining Linear Models in general. > >I also have the following specific question. I have 4 samples: wild >type (WT), a sample were I turn on a pathway (ON) and two where I >knock down the same pathway in two different ways (KO1, KO2). I want >to find genes that are significantly changed with the following >property: > > sign(log(ON/WT)) == -sign(log(KO1/WT)) and -sign(log(KO2/WT)) > >would the following design and contrast matrix be correct > >type = is a factor with levels WT, ON, KO1, KO2 >design = model.matrix(~0 + type) >cm = makeContrasts(eff = (ON - WT) - (KO1 - WT) - (KO2 - WT), levels=design) > >Any help or guidence would be greatly appreciated. Also pointers to >suitable documentation explain such matters would be great. > >Thanks in advance
limma limma • 1.2k views
ADD COMMENT
0
Entering edit mode
@jdelasherasedacuk-1189
Last seen 8.6 years ago
United Kingdom
Quoting Gordon Smyth <smyth at="" wehi.edu.au="">: > [...] > Unfortunately I don't know of any good introductions to linear models > which are suitable for a biology audience. > > Best wishes > Gordon you're right about that! I looked! :-( Jose -- Dr. Jose I. de las Heras Email: J.delasHeras at ed.ac.uk The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 6513374 Institute for Cell & Molecular Biology Fax: +44 (0)131 6507360 Swann Building, Mayfield Road University of Edinburgh Edinburgh EH9 3JR UK
ADD COMMENT
0
Entering edit mode
@kfbargadehues-1528
Last seen 9.6 years ago
Dear TS, I am a biologist and found "Design and Analysis of Experiments" by DC Montgomery very useful, although it is not a manual on how to make contrasts HTH David > Dear TS, > > You are wanting to select genes which satisfy several conditions. > There is no way to do this with a single contrast. You need to > compute all three contrasts and then select genes: > > cm = makeContrasts(ON=ON-WT, KO1=KO1-WT, KO2=KO2-WT, levels=design) > fit <- lmFit(data, design) > fit2 <- contrasts.fit(fit, cm) > fit2 <- eBayes(fit2) > results <- decideTests(fit2) > selectedgenes <- results[,"ON"]*results[,"KO1"]== -1 & > results[,"ON"]*results[,"KO2"]== -1 > sum(selectedgenes) > write.fit(fit2[selectedgenes,], file="myresults.txt") > > Unfortunately I don't know of any good introductions to linear models > which are suitable for a biology audience. > > Best wishes > Gordon > > >Date: Thu, 30 Nov 2006 21:23:15 -0500 > >From: "T S" <tsm8015 at="" gmail.com=""> > >Subject: [BioC] LIMMA makeContrasts question > >To: bioconductor at stat.math.ethz.ch > >Message-ID: > > <4a912b5b0611301823n5be74787o2e249ec9657041b6 at mail.gmail.com> > >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > >Hi, > > > >I am a complete beginner to Linear Models and using the LIMMA package. > >First I have a general question as to what are good intro texts > >explaining Linear Models in general. > > > >I also have the following specific question. I have 4 samples: wild > >type (WT), a sample were I turn on a pathway (ON) and two where I > >knock down the same pathway in two different ways (KO1, KO2). I want > >to find genes that are significantly changed with the following > >property: > > > > sign(log(ON/WT)) == -sign(log(KO1/WT)) and -sign(log(KO2/WT)) > > > >would the following design and contrast matrix be correct > > > >type = is a factor with levels WT, ON, KO1, KO2 > >design = model.matrix(~0 + type) > >cm = makeContrasts(eff = (ON - WT) - (KO1 - WT) - (KO2 - WT), levels=design) > > > >Any help or guidence would be greatly appreciated. Also pointers to > >suitable documentation explain such matters would be great. > > > >Thanks in advance > > _______________________________________________ > 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 >
ADD COMMENT

Login before adding your answer.

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