Skip to content

Commit

Permalink
forgot to backport no-firth bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchang committed Aug 21, 2024
1 parent 0cbe314 commit 19ee9d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 2.0/plink2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
namespace plink2 {
#endif

static const char ver_str[] = "PLINK v2.00a5.13"
static const char ver_str[] = "PLINK v2.00a5.14"
#ifdef NOLAPACK
"NL"
#elif defined(LAPACK_ILP64)
Expand Down Expand Up @@ -72,7 +72,7 @@ static const char ver_str[] = "PLINK v2.00a5.13"
#elif defined(USE_AOCL)
" AMD"
#endif
" (18 Aug 2024)";
" (20 Aug 2024)";
static const char ver_str2[] =
// include leading space if day < 10, so character length stays the same
""
Expand Down
8 changes: 6 additions & 2 deletions 2.0/plink2_glm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1648,11 +1648,13 @@ BoolErr GlmDetermineCovars(const uintptr_t* pheno_cc, const uintptr_t* initial_c
goto GlmDetermineCovars_ret_NOMEM;
}
if (!is_always_firth) {
covar_uidx_base = 0;
cur_bits = covar_include[0];
if (!is_sometimes_firth) {
do {
prev_sample_ct = sample_ct;
// bugfix (20 Aug 2024): these need to be reinitialized when the
// while condition is actually true
covar_uidx_base = 0;
cur_bits = covar_include[0];
for (uint32_t covar_idx = 0; covar_idx != covar_ct; ++covar_idx) {
const uintptr_t covar_uidx = BitIter1(covar_include, &covar_uidx_base, &cur_bits);
if (CheckForAndHandleSeparatedCovar(pheno_cc, covar_cols, raw_sample_ctl, covar_uidx, cur_sample_include, covar_include, &sample_ct, cat_covar_wkspace)) {
Expand All @@ -1663,6 +1665,8 @@ BoolErr GlmDetermineCovars(const uintptr_t* pheno_cc, const uintptr_t* initial_c
covar_ct = PopcountWords(covar_include, raw_covar_ctl);
} while (sample_ct < prev_sample_ct);
} else {
covar_uidx_base = 0;
cur_bits = covar_include[0];
for (uint32_t covar_idx = 0; covar_idx != covar_ct; ++covar_idx) {
const uintptr_t covar_uidx = BitIter1(covar_include, &covar_uidx_base, &cur_bits);
if (CheckForSeparatedCovar(pheno_cc, cur_sample_include, &(covar_cols[covar_uidx]), sample_ct, cat_covar_wkspace)) {
Expand Down

0 comments on commit 19ee9d3

Please sign in to comment.