Dear Gao Shan,

> fit1 <- contrasts.fit(glmfit.dge, contrast.matrix)
> fit2 <- eBayes(fit1)
> topTable(fit2, coef=1, adjust="BH")

It seemed that you are not going to carry out your analysis with the GLM
likelihood ratio test of edgeR package. If I'm not mistaken, the
*eBayes*function is belongs to the Limma package. If you would like to
analyse your
RNA-Seq data with Limma package, you need to do data conversion with voom()
as mentioned in the Limma User's Guide. The Limma User's Guide is worth for
a read in this case.

>
makeContrasts("t0h-c0h","t6h-c6h","t12h-c12h","t18h-c18h","t24h-c24h","t36h-c36h","t48h-c48h","t48h-c0h",levels=design)

The section 3.3.1 of Chapter 3 in the latest edgeR User's Guide has a clear
guide how you could build your contrast matrix if you still prefer to carry
your analysis with the edgeR. That section was added recently because
several users have been asking similar question as you did via mailing list
.

Have a nice Sunday.

Best regards,
KJ Lim



On 26 August 2012 05:35, wang peter <wng.peter@gmail.com> wrote:
>
> contrasts.fit cannnot work on glmFit
> such is my coding:
>
> d <- DGEList(counts = d, lib.size = lib_size)
> #normalization
> dge <- calcNormFactors(d)
> rm(d)
>
>
fac=factor(c('c0h','c0h','c0h','c24h','c24h','c24h','t0h','t0h','t0h','t6h','t6h','t6h','t6h','t12h','t12h','t12h','t12h','t18h','t18h','t18h','t18h',
>
 't24h','t24h','t24h','t36h','t36h','t36h','t48h','t48h','t48h','c6h','c12h','c18h','c36h','c48h'))
> design = model.matrix(~fac)
> colnames(design) <- levels(fac)
> contrast.matrix =
>
makeContrasts("t0h-c0h","t6h-c6h","t12h-c12h","t18h-c18h","t24h-c24h","t36h-c36h","t48h-c48h","t48h-c0h",levels=design)
>
> dge <- estimateGLMCommonDisp(dge, design)#
> dge <- estimateGLMTagwiseDisp(dge, design)
> glmfit.dge <- glmFit(dge, design, dispersion=dge$tagwise.dispersion)#
>
> fit1 <- contrasts.fit(glmfit.dge, contrast.matrix)
>
> Error in cov2cor(fit$cov.coefficients) :
>   'V' is not a square numeric matrix
>
> fit2 <- eBayes(fit1)
> topTable(fit2, coef=1, adjust="BH")
>
> _______________________________________________
> 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]]

