From b75d38fee40f0ee323e0e812c390e1ed86b79f9a Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 9 Aug 2023 14:45:43 +0200 Subject: [PATCH] Fixed argument passing (#25) --- R/greedyMix.R | 7 ++++--- R/indMixWrapper.R | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/R/greedyMix.R b/R/greedyMix.R index cbc6912..c82f7e9 100644 --- a/R/greedyMix.R +++ b/R/greedyMix.R @@ -14,8 +14,9 @@ #' greedyMix(data, "fasta") greedyMix <- function( data, format, partitionCompare = NULL, ninds = NULL, rowsFromInd = NULL, - noalle = NULL, adjprior = NULL, npops = 1L, priorTerm = NULL, - alleleCodes = NULL, inp = NULL, popnames = NULL, fixedK = FALSE, verbose = TRUE + noalle = NULL, adjprior = NULL, npops = 1L, priorTerm = NULL, counts = NULL, + sumcounts = NULL, max_iter = 100L, alleleCodes = NULL, inp = NULL, + popnames = NULL, fixedK = FALSE, verbose = FALSE ) { # Importing and handling data ================================================ data <- importFile(data, format, verbose) @@ -39,7 +40,7 @@ greedyMix <- function( # Generating partition summary =============================================== - logml_npops_partitionSummary <- indMixWrapper(c, npops, fixedK, verbose); + logml_npops_partitionSummary <- indMixWrapper(c, npops, counts, sumcounts, max_iter, fixedK, verbose); logml <- logml_npops_partitionSummary[["logml"]] npops <- logml_npops_partitionSummary[["npops"]] partitionSummary <- logml_npops_partitionSummary[["partitionSummary"]] diff --git a/R/indMixWrapper.R b/R/indMixWrapper.R index 1153c2c..60c9077 100644 --- a/R/indMixWrapper.R +++ b/R/indMixWrapper.R @@ -1,7 +1,7 @@ -indMixWrapper <- function(c, npops, fixedK = FALSE, verbose = FALSE) { +indMixWrapper <- function(c, npops, counts, sumcounts, max_iter, fixedK = FALSE, verbose = FALSE) { if (fixedK) { stop("indMix_fixK() not yet implemented.") # TODO: translate indMix_fixK.m } else { - indMix(c, npops, verbose) + indMix(c, npops, counts, sumcounts, max_iter, verbose) } }