Skip to content

Commit

Permalink
update r package
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Jan 25, 2024
1 parent 462d0e1 commit c043e96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/parse-phaseless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,14 @@ List parse_impute_opt(std::string filename) {
Named("chunksize") = genome->chunksize,
Named("nsamples") = genome->nsamples,
Named("nsnps") = genome->nsnps,
Named("nchunks") = genome->nchunks);
Named("nchunks") = genome->nchunks,
Named("gls") = genome->gls,
Named("pos") = genome->pos,
Named("PI") = genome->PI,
Named("F") = genome->F,
Named("R") = genome->R,
Named("CF") = genome->GammaAE
);

}

Expand Down
2 changes: 1 addition & 1 deletion tests/test-phaseless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ TEST_CASE("phaseless naive vs dump dataset 1", "[test-phaseless]")
for(int i = 0; i < genome->nsamples; i++) llike2 += admixer2.runNativeWithBigAss(i, genome);
admixer2.updateIteration();
cerr << std::setprecision(6) << "llike2: " << llike2 << "\tllike1: " << llike1 << "\n";
REQUIRE(abs(llike1 - llike2) < 1e-10);
REQUIRE(abs(llike1 - llike2) < 1e-9);
}
REQUIRE(((admixer1.Q - admixer2.Q).abs() < 1e-6).all());
}
Expand Down

0 comments on commit c043e96

Please sign in to comment.