Skip to content

Commit

Permalink
fix --recover-var-ids line indexes for .bim
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchang committed Aug 14, 2023
1 parent 5ec081d commit 27aa941
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 2.0/plink2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static const char ver_str[] = "PLINK v2.00a5"
#elif defined(USE_AOCL)
" AMD"
#endif
" (13 Aug 2023)";
" (14 Aug 2023)";
static const char ver_str2[] =
// include leading space if day < 10, so character length stays the same
""
Expand Down
3 changes: 2 additions & 1 deletion 2.0/plink2_misc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ PglErr RecoverVarIds(const char* fname, const uintptr_t* variant_include, const
}
strict_allele_order = (flags / kfRecoverVarIdsStrictBimOrder) & 1;
line_iter = line_start;
--line_idx;
}
// Only nonzero if we're actually replacing existing IDs with the missing
// ID in the conflict case.
Expand All @@ -802,7 +803,7 @@ PglErr RecoverVarIds(const char* fname, const uintptr_t* variant_include, const
uintptr_t record_uidx = ~k0LU; // deliberate overflow
uint32_t cur_allele_ct = 2;
for (; TextGetUnsafe2(&txs, &line_iter); line_iter = AdvPastDelim(line_iter, '\n')) {
if (!(line_idx % 1000000)) {
if ((!(line_idx % 1000000)) && line_idx) {
printf("\r--recover-var-ids: %" PRIuPTR "m lines scanned.", line_idx / 1000000);
fflush(stdout);
}
Expand Down

0 comments on commit 27aa941

Please sign in to comment.