Skip to content

Commit

Permalink
Avoid issues with subsetting via do.call, fixes #32.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed May 25, 2022
1 parent d366583 commit 51f8b0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: batchelor
Version: 1.13.0
Date: 2021-08-11
Version: 1.13.1
Date: 2022-05-25
Title: Single-Cell Batch Correction Methods
Authors@R: c(person("Aaron", "Lun", role = c("aut", "cre"), email = "[email protected]"),
person("Laleh", "Haghverdi", role="ctb"))
Expand Down
4 changes: 3 additions & 1 deletion R/correctExperiments.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ correctExperiments <- function(..., batch=NULL, restrict=NULL, subset.row=NULL,
for (nm in combine.assays) {
raw.ass <- lapply(x, assay, i=nm)
if (!is.null(subset.row) && !correct.all) {
raw.ass <- lapply(raw.ass, "[", i=subset.row, , drop=FALSE)
for (i in seq_along(raw.ass)) {
raw.ass[[i]] <- raw.ass[[i]][subset.row,,drop=FALSE]
}
}
assay(merged, nm) <- do.call(cbind, raw.ass)
}
Expand Down

0 comments on commit 51f8b0b

Please sign in to comment.