Skip to content

Commit

Permalink
Merge pull request #32 from paulsengroup/feature/log-ratio
Browse files Browse the repository at this point in the history
Change how the log ratio is computed
  • Loading branch information
robomics authored Jul 3, 2024
2 parents 0126904 + cca9af9 commit bc29ebf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libnchg/nchg_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ inline auto NCHG<File>::compute(const hictk::GenomicInterval &range1,
const auto odds_ratio = compute_odds_ratio(obs, static_cast<double>(obs_sum), N1, N2);
const auto omega = intra_matrix ? compute_odds_ratio(exp, exp_sum, L1, L2) : 1;

const auto log_ratio = std::log2(odds_ratio) - std::log2(omega);
const auto log_ratio = std::log2(obs) - std::log2(exp);

if ((L1 - exp) * (L2 - exp) <= cutoff) {
return {p, exp, 1.0, log_ratio, odds_ratio, omega};
Expand Down

0 comments on commit bc29ebf

Please sign in to comment.