Skip to content

Commit

Permalink
fix GetResidualSCTModel
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhanH committed Jan 18, 2021
1 parent 4e10257 commit 5fe244b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/preprocessing.R
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,14 @@ HTODemux <- function(
GetResidual <- function(
object,
features,
assay = "SCT",
assay = NULL,
umi.assay = NULL,
clip.range = NULL,
replace.value = FALSE,
na.rm = TRUE,
verbose = TRUE
) {
assay <- assay %||% DefaultAssay(object = object)
if (IsSCT(assay = object[[assay]])) {
object[[assay]] <- as(object[[assay]], 'SCTAssay')
}
Expand Down Expand Up @@ -3298,7 +3299,6 @@ GetResidualSCTModel <- function(
MARGIN = 1,
FUN = anyNA)
))

if (replace.value) {
features_to_compute <- new_features
} else {
Expand Down Expand Up @@ -3329,7 +3329,7 @@ GetResidualSCTModel <- function(
return(matrix(
data = NA,
nrow = length(x = features_to_compute),
ncol = length(x = Cells(x = SCTModel)),
ncol = length(x = model.cells),
dimnames = list(features_to_compute, model.cells)
))
}
Expand Down

0 comments on commit 5fe244b

Please sign in to comment.