[BioC] nested factors in edgeR

Gordon K Smyth smyth at wehi.EDU.AU
Fri Apr 27 04:13:09 CEST 2012


Dear Li,

There was typo in my code.  (I wrote glmFit where I meant glmLRT.) 
Correct code is:

   pop <- factor(targets$pop, levels=c("FBK","NWL","SOU","CAR"))
   design <- model.matrix(~pop)

Then later

   fit <- glmFit(d, design)

To test NWL vs FBK (within the north group):

   lrt <- glmLRT(d, fit, coef=2)
   topTags(lrt)

To test CAR vs SOU (within the south group):

   lrt <- glmLRT(d, fit, contrast=c(0,0,-1,1))
   topTags(lrt)

To test S vs N overall:

   lrt <- glmLRT(d, fit, contrast=c(0,-1,1,1)/2)
   topTags(lrt)

Best wishes
Gordon

---------------------------------------------
Professor Gordon K Smyth,
Bioinformatics Division,
Walter and Eliza Hall Institute of Medical Research,
1G Royal Parade, Parkville, Vic 3052, Australia.
smyth at wehi.edu.au
http://www.wehi.edu.au
http://www.statsci.org/smyth

______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}



More information about the Bioconductor mailing list