Regression Analysis
1
0
Entering edit mode
@christian-de-santis-6143
Last seen 10.2 years ago
Hi everyone, I am analysing gene expression in animals fed 5 different diets. This diets are made of the same components with the exception of one of them that is included with the following concentration 0, 12.66g, 25.32g, 37.98g, 50.64g (from Diet 1 to Diet 5, respectively). Samples have been processed using a 44K Agilent two colour microarray. I have run a first analysis using Limma and made pairwise contrasts. I have found that the number of differentially expressed genes increases as I compare diets with larger differences in concentration of the additive (i.e Diet1 vs Diet2 = 256 DE genes, Diet1 vs Diet3 = 1231 DE genes, Diet1 vs Diet3 = 1803 DE genes, etc.). Now, I would like to isolate genes, if there are any, whose expression values are correlated with the amount of additive in the diet. Can anyone suggest an approach for this? Can I do it with Limma? Cruising through past posts I have come across the following: genes <- matrix(rnorm(100),nc=10) var1 <- rnorm(10) df <- data.frame(var1=rnorm(10)) dm <- model.matrix(~ var1, data=df) fit1 <- lmFit(genes,dm) fit2 <- eBayes(fit1) topTable(fit2,coef=2) that suggests to simply change the value of the factors to a number. However, if I try to adapt it to my case: var1 <- c(0, 12.66, 25.32, 37.98, 50.64) df <- data.frame(var1) dm <- model.matrix(~ var1, data=df) fit1 <- lmFit(fx,dm) fit2 <- eBayes(fit1) topTable(fit2,coef=2) I get the following error: Error in lm.fit(design, t(M)) : incompatible dimensions Is the above approach correct? Can I use Limma? If not, is there a particular package that could do the job? I hope I can get some feedback. Thanks in advance! Best regards, Christian De Santis -- The University of Stirling has been ranked in the top 12 of UK universities for graduate employment*. 94% of our 2012 graduates were in work and/or further study within six months of graduation. *The Telegraph The University of Stirling is a charity registered in Scotland, number SC 011159. [[alternative HTML version deleted]]
Microarray limma Microarray limma • 1.1k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On Wed, Sep 11, 2013 at 10:14 AM, Christian De Santis <christian.desantis at="" stir.ac.uk=""> wrote: > Hi everyone, > > I am analysing gene expression in animals fed 5 different diets. This diets are made of the same components with the exception of one of them that is included with the following concentration 0, 12.66g, 25.32g, 37.98g, 50.64g (from Diet 1 to Diet 5, respectively). > > Samples have been processed using a 44K Agilent two colour microarray. I have run a first analysis using Limma and made pairwise contrasts. I have found that the number of differentially expressed genes increases as I compare diets with larger differences in concentration of the additive (i.e Diet1 vs Diet2 = 256 DE genes, Diet1 vs Diet3 = 1231 DE genes, Diet1 vs Diet3 = 1803 DE genes, etc.). Now, I would like to isolate genes, if there are any, whose expression values are correlated with the amount of additive in the diet. Can anyone suggest an approach for this? Can I do it with Limma? > > Cruising through past posts I have come across the following: > > genes <- matrix(rnorm(100),nc=10) > var1 <- rnorm(10) > df <- data.frame(var1=rnorm(10)) > dm <- model.matrix(~ var1, data=df) > fit1 <- lmFit(genes,dm) > fit2 <- eBayes(fit1) > topTable(fit2,coef=2) > > that suggests to simply change the value of the factors to a number. > > However, if I try to adapt it to my case: > var1 <- c(0, 12.66, 25.32, 37.98, 50.64) Hi, Christian. You are on the right track. You have to make sure that var1 is the same length and in the same order as the samples. Sean > df <- data.frame(var1) > dm <- model.matrix(~ var1, data=df) > fit1 <- lmFit(fx,dm) > fit2 <- eBayes(fit1) > topTable(fit2,coef=2) > > I get the following error: > Error in lm.fit(design, t(M)) : incompatible dimensions > > Is the above approach correct? Can I use Limma? If not, is there a particular package that could do the job? I hope I can get some feedback. Thanks in advance! > > Best regards, > Christian De Santis > > > -- > The University of Stirling has been ranked in the top 12 of UK universities for graduate employment*. > 94% of our 2012 graduates were in work and/or further study within six months of graduation. > *The Telegraph > The University of Stirling is a charity registered in Scotland, number SC 011159. > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Hi Sean, Thanks for your quick reply, it worked indeed. Although I am new to BIOC, the solution should have been obvious to me but I didn't see it until after you mentioned it! :-) I have another question: once I perform the regression analysis and use the function topTable() what does the logFC value represent? Since I am not comparing two sample directly anymore, I can't picture what this value represents now. Thanks again and regards, Christian -----Original Message----- From: seandavi@gmail.com [mailto:seandavi@gmail.com] On Behalf Of Sean Davis Sent: 11 September 2013 15:23 To: Christian De Santis Cc: bioconductor at r-project.org Subject: Re: [BioC] Regression Analysis On Wed, Sep 11, 2013 at 10:14 AM, Christian De Santis <christian.desantis at="" stir.ac.uk=""> wrote: > Hi everyone, > > I am analysing gene expression in animals fed 5 different diets. This diets are made of the same components with the exception of one of them that is included with the following concentration 0, 12.66g, 25.32g, 37.98g, 50.64g (from Diet 1 to Diet 5, respectively). > > Samples have been processed using a 44K Agilent two colour microarray. I have run a first analysis using Limma and made pairwise contrasts. I have found that the number of differentially expressed genes increases as I compare diets with larger differences in concentration of the additive (i.e Diet1 vs Diet2 = 256 DE genes, Diet1 vs Diet3 = 1231 DE genes, Diet1 vs Diet3 = 1803 DE genes, etc.). Now, I would like to isolate genes, if there are any, whose expression values are correlated with the amount of additive in the diet. Can anyone suggest an approach for this? Can I do it with Limma? > > Cruising through past posts I have come across the following: > > genes <- matrix(rnorm(100),nc=10) > var1 <- rnorm(10) > df <- data.frame(var1=rnorm(10)) > dm <- model.matrix(~ var1, data=df) > fit1 <- lmFit(genes,dm) > fit2 <- eBayes(fit1) > topTable(fit2,coef=2) > > that suggests to simply change the value of the factors to a number. > > However, if I try to adapt it to my case: > var1 <- c(0, 12.66, 25.32, 37.98, 50.64) Hi, Christian. You are on the right track. You have to make sure that var1 is the same length and in the same order as the samples. Sean > df <- data.frame(var1) > dm <- model.matrix(~ var1, data=df) > fit1 <- lmFit(fx,dm) > fit2 <- eBayes(fit1) > topTable(fit2,coef=2) > > I get the following error: > Error in lm.fit(design, t(M)) : incompatible dimensions > > Is the above approach correct? Can I use Limma? If not, is there a particular package that could do the job? I hope I can get some feedback. Thanks in advance! > > Best regards, > Christian De Santis > > > -- > The University of Stirling has been ranked in the top 12 of UK universities for graduate employment*. > 94% of our 2012 graduates were in work and/or further study within six months of graduation. > *The Telegraph > The University of Stirling is a charity registered in Scotland, number SC 011159. > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor -- The University of Stirling has been ranked in the top 12 of UK universities for graduate employment*. 94% of our 2012 graduates were in work and/or further study within six months of graduation. *The Telegraph The University of Stirling is a charity registered in Scotland, number SC 011159.
ADD REPLY

Login before adding your answer.

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