edgeR - problem with glmQLFTest()
2
0
Entering edit mode
@davidpowell-14288
Last seen 6.5 years ago

Greetings,

I'm getting the following error when calling glmQLFTest()

> qlf <- glmQLFTest(fit,contrast=cont.matrix)
Error in data.frame(logFC = logFC, logCPM = glmfit$AveLogCPM, LR = LR,  :
  'row.names' should specify one of the variables

> traceback()
4: stop("'row.names' should specify one of the variables")
3: data.frame(logFC = logFC, logCPM = glmfit$AveLogCPM, LR = LR, 
       PValue = LRT.pvalue, row.names = rn)
2: glmLRT(pois.fit, coef = coef, contrast = contrast)
1: glmQLFTest(fit, contrast = cont.matrix)

I think the error is due to the call to  .isBelowPoissonBound() only returning a single row for my data set.   My guess is that the problem is that in glmLRT() the call

logFC <- drop((glmfit$coefficients %*% contrast)/log(2))

will produce a vector rather than a matrix, which eventually results in the error from data.frame().

I have an example data set & code at this gist https://gist.github.com/drpowell/ac473045cfea8b489d49e645d3239a53#file-dge-r

Thanks,

-- David

 

edger • 1.1k views
ADD COMMENT
0
Entering edit mode

Please put the table somewhere else, it's expanding the whole ~2000 rows onto the page.

ADD REPLY
0
Entering edit mode

I've edited the gist URL so that it shows as a link instead of inserting the whole dataset.

ADD REPLY
1
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 34 minutes ago
The city by the bay

A simpler reproducible example is this:

library(edgeR)
example(glmFit)
glmLRT(fit[1,], contrast=diag(2))

... and yes, it is caused by drop when computing logFC. The simplest solution would be to just get rid of drop; if we want a vector (e.g., when there is only one coefficient to test), we can just coerce it directly.

ADD COMMENT
1
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

Thanks David. I have committed a fix to edgeR 3.20.1 for Bioconductor 3.6.

ADD COMMENT

Login before adding your answer.

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