From 465ad19764bcaf1b6c051b7b4b22495fc5f23eba Mon Sep 17 00:00:00 2001 From: mikejiang Date: Tue, 10 Nov 2020 14:09:17 -0800 Subject: [PATCH] print more explicit message when 'all samples' group is causing tree discrepancy. #119 --- R/flowJoWorkspace_Methods.R | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/R/flowJoWorkspace_Methods.R b/R/flowJoWorkspace_Methods.R index 8f5d3d3..ed49b34 100644 --- a/R/flowJoWorkspace_Methods.R +++ b/R/flowJoWorkspace_Methods.R @@ -327,7 +327,19 @@ backend <- match.arg(backend, c("h5", "tile")) # # try to post process the GatingSet to split the GatingSets(based on different the gating trees) if needed gslist <- suppressMessages(gs_split_by_tree(gs)) if(length(gslist) > 1) - warning("GatingSet contains different gating tree structures and must be cleaned before using it! ") + { + msg <- "GatingSet contains different gating tree structures and must be cleaned before using it!\n " + if(grepl("all samples", groups[groupInd], ignore.case = TRUE)) + { + msg <- c(msg + , "It seems that you selected the 'All Samples' group," + ," which is a generic group and typically contains samples with different gating schemes attached." + , "Please choose a different sample group and try again.") + } + warning(msg) + + } + gs }