You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for publishing this package! I've found it very useful to get fast wilcoxon tests, however I've noticed some of the auxiliary stats returned are incorrect which could cause issues for users.
Specifically, wilcoxauc returns incorrect AvgExpr values when called on a dense matrix. This appears to be because the function cpp_rank_matrix_dense directly modifies the matrix X, thus altering its value for later computations.
Furthermore, the results column listed as logFC is not actually returning the log fold change, but the difference in means. I think either the logFC column should be named differently to reflect what it does return (e.g. meanDiff), or its calculation should be changed to actually return the logFC between group means.
> res
feature group avgExpr logFC statistic auc pval padj pct_in pct_out
1 Feature1 A 2 -3 0 0 0.0808556 0.0808556 100 100
2 Feature1 B 5 3 9 1 0.0808556 0.0808556 100 100
> res2
feature group avgExpr logFC statistic auc pval padj pct_in pct_out
1 Feature1 A 1 -15 0 0 0.0808556 0.0808556 100 100
2 Feature1 B 16 15 9 1 0.0808556 0.0808556 100 100
Here, the avgExpr in res is the average rank of the values, rather than the actual average. Additionally, we see that logFC in both cases is equal to the difference in means rather than the logFC (which should be calculated as +/-4, assuming we are taking log2)
The text was updated successfully, but these errors were encountered:
Thanks for publishing this package! I've found it very useful to get fast wilcoxon tests, however I've noticed some of the auxiliary stats returned are incorrect which could cause issues for users.
Specifically, wilcoxauc returns incorrect AvgExpr values when called on a dense matrix. This appears to be because the function cpp_rank_matrix_dense directly modifies the matrix X, thus altering its value for later computations.
Furthermore, the results column listed as logFC is not actually returning the log fold change, but the difference in means. I think either the logFC column should be named differently to reflect what it does return (e.g. meanDiff), or its calculation should be changed to actually return the logFC between group means.
I've included a brief example to reproduce below:
The values of res and res2 are now:
Here, the
avgExpr
inres
is the average rank of the values, rather than the actual average. Additionally, we see thatlogFC
in both cases is equal to the difference in means rather than the logFC (which should be calculated as +/-4, assuming we are taking log2)The text was updated successfully, but these errors were encountered: