report a potential bug in edgeR
1
0
Entering edit mode
wang peter ★ 2.0k
@wang-peter-4647
Last seen 10.2 years ago
> 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','t 18h','t18h', + 't24h','t24h','t24h','t36h','t36h','t36h','t48h','t48h' ,'t48h','c6h','c12h','c18h','c36h','c48h')) > design = model.matrix(~fac) > colnames(design) <- levels(fac) > > dge <- estimateGLMCommonDisp(dge, design) > dge <- estimateGLMTagwiseDisp(dge, design) > glmfit.dge <- glmFit(dge, design, dispersion=dge$tagwise.dispersion) > aa = makeContrasts("t0h-c0h",levels=design) > lrt.dgh <- glmLRT(dge, glmfit.dge, aa) Error in coef.names[coef] : only 0's may be mixed with negative subscripts > sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 [2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936 [3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936 [4] LC_NUMERIC=C [5] LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] edgeR_2.6.10 limma_3.12.1 loaded via a namespace (and not attached): [1] tools_2.15.1 -- shan gao Room 231(Dr.Fei lab) Boyce Thompson Institute Cornell University Tower Road, Ithaca, NY 14853-1801 Office phone: 1-607-254-1267(day) Official email:sg839 at cornell.edu Facebook:http://www.facebook.com/profile.php?id=100001986532253
• 1.6k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 8 hours ago
WEHI, Melbourne, Australia
Dear Shan Gao, This is not a bug in edgeR. Rather, your code contains a simple syntax error. Looking at the help page for glmLRT would tell you that the third argument for glmLRT is 'coef' rather than 'contrast'. If you want to enter a contrast, you need glmLRT(dge, glmfit.dge, contrast=aa[,"t0h-c0h"]) There are a number of examples in the edgeR documentation that show you this. If you install edgeR 2.6.12, you will be also be able to use: glmLRT(dge, glmfit.dge, contrast=aa) Best wishes Gordon --------------- original message --------------- [BioC] report a potential bug in edgeR wang peter wng.peter at gmail.com Sun Aug 26 05:17:06 CEST 2012 > 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','t18 h','t18h', + 't24h','t24h','t24h','t36h','t36h','t36h','t48h','t48h','t48h','c6h',' c12h','c18h','c36h','c48h')) > design = model.matrix(~fac) > colnames(design) <- levels(fac) > > dge <- estimateGLMCommonDisp(dge, design) > dge <- estimateGLMTagwiseDisp(dge, design) > glmfit.dge <- glmFit(dge, design, dispersion=dge$tagwise.dispersion) > aa = makeContrasts("t0h-c0h",levels=design) > lrt.dgh <- glmLRT(dge, glmfit.dge, aa) Error in coef.names[coef] : only 0's may be mixed with negative subscripts > sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 [2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936 [3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936 [4] LC_NUMERIC=C [5] LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] edgeR_2.6.10 limma_3.12.1 loaded via a namespace (and not attached): [1] tools_2.15.1 -- shan gao Room 231(Dr.Fei lab) Boyce Thompson Institute Cornell University Tower Road, Ithaca, NY 14853-1801 Office phone: 1-607-254-1267(day) Official email:sg839 at cornell.edu Facebook:http://www.facebook.com/profile.php?id=100001986532253 ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:4}}
ADD COMMENT

Login before adding your answer.

Traffic: 581 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6