Skip to content

Commit

Permalink
fix in calcSumZ
Browse files Browse the repository at this point in the history
  • Loading branch information
chung@molgen.mpg.de committed Jan 20, 2016
1 parent 1fae975 commit 0a6bd4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rmn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void calcSumZ(const arma::vec& z, const arma::vec& empty, const arma::uvec& s, a

for (i = 0; i < (w - 1) && i < L; i++){
sumZ(w, s(i)) += empty(i);
sumZ(arma::span(w - 1 - i, w - 1), s(i)) = z(arma::span(0, i));
sumZ(arma::span(w - 1 - i, w - 1), s(i)) += z(arma::span(0, i));
}

}
Expand Down Expand Up @@ -232,14 +232,14 @@ void estimate(
calcSumZ(z[iContig], empty[iContig], s[iContig], sumZ);
}


std::cout << sumZ << std::endl;
for (iExperiment = 0; iExperiment < nExperiment; iExperiment++){
sumU.zeros();
for (iContig = 0; iContig < nContig; iContig++){
calcSumU(meanU[iContig].slice(iExperiment), s[iContig], sumU);
}
mu.slice(iExperiment) = sumU / sumZ;
std::cout << mu.slice(iExperiment) << std::endl;
std::cout << sumU << std::endl;
}
// calculate lnEmPN
// re-estimate z
Expand Down

0 comments on commit 0a6bd4f

Please sign in to comment.