We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5732e4d commit fb57946Copy full SHA for fb57946
1 file changed
scFates/tools/covariate.py
@@ -376,7 +376,8 @@ def group_test(
376
with context as cv:
377
pr_full = cv.rpy2py(pr_full)
378
# For amplitude test, we take the max amplitude among groups
379
- amps = [np.max(pr_full[groups_py == g]) - np.min(pr_full[groups_py == g]) for g in df[group].cat.categories]
+ # Use categories saved before R conversion
380
+ amps = [np.max(pr_full[groups_py == g]) - np.min(pr_full[groups_py == g]) for g in categories]
381
amp = np.max(amps)
382
383
return (pval, amp, lfc, ovr_lfcs)
0 commit comments