bvieth / powsimR

Power analysis is essential to optimize the design of RNA-seq experiments and to assess and compare the power to detect differentially expressed genes. PowsimR is a flexible tool to simulate and evaluate differential expression from bulk and especially single-cell RNA-seq data making it suitable for a priori and posterior power analyses.
https://bvieth.github.io/powsimR/
Artistic License 2.0
103 stars 23 forks source link

possible bug in plotEvalDE #32

Closed slobentanzer closed 4 years ago

slobentanzer commented 5 years ago

hi beate, i tried to run your package on a small RNA sequencing we did a while ago, and it went fine until i wanted to plot the eval (plotEvalDE()), there i got the error "function not found: n()"

i was able to hotfix it, the error is in the dplyr pipe for dat.marginal.calc, the standard error calculation says sqrt(n()) in the denominator. i am not familiar with this call, or if it needs a particular package to work, but i installed all dependencies as instructed. with my hotfix (substituting length(value) for n()) it works, though i am not sure if this is the intended use.

EDIT: first time was on mac, I repeated it on linux now, same result.

kind regards, sebastian

bvieth commented 4 years ago

Hello Sebastian,

thank you for pointing this out. Appparently, including tidyverse in function calls (here n()) can be cumbersome and I forgot to state these functions in the namespace. In the new version (1.2.0), this should be fixed now.

Kind regards Beate