Hi Preethy,

You likely want:

design=model.matrix(~pair+Treat:Phenotype, data=pdata)

If that still yields the error, then you'll need to share "pdata" or
"design". Also, please don't crosspost on both this list and biostars (
https://www.biostars.org/p/98907/), it duplicates the community effort.

Devon


--
Devon Ryan, Ph.D.
Email: dpryan@dpryan.com
Laboratory for Molecular and Cellular Cognition
German Centre for Neurodegenerative Diseases (DZNE)
Ludwig-Erhard-Allee 2
53175 Bonn
Germany
<devon.ryan@dzne.de>


On Fri, Apr 25, 2014 at 11:15 AM, Preethy [guest] <guest@bioconductor.org>wrote:

>
> Hi All,
>
> I had been trying to do DE analysis of my RNAseq experiment using edgeR
> and am having some isssues. The details of the Experiment and the R code I
> tried below:
>
> (a) Paired experimental design with 45 pairs
> (b) Treatment: "Before" and "After"
> (c) Phenotype: 1 & 2
> Aim: Look for DE genes between Phenotype 1 and 2 upon treatment taking
> into account the paired design
>
> The R code tried:
>
> library(edgeR)
> counts<-read.delim(file="counts.dat",header=T)
> pair=factor(pdata$pair)
> Treat=factor( pdata$treat)
> Phenotype=factor(pdata$pheno)
> group<-paste(Treat,Phenotype,sep=".")
> design=model.matrix(~pair+Treat:Phenotype, data=counts)
> counts.DGEList<-DGEList(counts, group=group)
> y<-calcNormFactors(counts.DGEList)
> y<-estimateCommonDisp(y, design)
> y<-estimateGLMTrendedDisp(y, design)
>
>
> Error message I get:
>
> Error in glmFit.default(y, design = design, dispersion = dispersion,
> offset = offset,  :
>   Design matrix not of full rank.  The following coefficients not
> estimable:
>  TreatBefore:Phenotype1 TreatBefore:Phenotype2
>
>
> Any idea to solve this out?
>
> Thanks,
> Preethy
>
>  -- output of sessionInfo():
>
> R version 3.1.0 (2014-04-10)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=fi_FI.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8
>  [5] LC_MONETARY=fi_FI.UTF-8    LC_MESSAGES=en_GB.UTF-8
>  [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] edgeR_3.4.2   limma_3.18.13
>
>
> --
> Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________
> 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]]

