diff --git a/R/differential_colocalization_analysis.R b/R/differential_colocalization_analysis.R index bb81773..63b7258 100644 --- a/R/differential_colocalization_analysis.R +++ b/R/differential_colocalization_analysis.R @@ -131,6 +131,10 @@ RunDCA.data.frame <- function( chunks <- cut(seq_along(test_groups), length(cl)) } } else if (is.numeric(cl)) { + # Use sequential processing when cl is 1 + if (cl == 1) { + chunks <- seq_along(test_groups) + } # Parallel processing when cl is the number of child processes if ((length(test_groups) * cl) > (cl * 100)) { # Cut into even chunks of 100 values in each chunk diff --git a/R/differential_polarity_analysis.R b/R/differential_polarity_analysis.R index fffd8d2..7a1eb40 100644 --- a/R/differential_polarity_analysis.R +++ b/R/differential_polarity_analysis.R @@ -147,6 +147,10 @@ RunDPA.data.frame <- function( # Parallel processing on cluster chunks <- cut(seq_along(test_groups), length(cl)) } else if (is.numeric(cl)) { + # Use sequential processing when cl is 1 + if (cl == 1) { + chunks <- seq_along(test_groups) + } # Parallel processing when cl is the number of child processes chunks <- cut(seq_along(test_groups), cl) } else {