From 2bc31cb3342404fb3a4159acb51975fb15c00cf4 Mon Sep 17 00:00:00 2001 From: eos-jin Date: Fri, 27 Mar 2026 17:36:39 +1100 Subject: [PATCH] fix: use assignment operator <- instead of comparison < in count_retained_clones The bug on line 54 used '<' (comparison) instead of '<-' (assignment) when handling the edge case where no clones meet the threshold without grouping. This caused n_clones to not be properly assigned, leading to incorrect behavior when all values are below the threshold. This fix ensures that zero counts are correctly returned when no data passes the threshold filter. --- R/filter_clones.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/filter_clones.R b/R/filter_clones.R index 2fa90a3..f2aa432 100644 --- a/R/filter_clones.R +++ b/R/filter_clones.R @@ -51,7 +51,7 @@ count_retained_clones <- function(count_data, thresholds, count_column, # Be explicit when the count is zero if (nrow(n_clones) == 0) { - n_clones < data.table(cnt = c(0L)) + n_clones <- data.table(cnt = c(0L)) } # have to do this so the merge later can find a common column