Skip to content

Commit

Permalink
Fixed argument passing (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Aug 9, 2023
1 parent 3d3131b commit b75d38f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions R/greedyMix.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"]]
Expand Down
4 changes: 2 additions & 2 deletions R/indMixWrapper.R
Original file line number Diff line number Diff line change
@@ -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)
}
}

0 comments on commit b75d38f

Please sign in to comment.