Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Jan 22, 2024
1 parent 8a207f7 commit 1fc0bba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/admixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ double Admixture::runOptimalWithBigAss(int ind, const std::unique_ptr<BigAss> &
get_cluster_probability(ind, nsnps, alpha, beta, genome->gls[ic], genome->R[ic], genome->PI[ic],
genome->F[ic]); // return gamma
ae.setZero(C * C, nGrids);
get_cluster_pairs_probabity(ae, genome->R[ic], genome->PI[ic]);
get_cluster_frequency(ae, genome->R[ic], genome->PI[ic]);
kapa.setZero(C * K, nGrids); // C x K x M layout
Ekg.setZero(K, nGrids);
for(s = 0; s < nGrids; s++, m++)
Expand Down Expand Up @@ -78,7 +78,7 @@ double Admixture::runNativeWithBigAss(int ind, const std::unique_ptr<BigAss> & g
beta.setZero(C * C, nGrids);
get_cluster_probability(ind, nsnps, alpha, beta, genome->gls[ic], genome->R[ic], genome->PI[ic], genome->F[ic]);
ae.setZero(C * C, nGrids);
get_cluster_pairs_probabity(ae, genome->R[ic], genome->PI[ic]);
get_cluster_frequency(ae, genome->R[ic], genome->PI[ic]);
iEkc.setZero(C * K, nGrids);
Ekg.setZero(K, nGrids);
for(s = 0; s < nGrids; s++, m++)
Expand Down
2 changes: 1 addition & 1 deletion src/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ inline auto get_cluster_probability(int ind,
return cs;
}

inline auto get_cluster_pairs_probabity(MyArr2D & ae, const MyFloat1D & R_, const MyFloat1D & PI_)
inline auto get_cluster_frequency(MyArr2D & ae, const MyFloat1D & R_, const MyFloat1D & PI_)
{
const int C2 = ae.rows();
const int M = ae.cols();
Expand Down
2 changes: 1 addition & 1 deletion src/parse-phaseless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ List parse_impute_par(std::string filename, int ic = -1)
get_cluster_probability(ind, iM, alpha, beta, genome->gls[ic], genome->R[ic], genome->PI[ic], genome->F[ic]);
if(!((1 - (alpha * beta).colwise().sum()).abs() < 1e-6).all()) cao.error("gamma sum is not 1.0!\n");
ae.setZero(genome->C * genome->C, nGrids);
get_cluster_pairs_probabity(ae, genome->R[ic], genome->PI[ic]);
get_cluster_frequency(ae, genome->R[ic], genome->PI[ic]);
alphaI[c] = alpha;
betaI[c] = beta;
aeI[c] = ae;
Expand Down

0 comments on commit 1fc0bba

Please sign in to comment.