statOmics/zingeR

Bug in NBsimSingleCell()

aarzalluz opened this issue · 4 comments

Dear authors,

I installed your package and tested the NBsimSingleCell() function using the example lines of code you have provided in the documentation. In the final line of the example, i.e. the function call itself, I get the following error:

Error in rowSums(counts) : 'x' must be an array of at least two dimensions

I had a look at the function code, and it seems to me that the "counts" local variable generated by the rZANBI function is not a matrix or dataframe, but a vector. At any rate, I don't know whether that is where the error comes from, or how to fix it...

Thanks,

Ángeles

Dear Ángeles,

Thank you for letting us know. You are correct, it seems that the rZANBI function outputs a vector and no longer a matrix. I have now fixed this by converting the output to the matrix format, which should solve the problem.

However, we would no longer recommend to use this simulation framework. It has been updated, and the updated framework can be found in the repository from our updated paper: https://github.com/statOmics/zinbwaveZinger
I had not put this information in the README file for this repository yet, which I have done now. My apologies for any inconvenience this may have caused.
The updated framework will be faster and has a different method to estimate the gene-level parameters required for the simulation.
Let us know if you would have any additional questions.

Best,
Koen

Thank you for getting back to me so quickly, Koen. I'll move on to use the updated framework then :)

I understand that the way to go about it is to install the required packages, including zingeR, source the updated simulation functions in the zingwaveZinger repo and use them as detailed in the zingeR vignettes and in the new framework documentation. Is that right?

Ángeles

You would not necessarily have to install zingeR to simulate, just source the zingeR simulation help functions file in that repository.
You might run into trouble by loading zingeR and sourcing since both contain a NBsimSingleCell function, so make sure to use the correct one (by sourcing after loading zingeR if you need both).

That makes sense, thank you! Since the README file in the zinbwaveZinger repo says that zingeR is a dependency, I thought I'd make sure first.