The obj$counts is numeric. When I run the following code seems that it is not true because return an error that explains the opposite. Is there one alternative estimateDisp() function?
The error doesn't come from estimateDisp, but instead from colSums. Given the choice between accepting what colSums says about your data, and what you say about your data, I am going with colSums every time. You for sure have non-numeric values in the counts list item of your DGEList.
My guess is that your obj is not a DGEList object, in which case the identity of obj$counts is irrelevant because it will never be accessed. To illustrate an incorrect code sequence leading to the same error:
> counts <- matrix(0,2,2)
> obj <- list(counts=counts)
> y <- as.matrix(obj)
> colSums(y)
Error in colSums(y) : 'x' must be numeric
You can check whether obj is a DGEList by typing class(obj).
How can I set numeric value in the counts list?
Currently obj$counts is this:
What does
return?
It returns:
P1, P2, P3 and P4 equals to integer
I'm sorry, obj$counts is this:
and
returs: P1, P2, P3 and P4 equals to integer
What do you get for
Also, don't run code and then tell me what it returned. You can copy/paste the output just as easily as you can copy/paste the code you ran.