diff --git a/DESCRIPTION b/DESCRIPTION index ef8cd3f..44bcd32 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 = "infinite.monkeys.with.keyboards@gmail.com"), person("Laleh", "Haghverdi", role="ctb")) diff --git a/R/correctExperiments.R b/R/correctExperiments.R index c4652b4..d3542ff 100644 --- a/R/correctExperiments.R +++ b/R/correctExperiments.R @@ -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) }