Question: weights must be finite positive value

0

nonCodingGene •

**10**wrote:I'm using `edgeR and an error for which I have not found a solution just appeared.`

design <- model.matrix(~Cell.type, data = colData(summ.exp_norm)) dge$weights <- zinb.weights dge <- estimateDisp(dge, design) Error in .compressWeights(y, weights) : weights must be finite positive values

As you can se no weight is out the rang 0-1 or infinite.

> sum(is.infinite(dge$weights)) [1] 0

Where can the error be?

Thanks

ADD COMMENT
• link
•
modified 4 months ago
by
Aaron Lun •

**21k**• written 4 months ago by nonCodingGene •**10**
Why do you think

`is.infinite`

will tell you if any values are less than zero? Or for that matter, within the range 0-1?48kSorry, I forgot to show that also tested for

`max(`

`dge$weights)`

and`min(`

`dge$weights), and values where 1 and 0.`

10Well, the test is

So really it's saying you have either negative or NA values. This comes after running

`makeCompressedMatrix`

, so you might see if there are any NA values after that step with your weights matrix.48k10