Skip to content

Commit

Permalink
refactor(bootstrapCompartments): use implicit return from mclapply
Browse files Browse the repository at this point in the history
  • Loading branch information
jamespeapen committed Dec 18, 2024
1 parent 6b11cc6 commit 5dd450d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/bootstrapCompartments.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,10 @@ bootstrapCompartments <- function(obj, original.obj, bootstrap.samples = 1000,

# Stupid check for perfect correlation with global mean
if (any(is.na(cor.bins$binmat.cor))) {
absig <- matrix(rep(NA, nrow(cor.bins$binmat.cor)))
matrix(rep(NA, nrow(cor.bins$binmat.cor)))
} else {
absig <- getABSignal(cor.bins, assay = assay)
getABSignal(cor.bins, assay = assay)
}
return(absig)
}, mc.cores = ifelse(parallel, cores, 1))

# summarize the bootstraps and compute confidence intervals
Expand Down

0 comments on commit 5dd450d

Please sign in to comment.