Question: glmQLFTest, coef=2:4, decideTestDGE not working
gravatar for rebeccajane93
4 months ago by
rebeccajane930 wrote:

Dear Sir or madam, 

I have completed a QLF GLM using edgeR and i have top tags using the script below. I can not get the decideTestsDGE function to work at all and i have read in a few places that it doesn't work with multiple coefficients, is this still the case? It would seem it isn't an issue with the LRT test but i would like to get the number of up and down genes from my QLF test.

Treatment <-factor(targets$treat,levels=c("Sham","Infected"))
Strain <- factor (targets$strain, level=c("D","R"))

y = DGEList(counts=x[,1:8])
keep <- rowSums(cpm(y)>1) >= 4
y <- y[keep, , keep.lib.sizes=FALSE]

y = calcNormFactors (y)

design2 <- model.matrix(~Treatment * Strain, data=targets)

y <- estimateGLMCommonDisp(y,design2, verbose=TRUE)
y <- estimateGLMTrendedDisp(y, design2)
y <- estimateGLMTagwiseDisp(y, design2)

fit <- glmQLFit(y, design2)


qlf <- glmQLFTest(fit, coef=2:4)
tab <- topTags(qlf)

summary(dt <- decideTestsDGE(qlf))

Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),  : 
  'data' must be of a vector type, was 'NULL'



R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] edgeR_3.16.5  limma_3.30.13

loaded via a namespace (and not attached):
[1] splines_3.3.3   grid_3.3.3      locfit_1.5-9.1  lattice_0.20-35


Many Thanks

Rebecca Pawluk


ADD COMMENTlink modified 4 months ago by Aaron Lun18k • written 4 months ago by rebeccajane930
gravatar for Aaron Lun
4 months ago by
Aaron Lun18k
Cambridge, United Kingdom
Aaron Lun18k wrote:

Well, it should work:

treatment <- factor(rep(c("Sham", "Infected"), each=4))
strain <- factor(rep(rep(c("D", "R"), each=2), 2))
design <- model.matrix(~treatment*strain)
counts <- matrix(rnbinom(100*nrow(design), mu=100, size=10), 

y <- DGEList(counts)
y <- calcNormFactors(y)
y <- estimateDisp(y, design)
fit <- glmQLFit(y, design)
qlf <- glmQLFTest(fit, coef=2:4)

summary(decideTestsDGE(qlf)) # works fine.

Try to modify the working example above until you generate the error, if you want to demonstrate that there is a bug.

ADD COMMENTlink modified 4 months ago • written 4 months ago by Aaron Lun18k


I get the error with the original working example above also. I have once been able to get it to work when stating coefficient 3 alone but not when I state more than one. I am not sure how to go ahead with this.

Many Thanks


ADD REPLYlink written 4 months ago by rebeccajane930

Updating R and edgeR would be a good start. We're on version 3.18.1, soon to be 3.20.0 (tomorrow).

ADD REPLYlink written 4 months ago by Aaron Lun18k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 143 users visited in the last hour