From f405cabeb211556416038aec39c46d8d0193d8af Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Mon, 9 Nov 2020 15:22:22 +0100 Subject: [PATCH] Removed commented out code --- R/indMix.R | 95 ------------------------------------------------------ 1 file changed, 95 deletions(-) diff --git a/R/indMix.R b/R/indMix.R index a070ce5..6b11bf9 100644 --- a/R/indMix.R +++ b/R/indMix.R @@ -565,98 +565,3 @@ indMix <- function(c, npops, dispText) { list(logml = logml, npops = npops, partitionSummary = partitionSummary) ) } - -# %----------------------------------------------------------------------- - - -# function [sumcounts, counts, logml] = ... -# initialPopCounts(data, npops, rows, noalle, adjprior) - -# nloci=size(data,2); -# counts = zeros(max(noalle),nloci,npops); -# sumcounts = zeros(npops,nloci); - -# for i=1:npops -# for j=1:nloci -# i_rivit = rows(i,1):rows(i,2); -# havainnotLokuksessa = find(data(i_rivit,j)>=0); -# sumcounts(i,j) = length(havainnotLokuksessa); -# for k=1:noalle(j) -# alleleCode = k; -# N_ijk = length(find(data(i_rivit,j)==alleleCode)); -# counts(k,j,i) = N_ijk; -# end -# end -# end - -# logml = laskeLoggis(counts, sumcounts, adjprior); - -# %----------------------------------------------------------------------- - - -# function diffInCounts = computeDiffInCounts(rows, max_noalle, nloci, data) -# % Muodostaa max_noalle*nloci taulukon, jossa on niiden alleelien -# % lukum��r�t (vastaavasti kuin COUNTS:issa), jotka ovat data:n -# % riveill� rows. rows pit�� olla vaakavektori. - -# diffInCounts = zeros(max_noalle, nloci); -# for i=rows -# row = data(i,:); -# notEmpty = find(row>=0); - -# if length(notEmpty)>0 -# diffInCounts(row(notEmpty) + (notEmpty-1)*max_noalle) = ... -# diffInCounts(row(notEmpty) + (notEmpty-1)*max_noalle) + 1; -# end -# end - -# %--------------------------------------------------------- - -# function T = cluster_own(Z,nclust) -# true=logical(1); -# false=logical(0); -# maxclust = nclust; -# % Start of algorithm -# m = size(Z,1)+1; -# T = zeros(m,1); -# % maximum number of clusters based on inconsistency -# if m <= maxclust -# T = (1:m)'; -# elseif maxclust==1 -# T = ones(m,1); -# else -# clsnum = 1; -# for k = (m-maxclust+1):(m-1) -# i = Z(k,1); % left tree -# if i <= m % original node, no leafs -# T(i) = clsnum; -# clsnum = clsnum + 1; -# elseif i < (2*m-maxclust+1) % created before cutoff, search down the tree -# T = clusternum(Z, T, i-m, clsnum); -# clsnum = clsnum + 1; -# end -# i = Z(k,2); % right tree -# if i <= m % original node, no leafs -# T(i) = clsnum; -# clsnum = clsnum + 1; -# elseif i < (2*m-maxclust+1) % created before cutoff, search down the tree -# T = clusternum(Z, T, i-m, clsnum); -# clsnum = clsnum + 1; -# end -# end -# end - -# function T = clusternum(X, T, k, c) -# m = size(X,1)+1; -# while(~isempty(k)) -# % Get the children of nodes at this level -# children = X(k,1:2); -# children = children(:); - -# % Assign this node number to leaf children -# t = (children<=m); -# T(children(t)) = c; - -# % Move to next level -# k = children(~t) - m; -# end