Added/removed TODOs

This commit is contained in:
Waldir Leoncio 2021-01-15 11:47:20 +01:00
parent 68ad663ce1
commit 15a8c39ef1
2 changed files with 7 additions and 7 deletions

View file

@ -6,6 +6,7 @@ computePopulationLogml <- function(pops, adjprior, priorTerm) {
z <- length(pops) z <- length(pops)
popLogml <- squeeze( popLogml <- squeeze(
# FIXME: assumes COUNTS has 3 dims. Where does this come from?
sum( sum(
sum( sum(
reshape( reshape(

View file

@ -26,7 +26,7 @@ indMix <- function(c, npops, dispText) {
dispText <- 1 dispText <- 1
npopstext <- matrix() npopstext <- matrix()
ready <- FALSE 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) { while (!ready) {
npopstextExtra <- inputdlg( npopstextExtra <- inputdlg(
teksti, teksti,
@ -87,11 +87,10 @@ indMix <- function(c, npops, dispText) {
) )
} }
ninds <- size(rows, 1) ninds <- size(rows, 1)
initialPartition <- admixture_initialization(initData, npops, Z)
initialPartition <- admixture_initialization(initData, npops, Z) # TODO: translate sumcounts_counts_logml <- initialCounts(
sumcounts_counts_logml = initialCounts(
initialPartition, data, npops, rows, noalle, adjprior initialPartition, data, npops, rows, noalle, adjprior
) # TODO: translate )
sumcounts <- sumcounts_counts_logml$sumcounts sumcounts <- sumcounts_counts_logml$sumcounts
counts <- sumcounts_counts_logml$counts counts <- sumcounts_counts_logml$counts
logml <- sumcounts_counts_logml$logml logml <- sumcounts_counts_logml$logml
@ -104,7 +103,7 @@ indMix <- function(c, npops, dispText) {
COUNTS <- counts COUNTS <- counts
SUMCOUNTS <- sumcounts SUMCOUNTS <- sumcounts
POP_LOGML <- computePopulationLogml(1:npops, adjprior, priorTerm) # TODO: translate POP_LOGML <- computePopulationLogml(1:npops, adjprior, priorTerm)
LOGDIFF <- repmat(-Inf, c(ninds, npops)) LOGDIFF <- repmat(-Inf, c(ninds, npops))
rm(initialPartition, counts, sumcounts) rm(initialPartition, counts, sumcounts)
@ -564,4 +563,4 @@ indMix <- function(c, npops, dispText) {
return( return(
list(logml = logml, npops = npops, partitionSummary = partitionSummary) list(logml = logml, npops = npops, partitionSummary = partitionSummary)
) )
} }