Skip to content

Commit

Permalink
output F in joint
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Feb 15, 2024
1 parent 5e5e65f commit 9395b6f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/phaseless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ int run_phaseless_main(Options & opts)
std::unique_ptr<BigAss> genome = std::make_unique<BigAss>();
init_bigass(genome, opts);
vector<future<double>> res;
std::ofstream oanc(opts.out + ".Q");
std::ofstream op(opts.out + ".P");
Phaseless faith(opts.K, opts.C, genome->nsamples, genome->nsnps, opts.seed);
faith.setFlags(opts.ptol, opts.ftol, opts.qtol, opts.debug, opts.nQ, opts.nP, opts.nF, opts.nR);
faith.setStartPoint(opts.in_qfile, opts.in_pfile);
Expand Down Expand Up @@ -409,9 +407,16 @@ int run_phaseless_main(Options & opts)
}
}
}
std::ofstream oanc(opts.out + ".Q");
oanc << std::fixed << faith.Q.transpose().format(fmt10) << "\n";
oanc.close();
std::ofstream op(opts.out + ".P");
op << faith.P.format(fmt6) << "\n";
if(opts.oF)
{
std::ofstream of(opts.out + ".F");
for(size_t k = 0; k < faith.F.size(); k++) of << faith.F[k].format(fmt6) << "\n";
}
std::unique_ptr<Pars> par = std::make_unique<Pars>();
par->init(faith.K, faith.C, faith.M, faith.N, faith.er, faith.P, faith.Q, faith.F);
par->pos = genome->pos;
Expand Down

0 comments on commit 9395b6f

Please sign in to comment.