From 0299e56fc8df98058c6e1add3b2a84e20042e82f Mon Sep 17 00:00:00 2001 From: Dillon Hammill Date: Tue, 5 Nov 2024 12:42:14 +1100 Subject: [PATCH] ODC-180 merge all samples when groupBy = NA and CollapseDataFroGating = TRUE. --- R/gating-methods.R | 3 +++ R/preprocessing-method.R | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/R/gating-methods.R b/R/gating-methods.R index a6f3a4d..ad2719b 100644 --- a/R/gating-methods.R +++ b/R/gating-methods.R @@ -290,6 +290,9 @@ roxygen_parameter <- function() { split_by <- apply(pData(parent_data)[, split_by, drop = FALSE], 1, paste, collapse = ":") split_by <- as.character(split_by) } + # all samples same group - labeled "all" + } else if(groupBy == "" && isCollapse) { + split_by <- rep("all", length(parent_data)) } else { split_by <- sampleNames(parent_data) } diff --git a/R/preprocessing-method.R b/R/preprocessing-method.R index e5a72c9..593c87d 100644 --- a/R/preprocessing-method.R +++ b/R/preprocessing-method.R @@ -83,10 +83,10 @@ update_list <- function (x, val) split_by <- as.character(split_by) } fslist <- split(parent_data, split_by) - }else - { - fslist <- list(parent_data) - } + }else { + # all samples same group named "all" - matches .gating_gtMethod() + fslist <- list("all" = parent_data) + } # construct method call thisCall <- substitute(f1())