From 15a8c39ef19a5588597f3bce6060947be7a54420 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 15 Jan 2021 11:47:20 +0100 Subject: [PATCH] Added/removed TODOs --- R/computePopulationLogml.R | 1 + R/indMix.R | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/computePopulationLogml.R b/R/computePopulationLogml.R index bf9782d..a6cf71c 100644 --- a/R/computePopulationLogml.R +++ b/R/computePopulationLogml.R @@ -6,6 +6,7 @@ computePopulationLogml <- function(pops, adjprior, priorTerm) { z <- length(pops) popLogml <- squeeze( + # FIXME: assumes COUNTS has 3 dims. Where does this come from? sum( sum( reshape( diff --git a/R/indMix.R b/R/indMix.R index b564460..4f1d65c 100644 --- a/R/indMix.R +++ b/R/indMix.R @@ -26,7 +26,7 @@ indMix <- function(c, npops, dispText) { dispText <- 1 npopstext <- matrix() ready <- FALSE - teksti <- 'Input upper bound to the number of populations (possibly multiple values)' + teksti <- 'Input upper bound to the number of populations (possibly multiple values)' # TODO: add "likely ncol(Z) values"? while (!ready) { npopstextExtra <- inputdlg( teksti, @@ -87,11 +87,10 @@ indMix <- function(c, npops, dispText) { ) } ninds <- size(rows, 1) - - initialPartition <- admixture_initialization(initData, npops, Z) # TODO: translate - sumcounts_counts_logml = initialCounts( + initialPartition <- admixture_initialization(initData, npops, Z) + sumcounts_counts_logml <- initialCounts( initialPartition, data, npops, rows, noalle, adjprior - ) # TODO: translate + ) sumcounts <- sumcounts_counts_logml$sumcounts counts <- sumcounts_counts_logml$counts logml <- sumcounts_counts_logml$logml @@ -104,7 +103,7 @@ indMix <- function(c, npops, dispText) { COUNTS <- counts SUMCOUNTS <- sumcounts - POP_LOGML <- computePopulationLogml(1:npops, adjprior, priorTerm) # TODO: translate + POP_LOGML <- computePopulationLogml(1:npops, adjprior, priorTerm) LOGDIFF <- repmat(-Inf, c(ninds, npops)) rm(initialPartition, counts, sumcounts) @@ -564,4 +563,4 @@ indMix <- function(c, npops, dispText) { return( list(logml = logml, npops = npops, partitionSummary = partitionSummary) ) -} +} \ No newline at end of file