Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transform
data
also for single cells in AverageExpression
This fixes a discrepancy in AverageExpression: When `use.scale` and `use.raw` are both FALSE (default), identities with several cells were transformed back (exp(x) - 1) before averaging while single cell identities were neither averaged (no need) nor transformed (discrepancy). This commit fixes this by transforming the data data conditionally in the scenario described above. It uses `if(!(use.scale | use.raw))` assuming this would be faster to evaluate than `if(use.slot == "data")` or applying `mean` to a single value to safe the conditional altogether. This performance assumption, however, was not tested. fixes satijalab#571
- Loading branch information