Skip to content
Commits on Source (2)
......@@ -93,7 +93,7 @@
 
static const char ver_str[] =
#ifdef STABLE_BUILD
"PLINK v1.90b5.3"
"PLINK v1.90b5.4"
#else
"PLINK v1.90p"
#endif
......@@ -105,7 +105,7 @@ static const char ver_str[] =
#else
" 32-bit"
#endif
" (21 Feb 2018)";
" (10 Apr 2018)";
static const char ver_str2[] =
// include leading space if day < 10, so character length stays the same
""
......@@ -12801,7 +12801,8 @@ int32_t main(int32_t argc, char** argv) {
if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 1)) {
goto main_ret_INVALID_CMDLINE_2A;
}
retval = alloc_fname(&cluster.zerofname, argv[cur_arg + uii], argptr, 0);
// bugfix (9 Apr 2018): had wrong array index
retval = alloc_fname(&cluster.zerofname, argv[cur_arg + 1], argptr, 0);
if (retval) {
goto main_ret_1;
}
......
......@@ -532,7 +532,9 @@ int32_t multcomp(char* outname, char* outname_end, uint32_t* marker_uidxs, uintp
adjust_print_log10(pv_gc[cur_idx], output_min_p, output_min_p_str, output_min_p_strlen, &bufptr);
}
if (qq_plot) {
bufptr = dtoa_g_wxp4x((((double)((int32_t)cur_idx)) + 0.5) * dzz, 10, ' ', bufptr);
// quasi-bugfix (23 Mar 2018): this should be logscale, both for
// consistency with plink 1.07 and because it makes more sense
bufptr = dtoa_g_wxp4x(-log10((((double)((int32_t)cur_idx)) + 0.5) * dzz), 10, ' ', bufptr);
}
adjust_print_log10(bonf, output_min_p, output_min_p_str, output_min_p_strlen, &bufptr);
adjust_print_log10(pv_holm, output_min_p, output_min_p_str, output_min_p_strlen, &bufptr);
......
......@@ -4621,11 +4621,11 @@ int32_t oxford_to_bed(char* genname, char* samplename, char* outname, char* outn
const uint32_t layout = (uii >> 2) & 15;
const uint32_t compression_mode = uii & 3;
if ((layout == 2) && (compression_mode != 3)) {
LOGERRPRINTF("Error: BGEN v1.%c input requires PLINK 2.0 (under development as of this\nwriting). Use gen-convert to downcode to BGEN v1.1 if you want to process this\ndata with PLINK 1.9.\n", (compression_mode == 2)? '3' : '2');
LOGERRPRINTF("Error: BGEN v1.%c input requires PLINK 2.0 (under development as of this\nwriting). Use qctool2 or bgenix to downcode to BGEN v1.1 if you want to\nprocess this data with PLINK 1.9.\n", (compression_mode == 2)? '3' : '2');
} else if (layout > 2) {
logerrprint("Error: Unrecognized BGEN version. Use gen-convert or a similar tool to\ndowncode to BGEN v1.1 if you want to process this data with PLINK 1.9.\n");
logerrprint("Error: Unrecognized BGEN version. Use bgenix or a similar tool to downcode to\nBGEN v1.1 if you want to process this data with PLINK 1.9.\n");
} else {
logerrprint("Error: Unrecognized flags in .bgen header. (PLINK 1.9 only supports\nBGEN v1.0 and v1.1.)\n");
logerrprint("Error: Unrecognized flags in .bgen header. (PLINK 1.9 only supports BGEN v1.0\nand v1.1.)\n");
}
goto oxford_to_bed_ret_INVALID_FORMAT;
}
......
......@@ -509,12 +509,14 @@ uint32_t erase_mendel_errors(uintptr_t unfiltered_sample_ct, uintptr_t* loadbuf,
unn = uii / BITCT2;
uoo = ujj / BITCT2;
upp = ukk / BITCT2;
uii = 2 * (uii % BITCT2);
const uint32_t uqq = 2 * (uii % BITCT2);
ujj = 2 * (ujj % BITCT2);
ukk = 2 * (ukk % BITCT2);
ulii = (workbuf[unn] >> uii) & 3;
ulii = (workbuf[unn] >> uqq) & 3;
uljj = ((workbuf[uoo] >> ujj) & 3) | (((workbuf[upp] >> ukk) & 3) << 2);
if (ulii != 1) {
// bugfix (10 Apr 2018): is_set(sex_male, uii) didn't work since we had
// replaced the value with twice the low-order bits
if ((!is_x) || (!is_set(sex_male, uii))) {
umm = mendel_error_table[ulii | (uljj << 2)];
} else {
......@@ -522,7 +524,7 @@ uint32_t erase_mendel_errors(uintptr_t unfiltered_sample_ct, uintptr_t* loadbuf,
}
if (umm) {
ulii = loadbuf[unn];
uljj = ONELU << uii;
uljj = ONELU << uqq;
loadbuf[unn] = (ulii & (~(3 * uljj))) | uljj;
if (umm & 0x100) {
ulii = loadbuf[uoo];
......@@ -539,9 +541,9 @@ uint32_t erase_mendel_errors(uintptr_t unfiltered_sample_ct, uintptr_t* loadbuf,
} else if (!uljj) {
// both parents are homozygous for the same allele, so child genotype
// is "known" for the purpose of checking grandchild genotypes
workbuf[unn] &= ~(ONELU << uii);
workbuf[unn] &= ~(ONELU << uqq);
} else if (uljj == 15) {
workbuf[unn] |= (2 * ONELU) << uii;
workbuf[unn] |= (2 * ONELU) << uqq;
}
// no need to fill "known" heterozygous genotype, since that's treated
// the same way as a missing genotype
......
......@@ -1485,7 +1485,8 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" --missing-phenotype [v] : Set missing phenotype value (normally -9).\n"
" --1 : Expect case/control phenotypes to be coded as\n"
" 0 = control, 1 = case, instead of the usual\n"
" 0 = missing, 1 = control, 2 = case.\n"
" 0 = missing, 1 = control, 2 = case. This also\n"
" forces phenotypes to be interpreted as case/ctrl.\n"
);
help_print("make-pheno\tpheno", &help_ctrl, 0,
" --make-pheno [fn] [val] : Define a new case/control phenotype. If the val\n"
......