Skip to content

Commit

Permalink
Fix pseudobulk when no samples data.frame is passed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiez committed Jul 18, 2024
1 parent 7a29eb1 commit 1e64649
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/pseudobulk.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ pseudobulk.Seurat <- function(x, split.by, group.by, samples=NULL, genes=NULL, a
if (is.null(samples)) {
samples <- x[[]][[group.by]]
if (!is.factor(samples))
samples <- levels(factor(samples))
samples <- factor(samples)

samples <- levels(samples)
samples <- data.frame(row.names=samples)
}

Expand Down

0 comments on commit 1e64649

Please sign in to comment.