multiple groups time course RNA Seq LIMMA
1
0
Entering edit mode
Riba Michela ▴ 40
@riba-michela-6325
Last seen 9.8 years ago
Dear Gordon, Thanks for the answer. I've been working on these data for some time. It was obvious how to extract DGE for treatment vs control (just looking at the coefficient names), nevertheless I still do not get how to find genes that change between two experimental groups and the control. I would like to use makeContrasts in order to explicitly define the possibly complex comparisons in my analysis. I've tried to write something like: contrast.matrix <- makeContrast("(sum of the X.coefficient for group 1) - (sum of the X.coefficient for group2)", levels=design) In my first attempt I've set group2 the same as control, this to see if the explicit contrast gives the same results as the standard analysis. Alas, it doesn't. How should I specifiy contrasts when more than one factor (i.e. the spline coefficients) characterizes a single condition? Best, Michela Il giorno 15/gen/2014, alle ore 00:53, Gordon K Smyth <smyth at="" wehi.edu.au=""> ha scritto: > Dear Riba, > > The advice given in Section 9.6.2 of the User's Guide will still work fine > even when Group as more than two levels. > > Just type colnames(fit) and it will be obvious which coefficients > correspond to which experimental group. > > Yes, you could use contrast.fit() if you wish, but there seems to me to be > no reason to do so. > > Best wishes > Gordon > >> Date: Tue, 14 Jan 2014 11:53:11 +0100 >> From: Riba Michela <riba.michela at="" hsr.it=""> >> To: "bioconductor at r-project.org" <bioconductor at="" r-project.org=""> >> Subject: [BioC] multiple groups time course RNA Seq LIMMA >> >> >> Hi, > >> I'm approaching a RNA-seq experiment concerning the analysis of a time >> course of 5 time points in 6 experimental groups (including Control >> group). > >> As an example: >> >> FileName Group Time >> a Control 6hr >> b Control 24h >> ... >> e ExpG1 6hr >> f ExpG1 24hr >> ... >> l ExpG2 6hr >> m ExpG2 24hr >> ... >> (ExpG1, ExpG2 are experimental groups) >> >> I'm going to use LIMMA for extraction of time changing genes in the >> single experimental groups compared to Control group. >> >> I'd like to see how to extract this result in the topTable (i.e. which >> coefficients select) for each single comparison of the experimental >> group towards Control) since from the provided example in the LIMMA >> manual (pag. 49) such topTable is referred to a design concerning one >> single experimental group towards Control in a time course instead of >> multiple experimental groups. >> >> Is there in addition the possibility to design a contrast matrix in such >> situations or is it better to consider topTables using various >> coefficients blocks? >> >> >> Thanks a lot for your answer >> Michela Riba >> >> ... >> >> Dr. Michela Riba >> Genome Function Unit >> Center for Translational Genomics and Bioinformatics >> San Raffaele Hospital >> Milano >> ... > > ______________________________________________________________________ > The information in this email is confidential and inte...{{dropped:29}}
limma limma • 2.3k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 7 minutes ago
WEHI, Melbourne, Australia
Dear Michela, I don't really understand what hypothesis you are trying to test, or what analysis you have done so far. If you have already tested for differences between treatment and control, what else is it that you want to test? I'm not actually even sure what you mean by "treatment", since there is no mention of treatment in your target information. You would need to give reasonably complete code showing what model you've fitted in limma, and be more explicit about what you want to test. It may help to read the posting guide: http://www.bioconductor.org/help/mailing-list/posting-guide/ I think you may have some misconceptions about the use of the makeContrasts() function. It accepts algebraic expressions using the column names of the design matrix. It is not so clever that it can understand general English phrases. Best wishes Gordon --------------------------------------------- Professor Gordon K Smyth, Bioinformatics Division, Walter and Eliza Hall Institute of Medical Research, 1G Royal Parade, Parkville, Vic 3052, Australia. http://www.statsci.org/smyth On Tue, 11 Mar 2014, Riba Michela wrote: > Dear Gordon, > Thanks for the answer. I've been working on these data for some time. It > was obvious how to extract DGE for treatment vs control (just looking at > the coefficient names), nevertheless I still do not get how to find > genes that change between two experimental groups and the control. I > would like to use makeContrasts in order to explicitly define the > possibly complex comparisons in my analysis. > I've tried to write something like: > > contrast.matrix <- makeContrast("(sum of the X.coefficient for group 1) - (sum of the X.coefficient for group2)", levels=design) > > In my first attempt I've set group2 the same as control, this to see if > the explicit contrast gives the same results as the standard analysis. > Alas, it doesn't. > How should I specifiy contrasts when more than one factor (i.e. the > spline coefficients) characterizes a single condition? > Best, > > Michela > > > Il giorno 15/gen/2014, alle ore 00:53, Gordon K Smyth <smyth at="" wehi.edu.au=""> ha scritto: > >> Dear Riba, >> >> The advice given in Section 9.6.2 of the User's Guide will still work fine >> even when Group as more than two levels. >> >> Just type colnames(fit) and it will be obvious which coefficients >> correspond to which experimental group. >> >> Yes, you could use contrast.fit() if you wish, but there seems to me to be >> no reason to do so. >> >> Best wishes >> Gordon >> >>> Date: Tue, 14 Jan 2014 11:53:11 +0100 >>> From: Riba Michela <riba.michela at="" hsr.it=""> >>> To: "bioconductor at r-project.org" <bioconductor at="" r-project.org=""> >>> Subject: [BioC] multiple groups time course RNA Seq LIMMA >>> >>> >>> Hi, >> >>> I'm approaching a RNA-seq experiment concerning the analysis of a time >>> course of 5 time points in 6 experimental groups (including Control >>> group). >> >>> As an example: >>> >>> FileName Group Time >>> a Control 6hr >>> b Control 24h >>> ... >>> e ExpG1 6hr >>> f ExpG1 24hr >>> ... >>> l ExpG2 6hr >>> m ExpG2 24hr >>> ... >>> (ExpG1, ExpG2 are experimental groups) >>> >>> I'm going to use LIMMA for extraction of time changing genes in the >>> single experimental groups compared to Control group. >>> >>> I'd like to see how to extract this result in the topTable (i.e. which >>> coefficients select) for each single comparison of the experimental >>> group towards Control) since from the provided example in the LIMMA >>> manual (pag. 49) such topTable is referred to a design concerning one >>> single experimental group towards Control in a time course instead of >>> multiple experimental groups. >>> >>> Is there in addition the possibility to design a contrast matrix in such >>> situations or is it better to consider topTables using various >>> coefficients blocks? >>> >>> >>> Thanks a lot for your answer >>> Michela Riba >>> >>> ... >>> >>> Dr. Michela Riba >>> Genome Function Unit >>> Center for Translational Genomics and Bioinformatics >>> San Raffaele Hospital >>> Milano >>> ... >> > > Dr. Michela Riba > Genome Function Unit > Center for Translational Genomics and Bioinformatics > San Raffaele Scientific Institute > Via Olgettina 58 > 20132 Milano > Italy > > lab: +39 02 2643 9114 > skype: mic_mir32 > riba.michela at gmail.com > riba.michela at hsr.it ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:4}}
ADD COMMENT
0
Entering edit mode
Hi, Gordon, thanks for reply I'm sorry for giving the impression of naiveness, anyhow, I have forwarded the previous email to which you have answered because it contained the same design explicitly defined, the design is derived from the limma vignette X <- ns(limmaTargets$Time,df=4) design<-model.matrix(~Group*X) #here Group refers to the different 6 experimental groups) My point regards the possibility and way to extract genes which differ in the different experimental groups (that unfortunately yesterday I mentioned as treatments) not compared with the control, or better which could be the best way to solve this, for example reasoning simply on venn diagram of the single results as was for example done using the maSigPro package for time series analysis in gene expression. The point regards exactly which could be the most convenient way to design the analysis -compare just 2 time series (control and experimental group1) just with control and one experimental group -make a design matrix to compare different experimental groups with control o among each other in the trail I performed with the contrast matrix option as referred below (goup1 is the experimental group 1 and group2 the experimental group 2) I have obtained discouraging results as mentioned I've tried to write something like: contrast.matrix <- makeContrast("(sum of the X.coefficient for group 1) - (sum of the X.coefficient for group2)", levels=design) In my first attempt I've set group2 the same as control, this to see if the explicit contrast gives the same results as the standard analysis. Alas, it doesn't. Hoping this sounds clear I attach the simplified design hoping to receive your important and kind feedback Michela I'm approaching a RNA-seq experiment concerning the analysis of a time course of 5 time points in 6 experimental groups (including Control group). As an example: FileName Group Time a Control 6hr b Control 24h ... e ExpG1 6hr f ExpG1 24hr ... l ExpG2 6hr m ExpG2 24hr ... (ExpG1, ExpG2 are experimental groups) Il giorno 11/mar/2014, alle ore 23:20, Gordon K Smyth <smyth@wehi.edu.au<mailto:smyth@wehi.edu.au>> ha scritto: ExpG1, ExpG2 are experimental groups Dr. Michela Riba Genome Function Unit Center for Translational Genomics and Bioinformatics San Raffaele Scientific Institute Via Olgettina 58 20132 Milano Italy lab: +39 02 2643 9114 skype: mic_mir32 riba.michela@gmail.com<mailto:riba.michela@gmail.com> riba.michela@hsr.it Se avete ricevuto il presente messaggio per errore, Vi preghiamo di darne immediata comunicazione al mittente e di provvedere alla sua cancellazione dal vostro computer. Grazie If you have received this e-mail in error, please let the sender know and delete it from your computer. Thank you [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Dear Michela Riba, The first thing that puzzles me that the design matrix you say you have used would give no residual degrees of freedom for your data. In this situation, it would impossible for you to do any testing for DE genes, and limma would have given you a warning about this. Given that you have only 5 time points, the largest df you can use for the spline curves is 3, and you might consider using just 2 df. Anyway, I will go back to the original question. You haven't said anything about replicates, but I assume that you have unreplicated time courses. There two main questions you can ask. You can find genes that are DE within each time course separately, or you can find genes that differ between time courses. You have 6 groups and 5 times points. Here is a simulated version with 1000 genes: Group <- gl(6,5,30) Time <- as.numeric(gl(5,1,30)) X <- ns(Time,df=2) y <- matrix(rnorm(1000*30),1000,30) FIRST, how to find genes that are DE within each time course: design <- model.matrix(~Group+Group:X) colnames(design) <- make.names(colnames(design)) fit <- lmFit(y,design) fit <- eBayes(fit) This gives: > colnames(fit) [1] "X.Intercept." "Group2" "Group3" "Group4" [5] "Group5" "Group6" "Group1.X1" "Group2.X1" [9] "Group3.X1" "Group4.X1" "Group5.X1" "Group6.X1" [13] "Group1.X2" "Group2.X2" "Group3.X2" "Group4.X2" [17] "Group5.X2" "Group6.X2" To find genes changing over time within the first group (control): topTable(fit,coef=c("Group1.X1","Group1.X2")) To find genes changing over time in the second group: topTable(fit,coef=c("Group2.X1","Group2.X2")) And so on. You get the idea? SECOND, how to find genes that have different responses between the different time courses. To compare Group2 with Group1: cont.mat <- makeContrasts( Group2.X1-Group1.X1, Group2.X2-Group1.X2, levels=design) fit2 <- contrasts.fit(fit,cont.mat) fit2 <- eBayes(fit2) topTable(fit2) To compare any group with any other, you only need to change the group numbers in the makeContrasts command. Best wishes Gordon On Wed, 12 Mar 2014, Riba Michela wrote: ... > the design is derived from the limma vignette > > X <- ns(limmaTargets$Time,df=4) > design<-model.matrix(~Group*X) #here Group refers to the different 6 experimental groups) > > My point regards the possibility and way to extract genes which differ > in the different experimental groups (that unfortunately yesterday I > mentioned as treatments) not compared with the control, or better which > could be the best way to solve this, for example reasoning simply on > venn diagram of the single results as was for example done using the > maSigPro package for time series analysis in gene expression. > > The point regards exactly which could be the most convenient way to > design the analysis > -compare just 2 time series (control and experimental group1) just with > control and one experimental group > -make a design matrix to compare different experimental groups with > control o among each other ... > Date: Tue, 14 Jan 2014 11:53:11 +0100 > From: Riba Michela <riba.michela at="" hsr.it=""> > To: "bioconductor at r-project.org" <bioconductor at="" r-project.org=""> > Subject: [BioC] multiple groups time course RNA Seq LIMMA > > > Hi, > I'm approaching a RNA-seq experiment concerning the analysis of a time course of 5 time points in 6 experimental groups (including Control > group). > As an example: > > FileName Group Time > a Control 6hr > b Control 24h > ... > e ExpG1 6hr > f ExpG1 24hr > ... > l ExpG2 6hr > m ExpG2 24hr > ... > (ExpG1, ExpG2 are experimental groups) > > I'm going to use LIMMA for extraction of time changing genes in the > single experimental groups compared to Control group. > > I'd like to see how to extract this result in the topTable (i.e. which > coefficients select) for each single comparison of the experimental > group towards Control) since from the provided example in the LIMMA > manual (pag. 49) such topTable is referred to a design concerning one > single experimental group towards Control in a time course instead of > multiple experimental groups. > > Is there in addition the possibility to design a contrast matrix in such > situations or is it better to consider topTables using various > coefficients blocks? > > > Thanks a lot for your answer > Michela Riba ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:4}}
ADD REPLY

Login before adding your answer.

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