Skip to content

Commit 52bc666

Browse files
src/radmeth/radmeth.cpp: fixing a bug in which the estimated values for p were used even if the estimation was not done due to insufficient variance or coverage for the given site. This is fixed by just assignign 0 values for such sites after checking that the estimates for p are non-empty
1 parent 5c4a3c3 commit 52bc666

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/radmeth/radmeth.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ that the design matrix and the proportion table are correctly formatted.
305305

306306
const int n_param_bytes = [&] {
307307
std::int32_t n_bytes = 0;
308+
if (p_estim_alt.empty())
309+
p_estim_alt.resize(n_groups, 0.0);
308310
for (auto g_idx = 0u; g_idx < n_groups; ++g_idx) {
309311
const int n = std::sprintf(cursor, "\t%f", p_estim_alt[g_idx]);
310312
cursor += n;

0 commit comments

Comments
 (0)