Hi,
When I try to compute the observational weights using by supplying a fitted model object to the zinbwave function zinbwave(sce10x, fitted_model = zinb, K = 0,observationalWeights = TRUE) I get the following error
Error in t.default(x) : argument is not a matrix
Since the matrix in the SCE object is sparse, I had to convert the count matrix to dense manually
weights <- computeObservationalWeights(zinb, as.matrix(assay(sce10x)))
dimnames(weights) <- dimnames(sce10x)
assay(sce10x, "weights") <- weights
I think a one line change to the code can fix the problem.
Best,
Rick