glmQLFTest, coef=2:4, decideTestDGE not working
1
0
Entering edit mode
@rebeccajane93-14266
Last seen 7.2 years ago

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)
y$samples

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

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

fit <- glmQLFit(y, design2)

colnames(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'

 

 

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

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.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.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

 

edger DGE coef • 2.0k views
ADD COMMENT
0
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 4 hours ago
The city by the bay

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), 
                 ncol=nrow(design))

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 COMMENT
0
Entering edit mode

Hi, 

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

Becky

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 631 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