Skip to main content

Posts

Showing posts from July, 2014

Expression analysis with R: package edgeR

Sample code for edgeR and DESeq for differential expressed gene Best step-by-step code http://www.nbic.nl/uploads/media/Practical_DiffExpr.pdf Comparision of edgeR and DESeq http://gettinggeneticsdone.blogspot.com/2012/09/deseq-vs-edger-comparison.html # edgeR  ======== ## Make design matrix condition < relevel ( factor ( meta $ condition ), ref = "untreated" ) libType < factor ( meta $ libType ) edesign < model.matrix ( ~ libType + condition ) ## Make new DGEList, normalize by library size, and estimate dispersion allowing  possible trend with average count size e < DGEList ( counts = counttable ) e < calcNormFactors ( e ) e < estimateGLMCommonDisp ( e , edesign ) e < estimateGLMTrendedDisp ( e , edesign ) e < estimateGLMTagwiseDisp ( e , edesign ) ## MDS Plot plotMDS ( e , main = "edgeR MDS Plot" ) ## Biological coefficient of variation plot plotBCV ( e , cex = 0.4 , main = &