paired sample LIMMA
1
0
Entering edit mode
@elliot-harrison-2391
Last seen 10.2 years ago
Hi BioC, I have a question regarding the output of a LIMMA. I have 2 colour data with a constant reference. Some googling lead me to some references that as I have a constant dereference I can set up a paired comparison as in the limma example. I have the following targets file > targets Filename Cycle State MouseNo File1 File1 Cycle1 State1 1 File2 File2 Cycle1 State1 2 File3 File3 Cycle1 State1 3 File4 File4 Cycle1 State1 4 File5 File5 Cycle1 State2 1 File6 File6 Cycle1 State2 2 File7 File7 Cycle1 State2 3 File8 File8 Cycle1 State2 4 File9 File9 Cycle2 State1 1 File10 File10 Cycle2 State1 2 File11 File11 Cycle2 State1 3 File12 File12 Cycle2 State1 4 File13 File13 Cycle2 State2 1 File14 File14 Cycle2 State2 2 File15 File15 Cycle2 State2 3 File16 File16 Cycle2 State2 4 Try to set up the design like this: MouseNo <- factor(targets$MouseNo) Cycle <- factor(targets$Cycle, levels=c("Cycle1","Cycle2")) State <- factor(targets$State, levels=c("State1","State2")) pairdesign <- model.matrix(~MouseNo+Cycle+State, ref = "ref") > pairdesign (Intercept) MouseNo2 MouseNo3 MouseNo4 CycleCycle2 StateState2 1 1 0 0 0 0 0 2 1 1 0 0 0 0 3 1 0 1 0 0 0 4 1 0 0 1 0 0 5 1 0 0 0 0 1 6 1 1 0 0 0 1 7 1 0 1 0 0 1 8 1 0 0 1 0 1 9 1 0 0 0 1 0 10 1 1 0 0 1 0 11 1 0 1 0 1 0 12 1 0 0 1 1 0 13 1 0 0 0 1 1 14 1 1 0 0 1 1 15 1 0 1 0 1 1 16 1 0 0 1 1 1 Mouse 1 has vanished in the design and the resultant MArrayLM object from lmFit. What am I doning wrong. Also what would be the syntax for specifying contrasts for contrasts.fit in this example. Thanks Elliott [[alternative HTML version deleted]]
limma cycle limma cycle • 1.6k views
ADD COMMENT
0
Entering edit mode
@achilleas-pitsillides-4316
Last seen 10.2 years ago
Hi, In your current design the variables MouseX ( for X in {2,3,4}) encode the difference of MouseX from Mouse1, i.e. the intercept is Mouse1. If you want to have Mouse1 be explicit then just change: pairdesign <- model.matrix(~MouseNo+Cycle+State, ref = "ref") to pairdesign <- model.matrix(~0+MouseNo+Cycle+State, ref = "ref") I hope this helps. cheers, Achilleas On Thu, May 26, 2011 at 9:27 AM, elliott harrison <e.harrison@epistem.co.uk>wrote: > Hi BioC, > > I have a question regarding the output of a LIMMA. I have 2 colour data > with a constant reference. > Some googling lead me to some references that as I have a constant > dereference I can set up a paired comparison as in the limma example. > > > I have the following targets file > > > targets > Filename Cycle State MouseNo > File1 File1 Cycle1 State1 1 > File2 File2 Cycle1 State1 2 > File3 File3 Cycle1 State1 3 > File4 File4 Cycle1 State1 4 > File5 File5 Cycle1 State2 1 > File6 File6 Cycle1 State2 2 > File7 File7 Cycle1 State2 3 > File8 File8 Cycle1 State2 4 > File9 File9 Cycle2 State1 1 > File10 File10 Cycle2 State1 2 > File11 File11 Cycle2 State1 3 > File12 File12 Cycle2 State1 4 > File13 File13 Cycle2 State2 1 > File14 File14 Cycle2 State2 2 > File15 File15 Cycle2 State2 3 > File16 File16 Cycle2 State2 4 > > Try to set up the design like this: > > MouseNo <- factor(targets$MouseNo) > Cycle <- factor(targets$Cycle, levels=c("Cycle1","Cycle2")) > State <- factor(targets$State, levels=c("State1","State2")) > pairdesign <- model.matrix(~MouseNo+Cycle+State, ref = "ref") > > > pairdesign > (Intercept) MouseNo2 MouseNo3 MouseNo4 CycleCycle2 StateState2 > 1 1 0 0 0 0 0 > 2 1 1 0 0 0 0 > 3 1 0 1 0 0 0 > 4 1 0 0 1 0 0 > 5 1 0 0 0 0 1 > 6 1 1 0 0 0 1 > 7 1 0 1 0 0 1 > 8 1 0 0 1 0 1 > 9 1 0 0 0 1 0 > 10 1 1 0 0 1 0 > 11 1 0 1 0 1 0 > 12 1 0 0 1 1 0 > 13 1 0 0 0 1 1 > 14 1 1 0 0 1 1 > 15 1 0 1 0 1 1 > 16 1 0 0 1 1 1 > > > Mouse 1 has vanished in the design and the resultant MArrayLM object from > lmFit. What am I doning wrong. > > Also what would be the syntax for specifying contrasts for contrasts.fit in > this example. > > Thanks > > Elliott > > [[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]]
ADD COMMENT
0
Entering edit mode
Hi Achilleas, Thanks for that yes that is what I was expecting to see. Thank you. Can you shed any light on how I should define the contrast matrix? Thanks E From: Achilleas Pitsillides [mailto:anp4r@virginia.edu] Sent: 26 May 2011 14:55 To: elliott harrison Cc: bioconductor@r-project.org Subject: Re: [BioC] paired sample LIMMA Hi, In your current design the variables MouseX ( for X in {2,3,4}) encode the difference of MouseX from Mouse1, i.e. the intercept is Mouse1. If you want to have Mouse1 be explicit then just change: pairdesign <- model.matrix(~MouseNo+Cycle+State, ref = "ref") to pairdesign <- model.matrix(~0+MouseNo+Cycle+State, ref = "ref") I hope this helps. cheers, Achilleas On Thu, May 26, 2011 at 9:27 AM, elliott harrison <e.harrison@epistem.co.uk<mailto:e.harrison@epistem.co.uk>> wrote: Hi BioC, I have a question regarding the output of a LIMMA. I have 2 colour data with a constant reference. Some googling lead me to some references that as I have a constant dereference I can set up a paired comparison as in the limma example. I have the following targets file > targets Filename Cycle State MouseNo File1 File1 Cycle1 State1 1 File2 File2 Cycle1 State1 2 File3 File3 Cycle1 State1 3 File4 File4 Cycle1 State1 4 File5 File5 Cycle1 State2 1 File6 File6 Cycle1 State2 2 File7 File7 Cycle1 State2 3 File8 File8 Cycle1 State2 4 File9 File9 Cycle2 State1 1 File10 File10 Cycle2 State1 2 File11 File11 Cycle2 State1 3 File12 File12 Cycle2 State1 4 File13 File13 Cycle2 State2 1 File14 File14 Cycle2 State2 2 File15 File15 Cycle2 State2 3 File16 File16 Cycle2 State2 4 Try to set up the design like this: MouseNo <- factor(targets$MouseNo) Cycle <- factor(targets$Cycle, levels=c("Cycle1","Cycle2")) State <- factor(targets$State, levels=c("State1","State2")) pairdesign <- model.matrix(~MouseNo+Cycle+State, ref = "ref") > pairdesign (Intercept) MouseNo2 MouseNo3 MouseNo4 CycleCycle2 StateState2 1 1 0 0 0 0 0 2 1 1 0 0 0 0 3 1 0 1 0 0 0 4 1 0 0 1 0 0 5 1 0 0 0 0 1 6 1 1 0 0 0 1 7 1 0 1 0 0 1 8 1 0 0 1 0 1 9 1 0 0 0 1 0 10 1 1 0 0 1 0 11 1 0 1 0 1 0 12 1 0 0 1 1 0 13 1 0 0 0 1 1 14 1 1 0 0 1 1 15 1 0 1 0 1 1 16 1 0 0 1 1 1 Mouse 1 has vanished in the design and the resultant MArrayLM object from lmFit. What am I doning wrong. Also what would be the syntax for specifying contrasts for contrasts.fit in this example. Thanks Elliott [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor@r-project.org<mailto: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]]
ADD REPLY
0
Entering edit mode
Hi Elliott, I don't know anything about your experiment so I can't help much more than the Limma guide would. I guess if you are interested in expression changes between State1 and State2 (for all the mice and all the cycles) and between cycle 1 and cycle 2 (for all the mice and all the cycles). contrast.matrix <- makeContrasts(StateDiff=State1-State2, CycleDiff=Cycle1-Cycle2, levels=design) However my gut feeling says that you will want more complex comparisons as in change in expression between States within cycles in which case you will need to add some interaction terms in your model. (Look at the Limma user guide sec 8.7 and 8.8) cheers, Achilleas On Thu, May 26, 2011 at 10:44 AM, elliott harrison <e.harrison@epistem.co.uk> wrote: > Hi Achilleas, > > > > Thanks for that yes that is what I was expecting to see. Thank you. > > Can you shed any light on how I should define the contrast matrix? > > > > Thanks > > > E > > > > *From:* Achilleas Pitsillides [mailto:anp4r@virginia.edu] > *Sent:* 26 May 2011 14:55 > *To:* elliott harrison > *Cc:* bioconductor@r-project.org > *Subject:* Re: [BioC] paired sample LIMMA > > > > Hi, > > In your current design the variables MouseX ( for X in {2,3,4}) encode > the difference of MouseX from Mouse1, i.e. the intercept is Mouse1. If you > want to have Mouse1 be explicit then just change: > pairdesign <- model.matrix(~MouseNo+Cycle+State, ref = "ref") > to > pairdesign <- model.matrix(~0+MouseNo+Cycle+State, ref = "ref") > I hope this helps. > > cheers, > Achilleas > > On Thu, May 26, 2011 at 9:27 AM, elliott harrison < > e.harrison@epistem.co.uk> wrote: > > Hi BioC, > > I have a question regarding the output of a LIMMA. I have 2 colour data > with a constant reference. > Some googling lead me to some references that as I have a constant > dereference I can set up a paired comparison as in the limma example. > > > I have the following targets file > > > targets > Filename Cycle State MouseNo > File1 File1 Cycle1 State1 1 > File2 File2 Cycle1 State1 2 > File3 File3 Cycle1 State1 3 > File4 File4 Cycle1 State1 4 > File5 File5 Cycle1 State2 1 > File6 File6 Cycle1 State2 2 > File7 File7 Cycle1 State2 3 > File8 File8 Cycle1 State2 4 > File9 File9 Cycle2 State1 1 > File10 File10 Cycle2 State1 2 > File11 File11 Cycle2 State1 3 > File12 File12 Cycle2 State1 4 > File13 File13 Cycle2 State2 1 > File14 File14 Cycle2 State2 2 > File15 File15 Cycle2 State2 3 > File16 File16 Cycle2 State2 4 > > Try to set up the design like this: > > MouseNo <- factor(targets$MouseNo) > Cycle <- factor(targets$Cycle, levels=c("Cycle1","Cycle2")) > State <- factor(targets$State, levels=c("State1","State2")) > pairdesign <- model.matrix(~MouseNo+Cycle+State, ref = "ref") > > > pairdesign > (Intercept) MouseNo2 MouseNo3 MouseNo4 CycleCycle2 StateState2 > 1 1 0 0 0 0 0 > 2 1 1 0 0 0 0 > 3 1 0 1 0 0 0 > 4 1 0 0 1 0 0 > 5 1 0 0 0 0 1 > 6 1 1 0 0 0 1 > 7 1 0 1 0 0 1 > 8 1 0 0 1 0 1 > 9 1 0 0 0 1 0 > 10 1 1 0 0 1 0 > 11 1 0 1 0 1 0 > 12 1 0 0 1 1 0 > 13 1 0 0 0 1 1 > 14 1 1 0 0 1 1 > 15 1 0 1 0 1 1 > 16 1 0 0 1 1 1 > > > Mouse 1 has vanished in the design and the resultant MArrayLM object from > lmFit. What am I doning wrong. > > Also what would be the syntax for specifying contrasts for contrasts.fit in > this example. > > Thanks > > Elliott > > [[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]]
ADD REPLY

Login before adding your answer.

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