Skip to content

Commit

Permalink
Merge pull request satijalab#573 from mschilli87/fix_571
Browse files Browse the repository at this point in the history
Transform `data` also for single cells in AverageExpression
  • Loading branch information
andrewwbutler authored Jun 27, 2018
2 parents 603caf6 + d65536a commit 012b28f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,10 @@ AverageExpression <- function(
genes.assay <- unique(x = intersect(x = genes.assay, y = rownames(x = data.use)))
if (length(x = temp.cells) == 1) {
data.temp <- (data.use[genes.assay, temp.cells])
# transform data if needed (alternative: apply fxn.average to single value above)
if(!(use.scale | use.raw)) { # equivalent: slot.use == "data"
data.temp <- expm1(data.temp)
}
}
if (length(x = temp.cells) >1 ) {
data.temp <- apply(
Expand Down

0 comments on commit 012b28f

Please sign in to comment.