[BioC] Regression Analysis
Sean Davis
sdavis2 at mail.nih.gov
Wed Sep 11 16:23:14 CEST 2013
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
More information about the Bioconductor
mailing list