File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -375,9 +375,7 @@ MarkersPlot <- function(
375375 } else {
376376 genes <- dplyr :: filter(markers , !! rlang :: parse_expr(select ))$ gene
377377 }
378- genes <- unique(genes )
379- # subset the object to only include the selected genes
380- object <- subset(object , features = genes )
378+
381379 # subset the object to only include the comparison groups
382380 comp_groups <- unique(unlist(strsplit(unique(as.character(markers [[comparison_by_1 ]])), " :" )))
383381 if (length(comp_groups ) > 1 ) {
@@ -386,6 +384,9 @@ MarkersPlot <- function(
386384 object @ meta.data [[comparison_by_2 ]] <- ifelse(object @ meta.data [[comparison_by_2 ]] == comp_groups , comp_groups , " Other" )
387385 object @ meta.data [[comparison_by_2 ]] <- factor (object @ meta.data [[comparison_by_2 ]], levels = c(comp_groups , " Other" ))
388386 }
387+ genes <- unique(genes )
388+ # subset the object to only include the selected genes
389+ object <- subset(object , features = genes )
389390
390391 args <- list (
391392 object ,
You can’t perform that action at this time.
0 commit comments