From f695201de76ffb16f6f9d8b5cd7161d4e57cfb8d Mon Sep 17 00:00:00 2001
From: Simeon <51403284+simeross@users.noreply.github.com>
Date: Fri, 26 Jan 2024 14:08:57 +0100
Subject: [PATCH] add vararg to threshold testing

---
 R/test_clustering_thresholds.R    | 5 +++--
 man/test_clustering_thresholds.Rd | 5 ++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/R/test_clustering_thresholds.R b/R/test_clustering_thresholds.R
index f2e80da..70f6b55 100644
--- a/R/test_clustering_thresholds.R
+++ b/R/test_clustering_thresholds.R
@@ -12,6 +12,7 @@
 #' running `which meshclust`, see also \code{\link{meshclustR}}.
 #' @param meshclust_temp_dir temporary directory for meshclust files.
 #' Temporary files will be removed after running the function.
+#' @param ... pass on any additional strings to the meshclust commandline tool.
 #'
 #' @return A list of clustering results, where each element in the list corresponds to a specific threshold value.
 #'
@@ -29,7 +30,7 @@
 test_clustering_thresholds <- function(MyDNAstring, step_size,
                                        step_max = 0.99, ncores = 1,
                                        method = "Clusterize",
-                                       meshclust_temp_dir = "tmp") {
+                                       meshclust_temp_dir = "tmp", ...) {
 
   if(method == "Clusterize"){
     #DECIPHER removed the 'type' argument from IdClusters around v2.24. Currently (Feb23), the function is renamed "Clusterize"
@@ -56,7 +57,7 @@ test_clustering_thresholds <- function(MyDNAstring, step_size,
     clus_tbl_list <- lapply(seq(0, step_max, step_size),
                              meshclustR, seqs = MyDNAstring,
                              filepath = meshclust_temp_dir,
-                             meshclust_bin = method)
+                             meshclust_bin = method, ...)
     if(!preexisting){
       unlink(meshclust_temp_dir)
     }
diff --git a/man/test_clustering_thresholds.Rd b/man/test_clustering_thresholds.Rd
index 88e2194..de5761e 100644
--- a/man/test_clustering_thresholds.Rd
+++ b/man/test_clustering_thresholds.Rd
@@ -10,7 +10,8 @@ test_clustering_thresholds(
   step_max = 0.99,
   ncores = 1,
   method = "Clusterize",
-  meshclust_temp_dir = "tmp"
+  meshclust_temp_dir = "tmp",
+  ...
 )
 }
 \arguments{
@@ -28,6 +29,8 @@ running `which meshclust`, see also \code{\link{meshclustR}}.}
 
 \item{meshclust_temp_dir}{temporary directory for meshclust files.
 Temporary files will be removed after running the function.}
+
+\item{...}{pass on any additional strings to the meshclust commandline tool.}
 }
 \value{
 A list of clustering results, where each element in the list corresponds to a specific threshold value.
-- 
GitLab