edgeR error in dispCoxReid - no data rows with required number of counts
1
0
Entering edit mode
@melissabarrett747-6863
Last seen 8.0 years ago
United States

Good morning,

I am analyzing RNAseq data from 2 different populations exposed to 2 experimental treatments. I get the following error when running edgeR: "error in dispCoxReid(y, design=design, offset=offset, subset=subset, : no data rows with required number of counts." After this error is reported, R freezes and I must force quit the program. Im not using this function in my code so I am unsure why I am getting the error message. Interestingly, I get the error when I run the code on a .csv file containing values I obtained by dividing raw counts by the sum of all counts in a library to correct for differences in size across libraries (i.e. proportional counts). When I run the code on a .csv file containing the raw counts, I do not get the error message. My code and the error message are below. Any advice is much appreciated.

library("edgeR")
x=read.csv("~/EGS/proportions.csv", header = TRUE)
rownames(x) <- x[,1]; 
x <- as.matrix(x[,-1]) 
keep <- rowSums(cpm(x)>1) >= 9 
z<- x[keep,] 
group <- factor(c(1,1,2,2,2,3,3,4,4)) 
population <- factor(c(1,1,2,2,2,1,1,2,2))
salinity <- factor(c(1,1,1,1,1,2,2,2,2))
design <- model.matrix(~population + salinity)
y <-DGEList(counts=z, group=group)
y <- calcNormFactors(y) 
y <- estimateGLMCommonDisp(y,design)

Error in dispCoxReid(y, design = design, offset = offset, subset = subset, : no data rows with required number of counts

 

 

 

 

edger rnaseq error • 1.1k views
ADD COMMENT
0
Entering edit mode

Hello James and Aaron,

Thank you very much for your replies, they were both very helpful!

ADD REPLY
2
Entering edit mode
@james-w-macdonald-5106
Last seen 4 hours ago
United States

You are trying to be tricky when that isn't necessary, nor helpful. edgeR expects the counts, and is quite capable of accounting for the library size without any pre-processing on your part. When you try to account for the library sizes you are actually undermining your analysis, as edgeR is expecting integer counts, and will not work correctly if you feed in something else.

In future, when you show your code, please try to cut down to just what is necessary to show your problem. Keeping in all that other stuff is not helpful.

ADD COMMENT
0
Entering edit mode

To elaborate a bit further, the error is triggered by an internal row sum filter in dispCoxReid when it is called by estimateGLMCommonDisp. Because all of the values in z are small (as you're dividing the count by the library size), no gene/row will pass this internal filter. This results in an empty matrix and the aforementioned error. As James suggested, use the original counts to overcome this problem.

ADD REPLY

Login before adding your answer.

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