diff --git a/R/pseudobulk.R b/R/pseudobulk.R index c0a95bf..b0445b0 100644 --- a/R/pseudobulk.R +++ b/R/pseudobulk.R @@ -47,7 +47,7 @@ pseudobulk.Seurat <- function(x, split.by, group.by, samples=NULL, genes=NULL, a } xl <- lapply(xl, function(x) { - m <- matrix(0, nrow=nrow(x), ncol=length(samples), dimnames=list(rownames(x), rownames(samples))) + m <- matrix(0, nrow=nrow(x), ncol=nrow(samples), dimnames=list(rownames(x), rownames(samples))) if (packageVersion("Seurat") >= "5.0.0") tmp <- Seurat::AggregateExpression(x, group.by=group.by, assay=assay)[[assay]]