Entering edit mode
nonCodingGene
▴
10
@noncodinggene-7018
Last seen 7.3 years ago
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

Why do you think
is.infinitewill tell you if any values are less than zero? Or for that matter, within the range 0-1?Sorry, I forgot to show that also tested for
max(dge$weights)andmin(dge$weights), and values where 1 and 0.Well, the test is
check.range <- suppressWarnings(range(weights)) if (any(is.na(check.range)) || check.range[1] <= 0) { stop("weights must be finite positive values") }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.