diff --git a/R/pseudobulk.R b/R/pseudobulk.R index a83d2a6..9c5d962 100644 --- a/R/pseudobulk.R +++ b/R/pseudobulk.R @@ -59,21 +59,17 @@ pseudobulk.Seurat <- function(x, split.by, group.by, samples=NULL, genes=NULL, a }) dge <- lapply(names(xl), function(n) { - #s <- samples - #s$cluster <- n tmp <- edgeR::DGEList(xl[[n]], samples=samples, genes=genes) tmp$samples$cluster <- n - #tmp$genes <- genes - #colnames(tmp) <- unname(colnames(tmp)) tmp }) names(dge) <- names(xl) - #if (sort_samples) { - # dge <- lapply(dge, function(x) { - # x[, sort(rownames(samples))] - # }) - #} + if (sort_samples) { + dge <- lapply(dge, function(x) { + x[, sort(rownames(samples))] + }) + } dge }