Skip to content

Commit 0ec407d

Browse files
committed
fix(screp_subset): update Seurat object handling to use tidyseurat
- replaced base::subset with dplyr::filter for better compatibility - added note about requiring tidyseurat for dplyr verbs on Seurat objects
1 parent f81f87c commit 0ec407d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/clonalutils.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ merge_clonal_groupings <- function(data, groupings, sep = " // ") {
144144
#' }
145145
screp_subset <- function(screp, subset) {
146146
if (inherits(screp, "Seurat")) {
147-
eval(parse(text = paste('base::subset(screp, subset = "', subset, '")')))
147+
# You need tidyseurat to work with dplyr verbs on Seurat objects
148+
dplyr::filter(screp, !!parse_expr(subset))
148149
} else {
149150
screp <- sapply(names(screp), function(x) {
150151
y <- screp[[x]]

0 commit comments

Comments
 (0)