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 54279d1 commit 8a207f7
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 @@ -23,7 +23,7 @@ double Admixture::runOptimalWithBigAss(int ind, const std::unique_ptr<BigAss> &
const int nGrids = genome->B > 1 ? (nsnps + genome->B - 1) / genome->B : nsnps;
alpha.setZero(C * C, nGrids);
beta.setZero(C * C, nGrids);
get_cluster_likelihood(ind, nsnps, alpha, beta, genome->gls[ic], genome->R[ic], genome->PI[ic],
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]);
Expand Down Expand Up @@ -76,7 +76,7 @@ double Admixture::runNativeWithBigAss(int ind, const std::unique_ptr<BigAss> & g
const int nGrids = genome->B > 1 ? (nsnps + genome->B - 1) / genome->B : nsnps;
alpha.setZero(C * C, nGrids);
beta.setZero(C * C, nGrids);
get_cluster_likelihood(ind, nsnps, alpha, beta, genome->gls[ic], genome->R[ic], genome->PI[ic], genome->F[ic]);
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]);
iEkc.setZero(C * K, nGrids);
Expand Down
2 changes: 1 addition & 1 deletion src/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ inline auto forward_backwards_diploid(MyArr2D & alpha,
return cs;
}

inline auto get_cluster_likelihood(int ind,
inline auto get_cluster_probability(int ind,
const int M,
MyArr2D & alpha,
MyArr2D & beta,
Expand Down
2 changes: 1 addition & 1 deletion src/parse-phaseless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ List parse_impute_par(std::string filename, int ic = -1)
const int nGrids = genome->B > 1 ? (iM + genome->B - 1) / genome->B : iM;
alpha.setZero(genome->C * genome->C, nGrids);
beta.setZero(genome->C * genome->C, nGrids);
get_cluster_likelihood(ind, iM, alpha, beta, genome->gls[ic], genome->R[ic], genome->PI[ic], genome->F[ic]);
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]);
Expand Down

0 comments on commit 8a207f7

Please sign in to comment.