Skip to content

Commit

Permalink
.sample loading, --ld chrX het-haploid
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchang committed Sep 22, 2023
1 parent b0d5bb7 commit 5e420bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 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.00a4.8"
static const char ver_str[] = "PLINK v2.00a4.9"
#ifdef NOLAPACK
"NL"
#elif defined(LAPACK_ILP64)
Expand Down Expand Up @@ -72,7 +72,7 @@ static const char ver_str[] = "PLINK v2.00a4.8"
#elif defined(USE_AOCL)
" AMD"
#endif
" (15 Sep 2023)";
" (22 Sep 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_import.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9437,7 +9437,8 @@ PglErr OxSampleToPsam(const char* samplename, const char* const_fid, const char*
uintptr_t* col_first_pass_remaining;
uintptr_t* col_nm;
unsigned char* col_types;
if (unlikely(bigstack_alloc_w(col_ctl, &col_first_pass_remaining) ||
// bugfix (22 Sep 2023): forgot to 0-initialize col_first_pass_remaining
if (unlikely(bigstack_calloc_w(col_ctl, &col_first_pass_remaining) ||
bigstack_calloc_w(col_ctl, &col_nm) ||
bigstack_alloc_uc(col_ct, &col_types))) {
goto OxSampleToPsam_ret_NOMEM;
Expand Down
1 change: 1 addition & 0 deletions 2.0/plink2_ld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3222,6 +3222,7 @@ PglErr LdConsole(const uintptr_t* variant_include, const ChrInfo* cip, const cha
BitvecInvmask(R_CAST(uintptr_t*, x_male_dosage_invmask), founder_dosagev_ct * kWordsPerVec, R_CAST(uintptr_t*, dosage_uhets[0]));
const uint64_t invalid_uhethet_dosageprod = DosageUnsignedNomissDotprod(dosage_uhets[0], dosage_uhets[1], founder_dosagev_ct);
unknown_hethet_d -= S_CAST(int64_t, invalid_uhethet_dosageprod) * kRecipDosageMidSq;
known_dotprod_d += u63tod(invalid_uhethet_dosageprod) * (kRecipDosageMidSq * 0.5);
}
x_male_nmajsums_d[0] = S_CAST(int64_t, x_male_nmaj_dosages[0]) * kRecipDosageMid;
x_male_nmajsums_d[1] = S_CAST(int64_t, x_male_nmaj_dosages[1]) * kRecipDosageMid;
Expand Down

0 comments on commit 5e420bb

Please sign in to comment.