From a1d289b0803f46d884c51f606b48ccf0d4a7b072 Mon Sep 17 00:00:00 2001 From: phauchamps Date: Mon, 4 Mar 2024 18:02:14 +0100 Subject: [PATCH] - in applyFlowJoGate(): try to avoid using 'All Samples' generic sample group to query flowjo workspace (in order to avoid CytoML warning when using 'All Samples') - bumped version to 0.99.5 --- DESCRIPTION | 2 +- NEWS.md | 5 +++++ R/CytoProcessingStepImplementations.R | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5ae7660..5567433 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: CytoPipelineUtils Title: Utils for use with CytoPipeline -Version: 0.99.4 +Version: 0.99.5 Authors@R: c(person(given = "Philippe", family = "Hauchamps", diff --git a/NEWS.md b/NEWS.md index c893d00..cdcd9f3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,10 @@ # CytoPipelineUtils 0.99 +## CytoPipelineUtils 0.99.5 +- in applyFlowJoGate(): try to avoid using 'All Samples' generic sample group +to query flowjo workspace (in order to avoid CytoML warning when using +'All Samples') + ## CytoPipelineUtils 0.99.4 - Added `getEventNbFromFJGates()` - In `getFlowJoLabels()`, if one of the `cellTypes` is not found in any sample diff --git a/R/CytoProcessingStepImplementations.R b/R/CytoProcessingStepImplementations.R index af39fd1..227bd4b 100644 --- a/R/CytoProcessingStepImplementations.R +++ b/R/CytoProcessingStepImplementations.R @@ -1164,6 +1164,13 @@ applyFlowJoGate <- function(ff, possibleGroups <- sampleGroupDF[sampleGroupDF$sampleID == sampleID, "groupName", drop = TRUE] + + if (length(possibleGroups) > 1 && "All Samples" %in% possibleGroups) { + # remove All Samples which is the by default sample group + # to avoid complain of CytoML function + possibleGroups <- possibleGroups[-which(possibleGroups == "All Samples")] + } + samplesPerGroup <- table( sampleGroupDF[which( sampleGroupDF$groupName %in% possibleGroups),]$groupName)