[med-svn] [Git][med-team/plink1-9][upstream] New upstream version 1.90~b6.10-190617
Dylan Aïssi
gitlab at salsa.debian.org
Fri Sep 13 21:30:21 BST 2019
Dylan Aïssi pushed to branch upstream at Debian Med / plink1.9
Commits:
145e0aba by Dylan Aïssi at 2019-09-13T20:15:09Z
New upstream version 1.90~b6.10-190617
- - - - -
7 changed files:
- plink.c
- plink_calc.c
- plink_calc.h
- plink_common.h
- plink_help.c
- plink_misc.c
- prettify.c
Changes:
=====================================
plink.c
=====================================
@@ -93,7 +93,7 @@
static const char ver_str[] =
#ifdef STABLE_BUILD
- "PLINK v1.90b6.9"
+ "PLINK v1.90b6.10"
#else
"PLINK v1.90p"
#endif
@@ -105,12 +105,12 @@ static const char ver_str[] =
#else
" 32-bit"
#endif
- " (4 Mar 2019)";
+ " (17 Jun 2019)";
static const char ver_str2[] =
// include leading space if day < 10, so character length stays the same
- " "
+ ""
#ifdef STABLE_BUILD
- " " // (don't want this when version number has two trailing digits)
+ "" // (don't want this when version number has two trailing digits)
#else
" " // (don't want this when version number has e.g. "b3" before "p")
#endif
@@ -136,18 +136,18 @@ static const char ver_str2[] =
#endif
#endif
"\n";
-static const char errstr_append[] = "For more information, try '" PROG_NAME_STR " --help <flag name>' or '" PROG_NAME_STR " --help | more'.\n";
+static const char errstr_append[] = "For more information, try \"" PROG_NAME_STR " --help <flag name>\" or \"" PROG_NAME_STR " --help | more\".\n";
#ifdef STABLE_BUILD
#ifndef NOLAPACK
-static const char notestr_null_calc2[] = "Commands include --make-bed, --recode, --flip-scan, --merge-list,\n--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,\n--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,\n--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,\n--rel-cutoff, --cluster, --pca, --neighbour, --ibs-test, --regress-distance,\n--model, --bd, --gxe, --logistic, --dosage, --lasso, --test-missing,\n--make-perm-pheno, --tdt, --qfam, --annotate, --clump, --gene-report,\n--meta-analysis, --epistasis, --fast-epistasis, and --score.\n\n'" PROG_NAME_STR " --help | more' describes all functions (warning: long).\n";
+static const char notestr_null_calc2[] = "Commands include --make-bed, --recode, --flip-scan, --merge-list,\n--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,\n--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,\n--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,\n--rel-cutoff, --cluster, --pca, --neighbour, --ibs-test, --regress-distance,\n--model, --bd, --gxe, --logistic, --dosage, --lasso, --test-missing,\n--make-perm-pheno, --tdt, --qfam, --annotate, --clump, --gene-report,\n--meta-analysis, --epistasis, --fast-epistasis, and --score.\n\n\"" PROG_NAME_STR " --help | more\" describes all functions (warning: long).\n";
#else
-static const char notestr_null_calc2[] = "Commands include --make-bed, --recode, --flip-scan, --merge-list,\n--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,\n--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,\n--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,\n--rel-cutoff, --cluster, --neighbour, --ibs-test, --regress-distance, --model,\n--bd, --gxe, --logistic, --dosage, --lasso, --test-missing, --make-perm-pheno,\n--tdt, --qfam, --annotate, --clump, --gene-report, --meta-analysis,\n--epistasis, --fast-epistasis, and --score.\n\n'" PROG_NAME_STR " --help | more' describes all functions (warning: long).\n";
+static const char notestr_null_calc2[] = "Commands include --make-bed, --recode, --flip-scan, --merge-list,\n--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,\n--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,\n--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,\n--rel-cutoff, --cluster, --neighbour, --ibs-test, --regress-distance, --model,\n--bd, --gxe, --logistic, --dosage, --lasso, --test-missing, --make-perm-pheno,\n--tdt, --qfam, --annotate, --clump, --gene-report, --meta-analysis,\n--epistasis, --fast-epistasis, and --score.\n\n\"" PROG_NAME_STR " --help | more\" describes all functions (warning: long).\n";
#endif
#else
#ifndef NOLAPACK
-static const char notestr_null_calc2[] = "Commands include --make-bed, --recode, --flip-scan, --merge-list,\n--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,\n--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,\n--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,\n--rel-cutoff, --cluster, --pca, --neighbour, --ibs-test, --regress-distance,\n--model, --bd, --gxe, --logistic, --dosage, --lasso, --test-missing,\n--make-perm-pheno, --unrelated-heritability, --tdt, --dfam, --qfam, --tucc,\n--annotate, --clump, --gene-report, --meta-analysis, --epistasis,\n--fast-epistasis, and --score.\n\n'" PROG_NAME_STR " --help | more' describes all functions (warning: long).\n";
+static const char notestr_null_calc2[] = "Commands include --make-bed, --recode, --flip-scan, --merge-list,\n--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,\n--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,\n--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,\n--rel-cutoff, --cluster, --pca, --neighbour, --ibs-test, --regress-distance,\n--model, --bd, --gxe, --logistic, --dosage, --lasso, --test-missing,\n--make-perm-pheno, --unrelated-heritability, --tdt, --dfam, --qfam, --tucc,\n--annotate, --clump, --gene-report, --meta-analysis, --epistasis,\n--fast-epistasis, and --score.\n\n\"" PROG_NAME_STR " --help | more\" describes all functions (warning: long).\n";
#else
-static const char notestr_null_calc2[] = "Commands include --make-bed, --recode, --flip-scan, --merge-list,\n--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,\n--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,\n--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,\n--rel-cutoff, --cluster, --neighbour, --ibs-test, --regress-distance, --model,\n--bd, --gxe, --logistic, --dosage, --lasso, --test-missing, --make-perm-pheno,\n--tdt, --dfam, --qfam, --tucc, --annotate, --clump, --gene-report,\n--meta-analysis, --epistasis, --fast-epistasis, and --score.\n\n'" PROG_NAME_STR " --help | more' describes all functions (warning: long).\n";
+static const char notestr_null_calc2[] = "Commands include --make-bed, --recode, --flip-scan, --merge-list,\n--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,\n--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,\n--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,\n--rel-cutoff, --cluster, --neighbour, --ibs-test, --regress-distance, --model,\n--bd, --gxe, --logistic, --dosage, --lasso, --test-missing, --make-perm-pheno,\n--tdt, --dfam, --qfam, --tucc, --annotate, --clump, --gene-report,\n--meta-analysis, --epistasis, --fast-epistasis, and --score.\n\n\"" PROG_NAME_STR " --help | more\" describes all functions (warning: long).\n";
#endif
#endif
@@ -294,7 +294,7 @@ static inline int32_t bed_suffix_conflict(uint64_t calculation_type, uint32_t re
}
static inline uint32_t are_marker_pos_needed(uint64_t calculation_type, uint64_t misc_flags, char* cm_map_fname, char* set_fname, uint32_t min_bp_space, uint32_t genome_skip_write, uint32_t ld_modifier, uint32_t epi_modifier, uint32_t cluster_modifier) {
- return (calculation_type & (CALC_MAKE_BED | CALC_MAKE_BIM | CALC_RECODE | CALC_GENOME | CALC_HOMOZYG | CALC_LD_PRUNE | CALC_REGRESS_PCS | CALC_MODEL | CALC_GLM | CALC_CLUMP | CALC_BLOCKS | CALC_FLIPSCAN | CALC_TDT | CALC_QFAM | CALC_FST | CALC_SHOW_TAGS | CALC_DUPVAR | CALC_RPLUGIN | CALC_TUCC)) || (misc_flags & (MISC_EXTRACT_RANGE | MISC_EXCLUDE_RANGE)) || cm_map_fname || set_fname || min_bp_space || genome_skip_write || ((calculation_type & CALC_LD) && (!(ld_modifier & LD_MATRIX_SHAPEMASK))) || ((calculation_type & CALC_EPI) && (epi_modifier & EPI_FAST_CASE_ONLY)) || ((calculation_type & CALC_CMH) && (!(cluster_modifier & CLUSTER_CMH2)));
+ return (calculation_type & (CALC_MAKE_BED | CALC_MAKE_BIM | CALC_RECODE | CALC_GENOME | CALC_HOMOZYG | CALC_LD_PRUNE | CALC_MODEL | CALC_GLM | CALC_CLUMP | CALC_BLOCKS | CALC_FLIPSCAN | CALC_TDT | CALC_QFAM | CALC_FST | CALC_SHOW_TAGS | CALC_DUPVAR | CALC_RPLUGIN | CALC_TUCC)) || (misc_flags & (MISC_EXTRACT_RANGE | MISC_EXCLUDE_RANGE)) || cm_map_fname || set_fname || min_bp_space || genome_skip_write || ((calculation_type & CALC_LD) && (!(ld_modifier & LD_MATRIX_SHAPEMASK))) || ((calculation_type & CALC_EPI) && (epi_modifier & EPI_FAST_CASE_ONLY)) || ((calculation_type & CALC_CMH) && (!(cluster_modifier & CLUSTER_CMH2)));
}
static inline uint32_t are_marker_cms_needed(uint64_t calculation_type, char* cm_map_fname, Two_col_params* update_cm, Ld_info* ldip) {
@@ -312,7 +312,7 @@ static inline uint32_t are_marker_cms_needed(uint64_t calculation_type, char* cm
}
static inline uint32_t are_marker_alleles_needed(uint64_t calculation_type, char* freqname, Homozyg_info* homozyg_ptr, Two_col_params* a1alleles, Two_col_params* a2alleles, uint32_t ld_modifier, uint32_t snps_only, uint32_t clump_modifier, uint32_t cluster_modifier, uint32_t rel_modifier) {
- return (freqname || (calculation_type & (CALC_FREQ | CALC_HARDY | CALC_MAKE_BED | CALC_MAKE_BIM | CALC_RECODE | CALC_REGRESS_PCS | CALC_MODEL | CALC_GLM | CALC_LASSO | CALC_LIST_23_INDELS | CALC_EPI | CALC_TESTMISHAP | CALC_SCORE | CALC_MENDEL | CALC_TDT | CALC_FLIPSCAN | CALC_QFAM | CALC_HOMOG | CALC_DUPVAR | CALC_RPLUGIN | CALC_DFAM | CALC_TUCC)) || ((calculation_type & CALC_HOMOZYG) && (homozyg_ptr->modifier & HOMOZYG_GROUP_VERBOSE)) || ((calculation_type & CALC_LD) && (ld_modifier & LD_INPHASE)) || ((calculation_type & CALC_PCA) && (rel_modifier & REL_PCA_VAR_WTS)) || ((calculation_type & CALC_CMH) && (!(cluster_modifier & CLUSTER_CMH2))) || a1alleles || a2alleles || snps_only || (clump_modifier & (CLUMP_VERBOSE | CLUMP_BEST)));
+ return (freqname || (calculation_type & (CALC_FREQ | CALC_HARDY | CALC_MAKE_BED | CALC_MAKE_BIM | CALC_RECODE | CALC_MODEL | CALC_GLM | CALC_LASSO | CALC_LIST_23_INDELS | CALC_EPI | CALC_TESTMISHAP | CALC_SCORE | CALC_MENDEL | CALC_TDT | CALC_FLIPSCAN | CALC_QFAM | CALC_HOMOG | CALC_DUPVAR | CALC_RPLUGIN | CALC_DFAM | CALC_TUCC)) || ((calculation_type & CALC_HOMOZYG) && (homozyg_ptr->modifier & HOMOZYG_GROUP_VERBOSE)) || ((calculation_type & CALC_LD) && (ld_modifier & LD_INPHASE)) || ((calculation_type & CALC_PCA) && (rel_modifier & REL_PCA_VAR_WTS)) || ((calculation_type & CALC_CMH) && (!(cluster_modifier & CLUSTER_CMH2))) || a1alleles || a2alleles || snps_only || (clump_modifier & (CLUMP_VERBOSE | CLUMP_BEST)));
}
static inline int32_t relationship_or_ibc_req(uint64_t calculation_type) {
@@ -689,11 +689,6 @@ int32_t plink(char* outname, char* outname_end, char* bedname, char* bimname, ch
}
if (pheno_c) {
- /*
- if (calculation_type & (CALC_REGRESS_PCS | CALC_REGRESS_PCS_DISTANCE)) {
- sprintf(g_logbuf, "Error: --regress-pcs%s requires a scalar phenotype.\n", (calculation_type & CALC_REGRESS_PCS_DISTANCE)? "-distance" : "");
- goto plink_ret_INVALID_CMDLINE_2;
- */
if (calculation_type & (CALC_REGRESS_REL | CALC_REGRESS_DISTANCE | CALC_UNRELATED_HERITABILITY | CALC_GXE)) {
if (calculation_type & CALC_REGRESS_REL) {
logerrprint("Error: --regress-rel calculation requires a scalar phenotype.\n");
@@ -729,10 +724,10 @@ int32_t plink(char* outname, char* outname_end, char* bedname, char* bimname, ch
logerrprint("Error: --recode HV{-1chr} requires a case/control phenotype.\n");
goto plink_ret_INVALID_CMDLINE;
} else if ((calculation_type & CALC_FST) && (misc_flags & MISC_FST_CC)) {
- logerrprint("Error: '--fst case-control' requires a case/control phenotype.\n");
+ logerrprint("Error: \"--fst case-control\" requires a case/control phenotype.\n");
goto plink_ret_INVALID_CMDLINE;
} else if ((calculation_type & CALC_FREQ) && (misc_flags & MISC_FREQ_CC)) {
- logerrprint("Error: '--freq case-control' requires a case/control phenotype.\n");
+ logerrprint("Error: \"--freq case-control\" requires a case/control phenotype.\n");
goto plink_ret_INVALID_CMDLINE;
}
}
@@ -850,7 +845,7 @@ int32_t plink(char* outname, char* outname_end, char* bedname, char* bimname, ch
}
} else {
if (map_is_unsorted & UNSORTED_BP) {
- logerrprint("Error: '--extract range' requires a sorted .bim. Retry this command after\nusing --make-bed to sort your data.\n");
+ logerrprint("Error: \"--extract range\" requires a sorted .bim. Retry this command after\nusing --make-bed to sort your data.\n");
goto plink_ret_INVALID_CMDLINE;
}
retval = extract_exclude_range(extractname, marker_pos, unfiltered_marker_ct, marker_exclude, &marker_exclude_ct, 0, allow_no_variants, chrom_info_ptr);
@@ -869,7 +864,7 @@ int32_t plink(char* outname, char* outname_end, char* bedname, char* bimname, ch
}
} else {
if (map_is_unsorted & UNSORTED_BP) {
- logerrprint("Error: '--exclude range' requires a sorted .bim. Retry this command after\nusing --make-bed to sort your data.\n");
+ logerrprint("Error: \"--exclude range\" requires a sorted .bim. Retry this command after\nusing --make-bed to sort your data.\n");
goto plink_ret_INVALID_CMDLINE;
}
retval = extract_exclude_range(excludename, marker_pos, unfiltered_marker_ct, marker_exclude, &marker_exclude_ct, 1, allow_no_variants, chrom_info_ptr);
@@ -1741,15 +1736,6 @@ int32_t plink(char* outname, char* outname_end, char* bedname, char* bimname, ch
}
}
- /*
- if (calculation_type & CALC_REGRESS_PCS) {
- retval = calc_regress_pcs(evecname, regress_pcs_modifier, max_pcs, bedfile, bed_offset, marker_ct, unfiltered_marker_ct, marker_exclude, marker_reverse, marker_ids, max_marker_id_blen, marker_allele_ptrs, chrom_info_ptr, marker_pos, sample_ct, unfiltered_sample_ct, sample_exclude, sample_ids, max_sample_id_len, sex_nm, sex_male, pheno_d, missing_phenod, outname, outname_end, hh_exists);
- if (retval) {
- goto plink_ret_1;
- }
- }
- */
-
// sometimes no more need for marker_ids/marker_allele_ptrs, conditional
// unload to clear space for IBS matrix, etc.? (probably want to initially
// load at far end of stack to make this workable...)
@@ -1811,13 +1797,6 @@ int32_t plink(char* outname, char* outname_end, char* bedname, char* bimname, ch
bigstack_mark2 = g_bigstack_base;
- /*
- if (calculation_type & CALC_REGRESS_PCS_DISTANCE) {
- logerrprint("Error: --regress-pcs-distance has not yet been written.\n");
- retval = RET_CALC_NOT_YET_SUPPORTED;
- goto plink_ret_1;
- }
- */
if (distance_req(read_dists_fname, calculation_type)) {
retval = calc_distance(threads, parallel_idx, parallel_tot, bedfile, bed_offset, outname, outname_end, read_dists_fname, distance_wts_fname, distance_exp, calculation_type, dist_calc_type, unfiltered_marker_ct, marker_exclude, marker_ct, marker_ids, max_marker_id_blen, set_allele_freqs, unfiltered_sample_ct, sample_exclude, sample_ct, sample_ids, max_sample_id_len, chrom_info_ptr);
if (retval) {
@@ -1949,6 +1928,11 @@ int32_t plink(char* outname, char* outname_end, char* bedname, char* bimname, ch
if (retval) {
goto plink_ret_1;
}
+ // bugfix (17 Jun 2019): need to reset pheno_nm, otherwise missing values
+ // in original phenotype remain missing in the --loop-assoc analysis
+ bitarr_invert_copy(sample_exclude, unfiltered_sample_ct, pheno_nm);
+ pheno_nm_ct = unfiltered_sample_ct - sample_exclude_ct;
+
if (pheno_d) {
free(pheno_d);
pheno_d = nullptr;
@@ -3591,7 +3575,6 @@ int32_t main(int32_t argc, char** argv) {
}
fputs(g_cmdline_format_str, stdout);
fputs(notestr_null_calc2, stdout);
- retval = RET_HELP;
goto main_ret_1;
}
if (!strcmp("version", argptr)) {
@@ -3730,11 +3713,11 @@ int32_t main(int32_t argc, char** argv) {
goto main_flag_copy;
case 'h':
if (!strcmp(argptr, "hwe2")) {
- fputs("Warning: --hwe2 flag is obsolete, and now treated as an alias for '--hwe midp'.\n", stderr);
+ fputs("Warning: --hwe2 flag is obsolete, and now treated as an alias for \"--hwe midp\".\n", stderr);
memcpy(flagptr, "hwe midp", 9);
break;
} else if (!strcmp(argptr, "hardy2")) {
- fputs("Warning: --hardy2 flag is obsolete, and now treated as an alias for\n'--hardy midp'.\n", stderr);
+ fputs("Warning: --hardy2 flag is obsolete, and now treated as an alias for\n\"--hardy midp\".\n", stderr);
memcpy(flagptr, "hardy midp", 11);
break;
}
@@ -3749,7 +3732,7 @@ int32_t main(int32_t argc, char** argv) {
case 'l':
if (!strcmp(argptr, "list")) {
memcpy(flagptr, "recode list", 12);
- fputs("Note: --list flag deprecated. Use '--recode list' instead.\n", stdout);
+ fputs("Note: --list flag deprecated. Use \"--recode list\" instead.\n", stdout);
recode_modifier |= RECODE_LIST;
misc_flags |= MISC_SET_HH_MISSING;
break;
@@ -3814,7 +3797,7 @@ int32_t main(int32_t argc, char** argv) {
} else if (match_upper(argptr2, "HV")) {
memcpy(flagptr, "recode HV-1chr", 15);
recode_modifier |= RECODE_HV_1CHR;
- fputs("Note: --recodeHV flag deprecated. Use '--recode HV' or '--recode HV-1chr'.\n", stdout);
+ fputs("Note: --recodeHV flag deprecated. Use \"--recode HV\" or \"--recode HV-1chr\".\n", stdout);
ujj = 2;
}
break;
@@ -3851,7 +3834,7 @@ int32_t main(int32_t argc, char** argv) {
memcpy(flagptr, "recode bimbam-1chr", 19);
recode_modifier |= RECODE_BIMBAM_1CHR;
misc_flags |= MISC_SET_HH_MISSING;
- fputs("Note: --recode-bimbam flag deprecated. Use '--recode bimbam' or\n'--recode bimbam-1chr'.\n", stdout);
+ fputs("Note: --recode-bimbam flag deprecated. Use \"--recode bimbam\" or\n\"--recode bimbam-1chr\".\n", stdout);
ujj = 2;
}
break;
@@ -3860,7 +3843,7 @@ int32_t main(int32_t argc, char** argv) {
memcpy(flagptr, "recode 01 fastphase-1chr", 25);
recode_modifier |= RECODE_01 | RECODE_FASTPHASE_1CHR;
misc_flags |= MISC_SET_HH_MISSING;
- fputs("Note: --recode-fastphase flag deprecated. Use e.g. '--recode 01 fastphase-1chr'.\n", stdout);
+ fputs("Note: --recode-fastphase flag deprecated. Use e.g. \"--recode 01 fastphase-1chr\".\n", stdout);
ujj = 2;
} else if (!memcmp(argptr2, "-structure", 10)) {
memcpy(flagptr, "recode structure", 17);
@@ -3872,7 +3855,7 @@ int32_t main(int32_t argc, char** argv) {
}
if (ujj) {
if (ujj == 1) {
- printf("Note: --%s flag deprecated. Use '%s ...'.\n", argptr, flagptr);
+ printf("Note: --%s flag deprecated. Use \"--%s ...\".\n", argptr, flagptr);
}
break;
}
@@ -4122,7 +4105,7 @@ int32_t main(int32_t argc, char** argv) {
case 'D':
if (*argptr2 == '\0') {
- logprint("Note: --D flag deprecated. Use e.g. '--r2 dprime'.\n");
+ logprint("Note: --D flag deprecated. Use e.g. \"--r2 dprime\".\n");
ld_info.modifier |= LD_DPRIME;
goto main_param_zero;
} else {
@@ -4191,7 +4174,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --R-debug must be used with --R.\n");
goto main_ret_INVALID_CMDLINE;
}
- logprint("Note: --R-debug flag deprecated. Use e.g. '--R <filename> debug'.\n");
+ logprint("Note: --R-debug flag deprecated. Use e.g. \"--R <filename> debug\".\n");
misc_flags |= MISC_RPLUGIN_DEBUG;
goto main_param_zero;
} else if (!memcmp(argptr2, "-host", 6)) {
@@ -4392,7 +4375,7 @@ int32_t main(int32_t argc, char** argv) {
}
model_modifier |= MODEL_LIN;
} else if (!strcmp(argv[cur_arg + uii], "mperm")) {
- logerrprint("Error: Improper --assoc mperm syntax. (Use '--assoc mperm=[value]'.)\n");
+ logerrprint("Error: Improper --assoc mperm syntax. (Use \"--assoc mperm=<value>\".)\n");
goto main_ret_INVALID_CMDLINE;
} else if (!strcmp(argv[cur_arg + uii], "set-test")) {
model_modifier |= MODEL_SET_TEST;
@@ -4726,7 +4709,7 @@ int32_t main(int32_t argc, char** argv) {
}
filter_flags |= FILTER_BIM_REQ | FILTER_DOSAGEMAP | FILTER_NOCNV;
} else if (!memcmp(argptr2, "eta", 4)) {
- logprint("Note: --beta flag deprecated. Use e.g. '--logistic beta'.\n");
+ logprint("Note: --beta flag deprecated. Use e.g. \"--logistic beta\".\n");
glm_modifier |= GLM_BETA;
goto main_param_zero;
} else if (!memcmp(argptr2, "d", 2)) {
@@ -4736,7 +4719,7 @@ int32_t main(int32_t argc, char** argv) {
for (uii = 1; uii <= param_ct; uii++) {
if (!strcmp(argv[cur_arg + uii], "perm")) {
if (cluster.modifier & CLUSTER_CMH_MPERM) {
- logerrprint("Error: --bd 'mperm' and 'perm{-bd}' cannot be used together.\n");
+ logerrprint("Error: --bd 'mperm' and 'perm{,-bd}' cannot be used together.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if (cluster.modifier & CLUSTER_CMH_PERM_BD) {
logerrprint("Error: --bd 'perm' and 'perm-bd' modifiers cannot be used together.\n");
@@ -4745,7 +4728,7 @@ int32_t main(int32_t argc, char** argv) {
cluster.modifier |= CLUSTER_CMH_PERM;
} else if (!strcmp(argv[cur_arg + uii], "perm-bd")) {
if (cluster.modifier & CLUSTER_CMH_MPERM) {
- logerrprint("Error: --bd 'mperm' and 'perm{-bd}' cannot be used together.\n");
+ logerrprint("Error: --bd 'mperm' and 'perm{,-bd}' cannot be used together.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if ((cluster.modifier & (CLUSTER_CMH_PERM | CLUSTER_CMH_PERM_BD)) == CLUSTER_CMH_PERM) {
logerrprint("Error: --bd 'perm' and 'perm-bd' modifiers cannot be used together.\n");
@@ -4757,7 +4740,7 @@ int32_t main(int32_t argc, char** argv) {
cluster.modifier |= CLUSTER_CMH_PERM_BD;
} else if ((strlen(argv[cur_arg + uii]) > 6) && (!memcmp(argv[cur_arg + uii], "mperm=", 6))) {
if (cluster.modifier & CLUSTER_CMH_PERM) {
- logerrprint("Error: --bd 'mperm' and 'perm{-bd}' cannot be used together.\n");
+ logerrprint("Error: --bd 'mperm' and 'perm{,-bd}' cannot be used together.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if (cluster.modifier & CLUSTER_CMH_MPERM) {
logerrprint("Error: Duplicate --bd 'mperm' modifier.\n");
@@ -4773,7 +4756,7 @@ int32_t main(int32_t argc, char** argv) {
} else if (!strcmp(argv[cur_arg + uii], "set-test")) {
cluster.modifier |= CLUSTER_CMH_SET_TEST;
} else if (!strcmp(argv[cur_arg + uii], "mperm")) {
- logerrprint("Error: Improper --bd mperm syntax. (Use '--bd mperm=[value]'.)\n");
+ logerrprint("Error: Improper --bd mperm syntax. (Use \"--bd mperm=<value>\".)\n");
goto main_ret_INVALID_CMDLINE_A;
} else {
sprintf(g_logbuf, "Error: Invalid --bd parameter '%s'.\n", argv[cur_arg + uii]);
@@ -4975,7 +4958,7 @@ int32_t main(int32_t argc, char** argv) {
case 'c':
if (!memcmp(argptr2, "hr", 3)) {
if (chrom_flag_present) {
- logerrprint("Error: --chr cannot be used with --autosome{-xy}.\n");
+ logerrprint("Error: --chr cannot be used with --autosome{,-xy}.\n");
goto main_ret_INVALID_CMDLINE_A;
}
retval = parse_chrom_ranges(param_ct, '-', &(argv[cur_arg]), chrom_info.chrom_mask, &chrom_info, (misc_flags / MISC_ALLOW_EXTRA_CHROMS) & 1, argptr);
@@ -4988,7 +4971,7 @@ int32_t main(int32_t argc, char** argv) {
logprint("Note: --compound-genotypes flag unnecessary (spaces between alleles in .ped\nand .lgen files are optional if all alleles are single-character).\n");
goto main_param_zero;
} else if (!memcmp(argptr2, "ompress", 8)) {
- logerrprint("Error: --compress flag retired. Use e.g. 'gzip <filename>'.\n");
+ logerrprint("Error: --compress flag retired. Use e.g. \"gzip <filename>\".\n");
goto main_ret_INVALID_CMDLINE;
} else if (!memcmp(argptr2, "ounts", 6)) {
if (model_modifier & MODEL_ASSOC) {
@@ -4996,10 +4979,10 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --assoc 'qt-means'/'lin' does not make sense with --counts.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --counts flag deprecated. Use '--assoc counts' instead.\n");
+ logprint("Note: --counts flag deprecated. Use \"--assoc counts\" instead.\n");
model_modifier |= MODEL_ASSOC_COUNTS;
} else {
- logprint("Note: --counts flag deprecated. Use '--freq counts' or --freqx instead.\n");
+ logprint("Note: --counts flag deprecated. Use \"--freq counts\" or --freqx instead.\n");
}
misc_flags |= MISC_FREQ_COUNTS;
goto main_param_zero;
@@ -5103,7 +5086,7 @@ int32_t main(int32_t argc, char** argv) {
}
calculation_type |= CALC_CLUSTER;
} else if (!memcmp(argptr2, "c", 2)) {
- logprint("Note: --cc flag deprecated. Use '--cluster cc'.\n");
+ logprint("Note: --cc flag deprecated. Use \"--cluster cc\".\n");
cluster.modifier |= CLUSTER_CC;
goto main_param_zero;
} else if (!memcmp(argptr2, "luster-missing", 15)) {
@@ -5111,7 +5094,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --cluster-missing cannot be used with --cluster.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --cluster-missing flag deprecated. Use '--cluster missing'.\n");
+ logprint("Note: --cluster-missing flag deprecated. Use \"--cluster missing\".\n");
calculation_type |= CALC_CLUSTER;
cluster.modifier |= CLUSTER_MISSING;
goto main_param_zero;
@@ -5534,7 +5517,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --cnv-test cannot be both 1-sided and 2-sided at the same time.\n");
goto main_ret_INVALID_CMDLINE;
}
- logprint("Note: --cnv-test-1sided flag deprecated. Use '--cnv-test 1sided'.\n");
+ logprint("Note: --cnv-test-1sided flag deprecated. Use \"--cnv-test 1sided\".\n");
cnv_calc_type |= CNV_TEST_FORCE_1SIDED;
} else if (!memcmp(argptr2, "nv-test-2sided", 15)) {
UNSTABLE("cnv-test-2sided");
@@ -5542,7 +5525,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --cnv-test cannot be both 1-sided and 2-sided at the same time.\n");
goto main_ret_INVALID_CMDLINE;
}
- logprint("Note: --cnv-test-2sided flag deprecated. Use '--cnv-test 2sided'.\n");
+ logprint("Note: --cnv-test-2sided flag deprecated. Use \"--cnv-test 2sided\".\n");
cnv_calc_type |= CNV_TEST_FORCE_2SIDED;
} else if (!memcmp(argptr2, "nv-test-region", 15)) {
UNSTABLE("cnv-test-region");
@@ -5629,10 +5612,10 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --cnv-write-freq must be used with --cnv-write.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --cnv-write-freq flag deprecated. Use '--cnv-write freq'.\n");
+ logprint("Note: --cnv-write-freq flag deprecated. Use \"--cnv-write freq\".\n");
cnv_calc_type |= CNV_WRITE_FREQ;
} else if (!memcmp(argptr2, "onsensus-match", 15)) {
- logprint("Note: --consensus-match flag deprecated. Use '--homozyg consensus-match'.\n");
+ logprint("Note: --consensus-match flag deprecated. Use \"--homozyg consensus-match\".\n");
homozyg.modifier |= HOMOZYG_CONSENSUS_MATCH;
goto main_param_zero;
} else if (!memcmp(argptr2, "ondition", 9)) {
@@ -5701,7 +5684,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_NOMEM;
}
} else if (!memcmp(argptr2, "ase-only", 9)) {
- logprint("Note: --case-only flag deprecated. Use '--fast-epistasis case-only'.\n");
+ logprint("Note: --case-only flag deprecated. Use \"--fast-epistasis case-only\".\n");
epi_info.modifier |= EPI_FAST_CASE_ONLY;
goto main_param_zero;
} else if (!memcmp(argptr2, "m-map", 6)) {
@@ -6040,7 +6023,7 @@ int32_t main(int32_t argc, char** argv) {
memcpy(strcpya(mapname, csptr), ".sample", 8);
load_params |= LOAD_PARAMS_OXSAMPLE;
} else if (!memcmp(argptr2, "ecompress", 10)) {
- logerrprint("Error: --decompress flag retired. Use e.g. 'gunzip <filename>'.\n");
+ logerrprint("Error: --decompress flag retired. Use e.g. \"gunzip <filename>\".\n");
goto main_ret_INVALID_CMDLINE;
} else if (!memcmp(argptr2, "istance", 8)) {
if (enforce_param_ct_range(param_ct, argv[cur_arg], 0, 6)) {
@@ -6129,7 +6112,7 @@ int32_t main(int32_t argc, char** argv) {
sprintf(g_logbuf, "Error: Invalid --distance-exp parameter '%s'.\n", argv[cur_arg + 1]);
goto main_ret_INVALID_CMDLINE_WW;
}
- fputs("Note: '--distance-exp <x>' deprecated. Use '--distance-weights exp=[x]' instead.\n", stdout);
+ fputs("Note: \"--distance-exp <x>\" deprecated. Use \"--distance-wts exp=<x>\" instead.\n", stdout);
} else if (!memcmp(argptr2, "istance-wts", 12)) {
if (distance_exp != 0.0) {
logerrprint("Error: --distance-wts cannot be used with --distance-exp.\n");
@@ -6169,7 +6152,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_INVALID_CMDLINE;
}
if (dist_calc_type & DISTANCE_1_MINUS_IBS) {
- logerrprint("Error: --distance-matrix flag cannot be used with '--distance 1-ibs'.\n");
+ logerrprint("Error: --distance-matrix flag cannot be used with \"--distance 1-ibs\".\n");
goto main_ret_INVALID_CMDLINE_A;
}
calculation_type |= CALC_PLINK1_DISTANCE_MATRIX;
@@ -6255,7 +6238,7 @@ int32_t main(int32_t argc, char** argv) {
}
write_covar_modifier |= WRITE_COVAR_DUMMY;
} else if (!memcmp(argptr2, "ominant", 8)) {
- logprint("Note: --dominant flag deprecated. Use e.g. '--linear dominant' (and\n'--condition-list <filename> dominant' to change covariate coding).\n");
+ logprint("Note: --dominant flag deprecated. Use e.g. \"--linear dominant\" (and\n\"--condition-list <filename> dominant\" to change covariate coding).\n");
glm_modifier |= GLM_DOMINANT | GLM_CONDITION_DOMINANT;
glm_xchr_model = 0;
goto main_param_zero;
@@ -6407,7 +6390,7 @@ int32_t main(int32_t argc, char** argv) {
} else if (!strcmp(argv[cur_arg + uii], "set-test")) {
family_info.dfam_modifier |= DFAM_SET_TEST;
} else if (!strcmp(argv[cur_arg + uii], "mperm")) {
- logerrprint("Error: Improper --dfam mperm syntax. (Use '--dfam mperm=[value]'.)\n");
+ logerrprint("Error: Improper --dfam mperm syntax. (Use \"--dfam mperm=<value>\".)\n");
goto main_ret_INVALID_CMDLINE;
} else {
sprintf(g_logbuf, "Error: Invalid --dfam parameter '%s'.\n", argv[cur_arg + uii]);
@@ -6423,10 +6406,10 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_INVALID_CMDLINE;
}
family_info.dfam_modifier |= DFAM_NO_UNRELATEDS;
- logprint("Note: --dfam-no-unrelateds flag deprecated. Use '--dfam no-unrelateds'.\n");
+ logprint("Note: --dfam-no-unrelateds flag deprecated. Use \"--dfam no-unrelateds\".\n");
goto main_param_zero;
} else if (!memcmp(argptr2, "prime", 6)) {
- logprint("Note: --dprime flag deprecated. Use e.g. '--r2 dprime'.\n");
+ logprint("Note: --dprime flag deprecated. Use e.g. \"--r2 dprime\".\n");
ld_info.modifier |= LD_DPRIME;
goto main_param_zero;
} else {
@@ -6673,7 +6656,7 @@ int32_t main(int32_t argc, char** argv) {
calculation_type |= CALC_FREQ;
if (misc_flags & MISC_FREQ_COUNTS) {
// --keep-allele-order also set for backward compatibility
- // placed here instead of a few lines up because '--freq --counts' is
+ // placed here instead of a few lines up because "--freq --counts" is
// permitted
misc_flags |= MISC_KEEP_ALLELE_ORDER;
}
@@ -6696,7 +6679,7 @@ int32_t main(int32_t argc, char** argv) {
misc_flags |= MISC_FREQX;
} else if (!memcmp(argptr2, "rom", 4)) {
if (chrom_flag_present) {
- logerrprint("Error: --from cannot be used with --autosome{-xy} or --{not-}chr.\n");
+ logerrprint("Error: --from cannot be used with --autosome{,-xy} or --{,not-}chr.\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 1)) {
@@ -6744,12 +6727,12 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --fisher cannot be used with --assoc.\n");
goto main_ret_INVALID_CMDLINE;
}
- logprint("Note: --fisher flag deprecated. Use '--assoc fisher' or '--model fisher'.\n");
+ logprint("Note: --fisher flag deprecated. Use \"--assoc fisher\" or \"--model fisher\".\n");
model_modifier |= MODEL_ASSOC | MODEL_FISHER | MODEL_ASSOC_FDEPR;
calculation_type |= CALC_MODEL;
goto main_param_zero;
} else if (!memcmp(argptr2, "id", 3)) {
- logprint("Note: --fid flag deprecated. Use '--recode vcf-fid'.\n");
+ logprint("Note: --fid flag deprecated. Use \"--recode vcf-fid\".\n");
recode_modifier |= RECODE_FID;
goto main_param_zero;
} else if (!memcmp(argptr2, "lip", 4)) {
@@ -6891,7 +6874,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --flip-scan-verbose must be used with --flip-scan.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --flip-scan-verbose flag deprecated. Use '--flip-scan verbose'.\n");
+ logprint("Note: --flip-scan-verbose flag deprecated. Use \"--flip-scan verbose\".\n");
ld_info.modifier |= LD_FLIPSCAN_VERBOSE;
} else if (!memcmp(argptr2, "amily", 6)) {
if (calculation_type & CALC_DFAM) {
@@ -6963,7 +6946,7 @@ int32_t main(int32_t argc, char** argv) {
strcpy(pedname, argv[cur_arg + 1]);
} else if (!memcmp(argptr2, "enome", 6)) {
if (genome_modifier & GENOME_OUTPUT_GZ) {
- logerrprint("Warning: Duplicate --genome flag. (--Z-genome is treated as '--genome gz'.)\n");
+ logerrprint("Warning: Duplicate --genome flag. (--Z-genome is treated as \"--genome gz\".)\n");
}
kk = 0;
main_genome_flag:
@@ -6992,7 +6975,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --genome-full must be used with --genome.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --genome-full flag deprecated. Use '--genome full'.\n");
+ logprint("Note: --genome-full flag deprecated. Use \"--genome full\".\n");
genome_modifier |= GENOME_OUTPUT_FULL;
goto main_param_zero;
} else if (!memcmp(argptr2, "roupdist", 9)) {
@@ -7073,7 +7056,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --assoc 'qt-means'/'lin' does not make sense with --genedrop.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --genedrop flag deprecated. Use e.g. '--model genedrop'.\n");
+ logprint("Note: --genedrop flag deprecated. Use e.g. \"--model genedrop\".\n");
model_modifier |= MODEL_GENEDROP;
glm_modifier |= GLM_GENEDROP;
goto main_param_zero;
@@ -7082,7 +7065,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --gc must be used with --adjust.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --gc flag deprecated. Use '--adjust gc'.\n");
+ logprint("Note: --gc flag deprecated. Use \"--adjust gc\".\n");
mtest_adjust |= ADJUST_GC;
goto main_param_zero;
} else if (!memcmp(argptr2, "file", 5)) {
@@ -7109,7 +7092,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --genome-lists flag retired. Use --parallel.\n");
goto main_ret_INVALID_CMDLINE;
} else if (!memcmp(argptr2, "enome-minimal", 14)) {
- logerrprint("Error: --genome-minimal flag retired. Use '--genome gz'.\n");
+ logerrprint("Error: --genome-minimal flag retired. Use \"--genome gz\".\n");
goto main_ret_INVALID_CMDLINE;
} else if ((!memcmp(argptr2, "roup-avg", 9)) || (!memcmp(argptr2, "roup-average", 13))) {
if (!(calculation_type & CALC_CLUSTER)) {
@@ -7119,7 +7102,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --cluster 'group-avg' and 'old-tiebreaks' cannot be used together.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- LOGPRINTF("Note: --%s flag deprecated. Use '--cluster group-avg'.\n", argptr);
+ LOGPRINTF("Note: --%s flag deprecated. Use \"--cluster group-avg\".\n", argptr);
cluster.modifier |= CLUSTER_GROUP_AVG;
goto main_param_zero;
} else if (!memcmp(argptr2, "enotypic", 9)) {
@@ -7127,7 +7110,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --genotypic cannot be used with --dominant.\n");
goto main_ret_INVALID_CMDLINE;
}
- logprint("Note: --genotypic flag deprecated. Use e.g. '--linear genotypic'.\n");
+ logprint("Note: --genotypic flag deprecated. Use e.g. \"--linear genotypic\".\n");
glm_modifier |= GLM_GENOTYPIC;
glm_xchr_model = 0;
goto main_param_zero;
@@ -7150,7 +7133,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_param_zero;
} else if (!memcmp(argptr2, "ap", 3)) {
if ((epi_info.modifier & (EPI_FAST | EPI_FAST_CASE_ONLY)) != (EPI_FAST | EPI_FAST_CASE_ONLY)) {
- logerrprint("Error: --gap must be used with '--fast-epistasis case-only'.\n");
+ logerrprint("Error: --gap must be used with \"--fast-epistasis case-only\".\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 1)) {
@@ -7219,7 +7202,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --gene-report-snp-field must be used with --extract.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if (misc_flags & MISC_EXTRACT_RANGE) {
- logerrprint("Error: --gene-report-snp-field cannot be used with '--extract range'.\n");
+ logerrprint("Error: --gene-report-snp-field cannot be used with \"--extract range\".\n");
goto main_ret_INVALID_CMDLINE;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 1)) {
@@ -7275,7 +7258,7 @@ int32_t main(int32_t argc, char** argv) {
}
filter_flags |= FILTER_ALL_REQ | FILTER_NODOSAGE | FILTER_NOCNV;
} else if (!memcmp(argptr2, "we-all", 7)) {
- logprint("Note: --hwe-all flag deprecated. Use '--hwe include-nonctrl'.\n");
+ logprint("Note: --hwe-all flag deprecated. Use \"--hwe include-nonctrl\".\n");
hwe_modifier |= HWE_THRESH_ALL;
goto main_param_zero;
} else if (!memcmp(argptr2, "et", 3)) {
@@ -7449,7 +7432,7 @@ int32_t main(int32_t argc, char** argv) {
if (homozyg.modifier & HOMOZYG_GROUP_VERBOSE) {
logprint("Note: --homozyg-group deprecated, and superseded by --homozyg group-verbose.\n");
} else {
- logprint("Note: --homozyg-group flag deprecated. Use '--homozyg group'.\n");
+ logprint("Note: --homozyg-group flag deprecated. Use \"--homozyg group\".\n");
homozyg.modifier |= HOMOZYG_GROUP;
}
goto main_param_zero;
@@ -7458,7 +7441,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --homozyg-verbose must be used with --homozyg group.\n");
goto main_ret_INVALID_CMDLINE;
}
- logprint("Note: --homozyg-verbose flag deprecated. Use '--homozyg group-verbose'.\n");
+ logprint("Note: --homozyg-verbose flag deprecated. Use \"--homozyg group-verbose\".\n");
homozyg.modifier = (homozyg.modifier & (~HOMOZYG_GROUP)) | HOMOZYG_GROUP_VERBOSE;
goto main_param_zero;
} else if (!memcmp(argptr2, "omozyg-include-missing", 23)) {
@@ -7469,13 +7452,13 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --hethom must be used with --genotypic.\n");
goto main_ret_INVALID_CMDLINE;
}
- logprint("Note: --hethom flag deprecated. Use e.g. '--linear hethom' (and\n'--condition-list <filename> recessive' to change covariate coding).\n");
+ logprint("Note: --hethom flag deprecated. Use e.g. \"--linear hethom\" (and\n\"--condition-list <filename> recessive\" to change covariate coding).\n");
glm_modifier |= GLM_HETHOM | GLM_CONDITION_RECESSIVE;
glm_modifier -= GLM_GENOTYPIC;
glm_xchr_model = 0;
goto main_param_zero;
} else if (!memcmp(argptr2, "ide-covar", 10)) {
- logprint("Note: --hide-covar flag deprecated. Use e.g. '--linear hide-covar'.\n");
+ logprint("Note: --hide-covar flag deprecated. Use e.g. \"--linear hide-covar\".\n");
glm_modifier |= GLM_HIDE_COVAR;
goto main_param_zero;
} else if (!memcmp(argptr2, "ard-call-threshold", 19)) {
@@ -7493,7 +7476,7 @@ int32_t main(int32_t argc, char** argv) {
sprintf(g_logbuf, "Error: Invalid --hard-call-threshold parameter '%s'.\n", argv[cur_arg + 1]);
goto main_ret_INVALID_CMDLINE_WWA;
} else if (dxx > (0.5 + SMALLISH_EPSILON)) {
- sprintf(g_logbuf, "Error: The --hard-call-threshold parameter must be smaller than 0.5. (Did you\nmean '--hard-call-threshold %g'?)\n", 1.0 - dxx);
+ sprintf(g_logbuf, "Error: The --hard-call-threshold parameter must be smaller than 0.5. (Did you\nmean \"--hard-call-threshold %g\"?)\n", 1.0 - dxx);
goto main_ret_INVALID_CMDLINE_2A;
} else if (dxx > (0.5 - SMALLISH_EPSILON)) {
logerrprint("Error: The --hard-call-threshold parameter must be smaller than 0.5, to prevent\nties.\n");
@@ -7525,7 +7508,7 @@ int32_t main(int32_t argc, char** argv) {
(!memcmp(argptr2, "ap-window", 10)) ||
(!memcmp(argptr2, "omozyg-haplo-track", 19))) {
main_hap_disabled_message:
- logerrprint("Error: The --hap... family of flags has not been reimplemented in PLINK 1.9 due\nto poor phasing accuracy (and, consequently, inferior haplotype\nlikelihood/frequency estimates) relative to other software; for now, we\nrecommend using BEAGLE instead of PLINK for case/control haplotype association\nanalysis. (You can use '--recode beagle' to export data.) We apologize for\nthe inconvenience, and plan to develop variants of the --hap... flags which\nhandle pre-phased data effectively.\n");
+ logerrprint("Error: The --hap... family of flags has not been reimplemented in PLINK 1.9 due\nto poor phasing accuracy (and, consequently, inferior haplotype\nlikelihood/frequency estimates) relative to other software; for now, we\nrecommend using BEAGLE instead of PLINK for case/control haplotype association\nanalysis. (You can use \"--recode beagle\" to export data.) We apologize for\nthe inconvenience, and plan to develop variants of the --hap... flags which\nhandle pre-phased data effectively.\n");
goto main_ret_INVALID_CMDLINE;
} else if (!memcmp(argptr2, "ard-call", 9)) {
logerrprint("Error: The undocumented --hard-call flag has been retired. (The\n--hard-call-threshold flag, supported by both PLINK and PLINK/SEQ, has similar\nfunctionality.)\n");
@@ -7627,7 +7610,7 @@ int32_t main(int32_t argc, char** argv) {
sample_sort = SAMPLE_SORT_ASCII;
} else if ((!strcmp(argv[cur_arg + 1], "file")) || ((tolower(argv[cur_arg + 1][0]) == 'f') && jj)) {
if (param_ct == 1) {
- sprintf(g_logbuf, "Error: Missing '--indiv-sort %s' filename.\n", argv[cur_arg + 1]);
+ sprintf(g_logbuf, "Error: Missing \"--indiv-sort %s\" filename.\n", argv[cur_arg + 1]);
goto main_ret_INVALID_CMDLINE_2A;
}
sample_sort = SAMPLE_SORT_FILE;
@@ -7640,7 +7623,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_INVALID_CMDLINE_WWA;
}
if ((param_ct == 2) && (sample_sort != SAMPLE_SORT_FILE)) {
- sprintf(g_logbuf, "Error: '--indiv-sort %s' does not accept a second parameter.\n", argv[cur_arg + 1]);
+ sprintf(g_logbuf, "Error: \"--indiv-sort %s\" does not accept a second parameter.\n", argv[cur_arg + 1]);
goto main_ret_INVALID_CMDLINE_2A;
}
} else if (!memcmp(argptr2, "bs-test", 8)) {
@@ -7659,7 +7642,7 @@ int32_t main(int32_t argc, char** argv) {
}
calculation_type |= CALC_IBS_TEST;
} else if (!memcmp(argptr2, "id", 3)) {
- logprint("Note: --iid flag deprecated. Use '--recode vcf-iid'.\n");
+ logprint("Note: --iid flag deprecated. Use \"--recode vcf-iid\".\n");
recode_modifier |= RECODE_IID;
goto main_param_zero;
} else if (!memcmp(argptr2, "bm", 3)) {
@@ -7680,10 +7663,10 @@ int32_t main(int32_t argc, char** argv) {
}
cluster.min_ibm = dxx;
} else if (!memcmp(argptr2, "mpossible", 10)) {
- logerrprint("Error: --impossible flag retired. Use '--genome nudge', or explicitly validate\nZ0/Z1/Z2/PI_HAT in your script.\n");
+ logerrprint("Error: --impossible flag retired. Use \"--genome nudge\", or explicitly validate\nZ0/Z1/Z2/PI_HAT in your script.\n");
goto main_ret_INVALID_CMDLINE;
} else if (!memcmp(argptr2, "nteraction", 11)) {
- logprint("Note: --interaction flag deprecated. Use e.g. '--linear interaction'.\n");
+ logprint("Note: --interaction flag deprecated. Use e.g. \"--linear interaction\".\n");
glm_modifier |= GLM_INTERACTION;
goto main_param_zero;
} else if (!memcmp(argptr2, "bs-matrix", 10)) {
@@ -7706,10 +7689,10 @@ int32_t main(int32_t argc, char** argv) {
id_delim = '_';
}
} else if (!memcmp(argptr2, "nter-chr", 9)) {
- logprint("Note: --inter-chr flag deprecated. Use e.g. '--r2 inter-chr'.\n");
+ logprint("Note: --inter-chr flag deprecated. Use e.g. \"--r2 inter-chr\".\n");
ld_info.modifier |= LD_INTER_CHR;
} else if (!memcmp(argptr2, "nd-major", 9)) {
- logerrprint("Error: --ind-major is retired, to discourage creation of .bed files that\nconstantly have to be transposed back. '--recode ped' exports sample-major\nfiles which are good enough for smaller jobs; we suggest transposing small data\nwindows on the fly when tackling large jobs.\n");
+ logerrprint("Error: --ind-major is retired, to discourage creation of .bed files that\nconstantly have to be transposed back. \"--recode ped\" exports sample-major\nfiles which are good enough for smaller jobs; we suggest transposing small data\nwindows on the fly when tackling large jobs.\n");
goto main_ret_INVALID_CMDLINE;
} else if (!memcmp(argptr2, "mpute-sex", 10)) {
if (calculation_type & CALC_SEXCHECK) {
@@ -7815,7 +7798,7 @@ int32_t main(int32_t argc, char** argv) {
case 'j':
if (!memcmp(argptr2, "e-cellmin", 10)) {
if (!(epi_info.modifier & EPI_FAST_JOINT_EFFECTS)) {
- logerrprint("Error: --je-cellmin must be used with '--fast-epistasis joint-effects'.\n");
+ logerrprint("Error: --je-cellmin must be used with \"--fast-epistasis joint-effects\".\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 1)) {
@@ -7963,7 +7946,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --log10 must be used with --adjust.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --log10 flag deprecated. Use '--adjust log10'.\n");
+ logprint("Note: --log10 flag deprecated. Use \"--adjust log10\".\n");
mtest_adjust |= ADJUST_LOG10;
goto main_param_zero;
} else if (!memcmp(argptr2, "ambda", 6)) {
@@ -8097,7 +8080,7 @@ int32_t main(int32_t argc, char** argv) {
} else if (!strcmp(argv[cur_arg + uii], "set-test")) {
glm_modifier |= GLM_SET_TEST;
} else if (!strcmp(argv[cur_arg + uii], "mperm")) {
- sprintf(g_logbuf, "Error: Improper --%s mperm syntax. (Use '--%s mperm=[value]'.)\n", argptr, argptr);
+ sprintf(g_logbuf, "Error: Improper --%s mperm syntax. (Use \"--%s mperm=<value>\".)\n", argptr, argptr);
goto main_ret_INVALID_CMDLINE_2;
} else {
sprintf(g_logbuf, "Error: Invalid --%s parameter '%s'.\n", argptr, argv[cur_arg + uii]);
@@ -8468,7 +8451,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_INVALID_CMDLINE_A;
}
if (distance_exp != 0.0) {
- logerrprint("Error: '--distance-wts exp=[x]' cannot be used with --make-grm-gz.\n");
+ logerrprint("Error: \"--distance-wts exp=<x>\" cannot be used with --make-grm-gz.\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 0, 2)) {
@@ -8509,7 +8492,7 @@ int32_t main(int32_t argc, char** argv) {
calculation_type |= CALC_RELATIONSHIP;
} else if (!memcmp(argptr2, "ake-grm-bin", 12)) {
if (distance_exp != 0.0) {
- logerrprint("Error: '--distance-wts exp=[x]' cannot be used with --make-grm-bin.\n");
+ logerrprint("Error: \"--distance-wts exp=<x>\" cannot be used with --make-grm-bin.\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 0, 1)) {
@@ -8537,7 +8520,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_INVALID_CMDLINE_A;
}
if (distance_exp != 0.0) {
- logerrprint("Error: '--distance-wts exp=[x]' cannot be used with --make-rel.\n");
+ logerrprint("Error: \"--distance-wts exp=<x>\" cannot be used with --make-rel.\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 0, 3)) {
@@ -8622,7 +8605,7 @@ int32_t main(int32_t argc, char** argv) {
}
calculation_type |= CALC_RELATIONSHIP;
} else if (!memcmp(argptr2, "atrix", 6)) {
- logprint("Note: --matrix flag deprecated. Migrate to '--distance ibs flat-missing',\n'--r2 square', etc.\n");
+ logprint("Note: --matrix flag deprecated. Migrate to \"--distance ibs flat-missing\",\n\"--r2 square\", etc.\n");
matrix_flag_state = 1;
if (calculation_type & CALC_CLUSTER) {
calculation_type |= CALC_PLINK1_IBS_MATRIX;
@@ -8630,7 +8613,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_param_zero;
} else if (!memcmp(argptr2, "af-succ", 8)) {
if (misc_flags & MISC_HET_SMALL_SAMPLE) {
- logerrprint("Error: '--het small-sample' cannot be used with --maf-succ.\n");
+ logerrprint("Error: \"--het small-sample\" cannot be used with --maf-succ.\n");
goto main_ret_INVALID_CMDLINE_A;
}
misc_flags |= MISC_MAF_SUCC;
@@ -8767,7 +8750,7 @@ int32_t main(int32_t argc, char** argv) {
sprintf(g_logbuf, "Error: Invalid --mcovar parameter '%s'.\n", argv[cur_arg + 1]);
goto main_ret_INVALID_CMDLINE_WWA;
}
- logprint("Note: --mcovar flag deprecated. Use '--gxe <covariate index>'.\n");
+ logprint("Note: --mcovar flag deprecated. Use \"--gxe <covariate index>\".\n");
} else if (!memcmp(argptr2, "odel", 5)) {
if (enforce_param_ct_range(param_ct, argv[cur_arg], 0, 6)) {
goto main_ret_INVALID_CMDLINE_2A;
@@ -8849,7 +8832,7 @@ int32_t main(int32_t argc, char** argv) {
}
model_modifier |= MODEL_MPERM;
} else if (!strcmp(argv[cur_arg + uii], "mperm")) {
- logerrprint("Error: Improper --model mperm syntax. (Use '--model mperm=[value]'.)\n");
+ logerrprint("Error: Improper --model mperm syntax. (Use \"--model mperm=<value>\".)\n");
goto main_ret_INVALID_CMDLINE;
} else if (!strcmp(argv[cur_arg + uii], "set-test")) {
model_modifier |= MODEL_SET_TEST;
@@ -8868,7 +8851,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: Conflicting --model parameters.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --model-dom flag deprecated. Use '--model dom'.\n");
+ logprint("Note: --model-dom flag deprecated. Use \"--model dom\".\n");
model_modifier |= MODEL_PDOM;
calculation_type |= CALC_MODEL;
goto main_param_zero;
@@ -8881,7 +8864,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: Conflicting --model parameters.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --model-gen flag deprecated. Use '--model gen'.\n");
+ logprint("Note: --model-gen flag deprecated. Use \"--model gen\".\n");
model_modifier |= MODEL_PGEN;
calculation_type |= CALC_MODEL;
goto main_param_zero;
@@ -8894,7 +8877,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: Conflicting --model parameters.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --model-rec flag deprecated. Use '--model rec'.\n");
+ logprint("Note: --model-rec flag deprecated. Use \"--model rec\".\n");
model_modifier |= MODEL_PREC;
calculation_type |= CALC_MODEL;
goto main_param_zero;
@@ -8907,7 +8890,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: Conflicting --model parameters.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --model-trend flag deprecated. Use '--model trend'.\n");
+ logprint("Note: --model-trend flag deprecated. Use \"--model trend\".\n");
model_modifier |= MODEL_PTREND;
calculation_type |= CALC_MODEL;
goto main_param_zero;
@@ -8934,14 +8917,14 @@ int32_t main(int32_t argc, char** argv) {
}
if (load_rare & LOAD_RARE_CNV) {
if ((cnv_calc_type & CNV_SAMPLE_PERM) && (!cnv_sample_mperms)) {
- logprint("Note: --mperm flag deprecated. Use e.g. '--cnv-indiv-perm <perm. count>'.\n");
+ logprint("Note: --mperm flag deprecated. Use e.g. \"--cnv-indiv-perm <perm. count>\".\n");
cnv_sample_mperms = mperm_val;
} else if ((cnv_calc_type & CNV_TEST_REGION) && (!cnv_test_region_mperms)) {
- logprint("Note: --mperm flag deprecated. Use e.g. '--cnv-test-region <perm. count>'.\n");
+ logprint("Note: --mperm flag deprecated. Use e.g. \"--cnv-test-region <perm. count>\".\n");
} else if ((cnv_calc_type & CNV_ENRICHMENT_TEST) && (!cnv_enrichment_test_mperms)) {
- logprint("Note: --mperm flag deprecated. Use e.g. '--cnv-enrichment-test <perm. count>'.\n");
+ logprint("Note: --mperm flag deprecated. Use e.g. \"--cnv-enrichment-test <perm. count>\".\n");
} else {
- logprint("Note: --mperm flag deprecated. Use e.g. '--cnv-test <permutation count>'.\n");
+ logprint("Note: --mperm flag deprecated. Use e.g. \"--cnv-test <permutation count>\".\n");
if (!(cnv_calc_type & (CNV_SAMPLE_PERM | CNV_ENRICHMENT_TEST | CNV_TEST | CNV_TEST_REGION))) {
cnv_calc_type |= CNV_TEST;
}
@@ -8955,7 +8938,7 @@ int32_t main(int32_t argc, char** argv) {
cnv_enrichment_test_mperms = mperm_val;
}
} else {
- logprint("Note: --mperm flag deprecated. Use e.g. '--model mperm=[value]'.\n");
+ logprint("Note: --mperm flag deprecated. Use e.g. \"--model mperm=<value>\".\n");
model_mperm_val = mperm_val;
model_modifier |= MODEL_MPERM;
glm_mperm_val = mperm_val;
@@ -9089,7 +9072,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --mds-cluster must be used with --cluster.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --mds-cluster flag deprecated. Use '--mds-plot by-cluster'.\n");
+ logprint("Note: --mds-cluster flag deprecated. Use \"--mds-plot by-cluster\".\n");
cluster.modifier |= CLUSTER_MDS;
} else if (!memcmp(argptr2, "within", 7)) {
if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 1)) {
@@ -9198,7 +9181,7 @@ int32_t main(int32_t argc, char** argv) {
} else if (!strcmp(argv[cur_arg + uii], "set-test")) {
cluster.modifier |= CLUSTER_CMH_SET_TEST;
} else if (!strcmp(argv[cur_arg + uii], "mperm")) {
- logerrprint("Error: Improper --mh mperm syntax. (Use '--mh mperm=[value]'.)\n");
+ logerrprint("Error: Improper --mh mperm syntax. (Use \"--mh mperm=<value>\".)\n");
goto main_ret_INVALID_CMDLINE_A;
} else {
sprintf(g_logbuf, "Error: Invalid --mh parameter '%s'.\n", argv[cur_arg + uii]);
@@ -9351,7 +9334,7 @@ int32_t main(int32_t argc, char** argv) {
family_info.mendel_exclude_one_ratio = -1;
}
} else if (!memcmp(argptr2, "at", 3)) {
- logprint("Note: --mat flag deprecated. Use e.g. '--tdt poo mperm=[value] mat'.\n");
+ logprint("Note: --mat flag deprecated. Use e.g. \"--tdt poo mperm=<value> mat\".\n");
family_info.tdt_modifier |= TDT_POOPERM_MAT;
goto main_param_zero;
} else if (!memcmp(argptr2, "endel", 6)) {
@@ -9388,12 +9371,27 @@ int32_t main(int32_t argc, char** argv) {
// if '+' present, must detect it before using alloc_and_flatten()
// must detect '+'
for (uii = 1; uii <= param_ct; uii++) {
- if ((argv[cur_arg + uii][0] == '+') && (!argv[cur_arg + uii][1])) {
- if (uii <= 2) {
- logerrprint("Error: --meta-analysis requires at least two PLINK report files.\n");
- goto main_ret_INVALID_CMDLINE_A;
- }
- break;
+ if (argv[cur_arg + uii][0] == '+') {
+ if (!argv[cur_arg + uii][1]) {
+ if (uii <= 2) {
+ logerrprint("Error: --meta-analysis requires at least two PLINK report files.\n");
+ goto main_ret_INVALID_CMDLINE_A;
+ }
+ break;
+ } else {
+ const char* post_plus = &(argv[cur_arg + uii][1]);
+ if ((!strcmp(post_plus, "study")) ||
+ (!strcmp(post_plus, "no-map")) ||
+ (!strcmp(post_plus, "no-allele")) ||
+ (!strcmp(post_plus, "report-all")) ||
+ (!strcmp(post_plus, "logscale")) ||
+ (!strcmp(post_plus, "qt")) ||
+ (!strcmp(post_plus, "weighted-z"))) {
+ // This is far more likely to be a mistake than a real
+ // filename...
+ LOGERRPRINTFWW("Warning: In order to end the filename list, --meta-analysis '+' must be followed by a space. Currently interpreting %s as a literal filename, which probably isn't what you want...\n", argv[cur_arg + uii]);
+ }
+ }
}
}
retval = alloc_and_flatten(&metaanal_fnames, &(argv[cur_arg + 1]), uii - 1);
@@ -9574,7 +9572,7 @@ int32_t main(int32_t argc, char** argv) {
calculation_type |= CALC_NEIGHBOR;
} else if (!memcmp(argptr2, "ot-chr", 7)) {
if (markername_from) {
- logerrprint("Error: --from cannot be used with --autosome{-xy} or --{not-}chr.\n");
+ logerrprint("Error: --from cannot be used with --autosome{,-xy} or --{,not-}chr.\n");
goto main_ret_INVALID_CMDLINE_A;
}
// allowed:
@@ -9584,7 +9582,7 @@ int32_t main(int32_t argc, char** argv) {
// does not make sense, disallowed:
// --allow-extra-chr --chr 5-22 --not-chr bobs_chrom
- // --allow-extra-chr present, --chr/--autosome{-xy} not present
+ // --allow-extra-chr present, --chr/--autosome{,-xy} not present
uii = ((misc_flags / MISC_ALLOW_EXTRA_CHROMS) & 1) && (!chrom_info.is_include_stack);
retval = parse_chrom_ranges(param_ct, '-', &(argv[cur_arg]), chrom_exclude, &chrom_info, uii, argptr);
if (retval) {
@@ -9606,7 +9604,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --nudge must be used with --genome.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --nudge flag deprecated. Use '--genome nudge'.\n");
+ logprint("Note: --nudge flag deprecated. Use \"--genome nudge\".\n");
genome_modifier |= GENOME_NUDGE;
goto main_param_zero;
} else if (!memcmp(argptr2, "ew-id-max-allele-len", 21)) {
@@ -9631,7 +9629,7 @@ int32_t main(int32_t argc, char** argv) {
sprintf(g_logbuf, "Error: --no-snp conflicts with a --%s modifier.\n", (glm_modifier & GLM_LOGISTIC)? "logistic" : "linear");
goto main_ret_INVALID_CMDLINE_2A;
}
- logprint("Note: --no-snp flag deprecated. Use e.g. '--linear no-snp'.\n");
+ logprint("Note: --no-snp flag deprecated. Use e.g. \"--linear no-snp\".\n");
glm_modifier |= GLM_NO_SNP;
goto main_param_zero;
} else if (!memcmp(argptr2, "o-x-sex", 8)) {
@@ -9642,7 +9640,7 @@ int32_t main(int32_t argc, char** argv) {
sprintf(g_logbuf, "Error: --no-x-sex conflicts with a --%s modifier.\n", (glm_modifier & GLM_LOGISTIC)? "logistic" : "linear");
goto main_ret_INVALID_CMDLINE_2A;
}
- logprint("Note: --no-x-sex flag deprecated. Use e.g. '--linear no-x-sex'.\n");
+ logprint("Note: --no-x-sex flag deprecated. Use e.g. \"--linear no-x-sex\".\n");
glm_modifier |= GLM_NO_X_SEX;
goto main_param_zero;
} else if (!memcmp(argptr2, "op", 3)) {
@@ -9650,7 +9648,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --nop must be used with --fast-epistasis.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --nop flag deprecated. Use '--fast-epistasis nop'.\n");
+ logprint("Note: --nop flag deprecated. Use \"--fast-epistasis nop\".\n");
epi_info.modifier |= EPI_FAST_NO_P_VALUE;
goto main_param_zero;
} else if (!memcmp(argptr2, "o-const-covar", 14)) {
@@ -9804,7 +9802,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --ped parameter too long.\n");
goto main_ret_OPEN_FAIL;
} else if (!memcmp(argv[cur_arg + 1], "-", 2)) {
- logerrprint("Error: '--ped -' is no longer supported. Redirect to a temporary file and load\nit the usual way, or use PLINK 1.07.\n");
+ logerrprint("Error: \"--ped -\" is no longer supported. Redirect to a temporary file and load\nit the usual way, or use PLINK 1.07.\n");
goto main_ret_INVALID_CMDLINE;
}
strcpy(pedname, argv[cur_arg + 1]);
@@ -9848,16 +9846,16 @@ int32_t main(int32_t argc, char** argv) {
goto main_param_zero;
} else if (!memcmp(argptr2, "arallel", 8)) {
if ((dist_calc_type & DISTANCE_SHAPEMASK) == DISTANCE_SQ) {
- logerrprint("Error: --parallel cannot be used with '--distance square'. Use '--distance\nsquare0' or plain --distance instead.\n");
+ logerrprint("Error: --parallel cannot be used with \"--distance square\". Use \"--distance\nsquare0\" or plain --distance instead.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if ((dist_calc_type & (DISTANCE_BIN | DISTANCE_BIN4)) && (!(dist_calc_type & DISTANCE_SHAPEMASK))) {
- logerrprint("Error: --parallel cannot be used with plain '--distance bin{4}'. Use e.g.\n'--distance bin square0' or '--distance bin triangle' instead.\n");
+ logerrprint("Error: --parallel cannot be used with plain \"--distance bin{,4}\". Use e.g.\n\"--distance bin square0\" or \"--distance bin triangle\" instead.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if ((rel_info.modifier & REL_CALC_SHAPEMASK) == REL_CALC_SQ) {
- logerrprint("Error: --parallel cannot be used with '--make-rel square'. Use '--make-rel\nsquare0' or plain '--make-rel' instead.\n");
+ logerrprint("Error: --parallel cannot be used with \"--make-rel square\". Use \"--make-rel\nsquare0\" or plain --make-rel instead.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if ((rel_info.modifier & (REL_CALC_BIN | REL_CALC_BIN4)) && (!(rel_info.modifier & (REL_CALC_SHAPEMASK | REL_CALC_GRM_BIN)))) {
- logerrprint("Error: --parallel cannot be used with plain '--make-rel bin{4}'. Use e.g.\n'--make-rel bin square0' or '--make-rel bin triangle' instead.\n");
+ logerrprint("Error: --parallel cannot be used with plain \"--make-rel bin{,4}\". Use e.g.\n\"--make-rel bin square0\" or \"--make-rel bin triangle\" instead.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if (calculation_type & CALC_PLINK1_DISTANCE_MATRIX) {
logerrprint("Error: --parallel and --distance-matrix cannot be used together. Use\n--distance instead.\n");
@@ -9931,7 +9929,7 @@ int32_t main(int32_t argc, char** argv) {
family_info.dfam_modifier |= DFAM_PERM;
family_info.qfam_modifier |= QFAM_PERM;
cluster.modifier |= CLUSTER_CMH_PERM;
- logprint("Note: --perm flag deprecated. Use e.g. '--model perm'.\n");
+ logprint("Note: --perm flag deprecated. Use e.g. \"--model perm\".\n");
goto main_param_zero;
} else if (!memcmp(argptr2, "erm-count", 10)) {
model_modifier |= MODEL_PERM_COUNT;
@@ -9941,7 +9939,7 @@ int32_t main(int32_t argc, char** argv) {
family_info.dfam_modifier |= DFAM_PERM_COUNT;
family_info.qfam_modifier |= QFAM_PERM_COUNT;
cluster.modifier |= CLUSTER_CMH_PERM_COUNT;
- logprint("Note: --perm-count flag deprecated. Use e.g. '--model perm-count'.\n");
+ logprint("Note: --perm-count flag deprecated. Use e.g. \"--model perm-count\".\n");
goto main_param_zero;
} else if (!memcmp(argptr2, "2", 2)) {
logerrprint("Error: --p2 has been provisionally retired. Contact the developers if you need\nthis functionality.\n");
@@ -10072,19 +10070,19 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_1;
}
} else if (!memcmp(argptr2, "oo", 3)) {
- logprint("Note: --poo flag deprecated. Use '--tdt poo'.\n");
+ logprint("Note: --poo flag deprecated. Use \"--tdt poo\".\n");
family_info.tdt_modifier |= TDT_POO;
goto main_param_zero;
} else if (!memcmp(argptr2, "arentdt1", 9)) {
- logprint("Note: --parentdt1 flag deprecated. Use e.g.\n'--tdt exact mperm=[value] parentdt1'.\n");
+ logprint("Note: --parentdt1 flag deprecated. Use e.g.\n\"--tdt exact mperm=<value> parentdt1\".\n");
family_info.tdt_modifier |= TDT_PARENPERM1;
goto main_param_zero;
} else if (!memcmp(argptr2, "arentdt2", 9)) {
- logprint("Note: --parentdt2 flag deprecated. Use e.g.\n'--tdt exact mperm=[value] parentdt2'.\n");
+ logprint("Note: --parentdt2 flag deprecated. Use e.g.\n\"--tdt exact mperm=<value> parentdt2\".\n");
family_info.tdt_modifier |= TDT_PARENPERM2;
goto main_param_zero;
} else if (!memcmp(argptr2, "at", 3)) {
- logprint("Note: --pat flag deprecated. Use e.g. '--tdt poo mperm=[value] pat'.\n");
+ logprint("Note: --pat flag deprecated. Use e.g. \"--tdt poo mperm=<value> pat\".\n");
family_info.tdt_modifier |= TDT_POOPERM_PAT;
goto main_param_zero;
} else if ((!memcmp(argptr2, "roxy-assoc", 11)) ||
@@ -10102,7 +10100,7 @@ int32_t main(int32_t argc, char** argv) {
// a PLINK 2.1 which includes a port of its imputation routine, and
// that can be written to handle Y/MT in a sane manner. But that's not
// happening before 2016.)
- logerrprint("Error: PLINK 1 proxy association and imputation commands have been retired due\nto poor accuracy. (See Nothnagel M et al. (2009) A comprehensive evaluation of\nSNP genotype imputation.) We suggest using another tool, such as BEAGLE 4 or\nIMPUTE2, for imputation instead, and performing association analysis on those\nresults. ('--recode vcf' and --vcf can be used to exchange data with BEAGLE 4,\nwhile '--recode oxford' and --data let you work with IMPUTE2.)\n");
+ logerrprint("Error: PLINK 1 proxy association and imputation commands have been retired due\nto poor accuracy. (See Nothnagel M et al. (2009) A comprehensive evaluation of\nSNP genotype imputation.) We suggest using another tool, such as BEAGLE 4 or\nIMPUTE2, for imputation instead, and performing association analysis on those\nresults. (\"--recode vcf\" and --vcf can be used to exchange data with BEAGLE 4,\nwhile \"--recode oxford\" and --data let you work with IMPUTE2.)\n");
goto main_ret_INVALID_CMDLINE;
} else if (!memcmp(argptr2, "file", 5)) {
sprintf(g_logbuf, "Error: Unrecognized flag (%s). (This is PLINK 1.9, not 2.x.)\n", argv[cur_arg]);
@@ -10122,7 +10120,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --qt-means does not make sense with a case/control-specific --assoc\nmodifier.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --qt-means flag deprecated. Use '--assoc qt-means ...'.\n");
+ logprint("Note: --qt-means flag deprecated. Use \"--assoc qt-means ...\".\n");
model_modifier |= MODEL_QT_MEANS;
goto main_param_zero;
} else if (!memcmp(argptr2, "q-plot", 7)) {
@@ -10130,7 +10128,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --qq-plot must be used with --adjust.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --qq-plot flag deprecated. Use '--adjust qq-plot'.\n");
+ logprint("Note: --qq-plot flag deprecated. Use \"--adjust qq-plot\".\n");
mtest_adjust |= ADJUST_QQ;
goto main_param_zero;
} else if (!memcmp(argptr2, "match", 6)) {
@@ -10283,7 +10281,7 @@ int32_t main(int32_t argc, char** argv) {
} else if (!strcmp(argv[cur_arg + uii], "perm-count")) {
family_info.qfam_modifier |= QFAM_PERM_COUNT;
} else if (!strcmp(argv[cur_arg + uii], "mperm")) {
- sprintf(g_logbuf, "Error: Improper --%s mperm syntax. (Use '--%s mperm=[value]'.)\n", argptr, argptr);
+ sprintf(g_logbuf, "Error: Improper --%s mperm syntax. (Use \"--%s mperm=<value>\".)\n", argptr, argptr);
goto main_ret_INVALID_CMDLINE_WWA;
} else {
sprintf(g_logbuf, "Error: Invalid --%s parameter '%s'.\n", argptr, argv[cur_arg + uii]);
@@ -10421,138 +10419,14 @@ int32_t main(int32_t argc, char** argv) {
}
calculation_type |= CALC_REGRESS_REL;
} else if ((!memcmp(argptr2, "egress-pcs", 11)) || (!memcmp(argptr2, "egress-pcs-distance", 20))) {
- logerrprint("Error: --regress-pcs has been temporarily disabled. Contact the developers if\nyou need a build with the old implementation unlocked.\n");
- retval = RET_CALC_NOT_YET_SUPPORTED;
- goto main_ret_1;
- /*
- if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 5)) {
- goto main_ret_INVALID_CMDLINE_2A;
- }
- retval = alloc_fname(&evecname, argv[cur_arg + 1], argptr, 9);
- if (retval) {
- goto main_ret_1;
- }
- for (uii = 2; uii <= param_ct; uii++) {
- if (!strcmp(argv[cur_arg + uii], "normalize-pheno")) {
- regress_pcs_modifier |= REGRESS_PCS_NORMALIZE_PHENO;
- } else if (!strcmp(argv[cur_arg + uii], "sex-specific")) {
- regress_pcs_modifier |= REGRESS_PCS_SEX_SPECIFIC;
- } else if (!strcmp(argv[cur_arg + uii], "clip")) {
- regress_pcs_modifier |= REGRESS_PCS_CLIP;
- } else if ((max_pcs != MAX_PCS_DEFAULT) || (argv[cur_arg + uii][0] < '0') || (argv[cur_arg + uii][0] > '9')) {
- sprintf(g_logbuf, "Error: Invalid --regress-pcs parameter '%s'.%s", argv[cur_arg + uii], errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- } else {
- if (scan_posint_defcapx(argv[cur_arg + uii], &max_pcs)) {
- sprintf(g_logbuf, "Error: Invalid --regress-pcs maximum principal component count '%s'.%s", argv[cur_arg + uii], errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- }
- }
- }
- calculation_type |= CALC_REGRESS_PCS;
- } else if (!memcmp(argptr2, "egress-pcs-distance", 20)) {
- if (calculation_type & CALC_REGRESS_PCS) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance cannot be used with --regress-pcs.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- } else if (calculation_type & CALC_DISTANCE) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance cannot be used with --distance.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- }
- if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 11)) {
- goto main_ret_INVALID_CMDLINE_2A;
- }
- retval = alloc_fname(&evecname, argv[cur_arg + 1], argptr, 9);
- if (retval) {
- goto main_ret_1;
- }
- for (uii = 2; uii <= param_ct; uii++) {
- if (!strcmp(argv[cur_arg + uii], "normalize-pheno")) {
- regress_pcs_modifier |= REGRESS_PCS_NORMALIZE_PHENO;
- } else if (!strcmp(argv[cur_arg + uii], "sex-specific")) {
- regress_pcs_modifier |= REGRESS_PCS_SEX_SPECIFIC;
- } else if (!strcmp(argv[cur_arg + uii], "square")) {
- if ((dist_calc_type & DISTANCE_SHAPEMASK) == DISTANCE_SQ0) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance 'square' and 'square0' modifiers cannot coexist.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- } else if ((dist_calc_type & DISTANCE_SHAPEMASK) == DISTANCE_TRI) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance 'square' and 'triangle' modifiers cannot coexist.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- } else if (parallel_tot > 1) {
- sprintf(g_logbuf, "Error: --parallel cannot be used with '--regress-pcs-distance square'. Use\nthe square0 or triangle shape instead.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- }
- dist_calc_type |= DISTANCE_SQ;
- } else if (!strcmp(argv[cur_arg + uii], "square0")) {
- if ((dist_calc_type & DISTANCE_SHAPEMASK) == DISTANCE_SQ) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance 'square' and 'square0' modifiers cannot coexist.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- } else if ((dist_calc_type & DISTANCE_SHAPEMASK) == DISTANCE_TRI) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance 'square0' and 'triangle' modifiers can't coexist.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- }
- dist_calc_type |= DISTANCE_SQ0;
- } else if (!strcmp(argv[cur_arg + uii], "triangle")) {
- if ((dist_calc_type & DISTANCE_SHAPEMASK) == DISTANCE_SQ) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance 'square' and 'triangle' modifiers cannot coexist.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- } else if ((dist_calc_type & DISTANCE_SHAPEMASK) == DISTANCE_SQ0) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance 'square0' and 'triangle' modifiers can't coexist.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- }
- dist_calc_type |= DISTANCE_TRI;
- } else if (!strcmp(argv[cur_arg + uii], "gz")) {
- if (dist_calc_type & DISTANCE_BIN) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance 'gz' and 'bin' flags cannot coexist.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- }
- dist_calc_type |= DISTANCE_GZ;
- } else if (!strcmp(argv[cur_arg + uii], "bin")) {
- if (dist_calc_type & DISTANCE_GZ) {
- sprintf(g_logbuf, "Error: --regress-pcs-distance 'gz' and 'bin' flags cannot coexist.%s", errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- }
- dist_calc_type |= DISTANCE_BIN;
- } else if (!strcmp(argv[cur_arg + uii], "ibs")) {
- if (dist_calc_type & DISTANCE_IBS) {
- logerrprint("Error: Duplicate --regress-pcs-distance 'ibs' modifier.\n");
- goto main_ret_INVALID_CMDLINE;
- }
- dist_calc_type |= DISTANCE_IBS;
- } else if (!strcmp(argv[cur_arg + uii], "1-ibs")) {
- if (dist_calc_type & DISTANCE_1_MINUS_IBS) {
- logerrprint("Error: Duplicate --regress-pcs-distance '1-ibs' modifier.\n");
- goto main_ret_INVALID_CMDLINE;
- }
- dist_calc_type |= DISTANCE_1_MINUS_IBS;
- } else if (!strcmp(argv[cur_arg + uii], "allele-ct")) {
- if (dist_calc_type & DISTANCE_ALCT) {
- logerrprint("Error: Duplicate --regress-pcs-distance 'allele-ct' modifier.\n");
- goto main_ret_INVALID_CMDLINE;
- }
- dist_calc_type |= DISTANCE_ALCT;
- } else if (!strcmp(argv[cur_arg + uii], "flat-missing")) {
- dist_calc_type |= DISTANCE_FLAT_MISSING;
- } else if ((max_pcs != MAX_PCS_DEFAULT) || (argv[cur_arg + uii][0] < '0') || (argv[cur_arg + uii][0] > '9')) {
- sprintf(g_logbuf, "Error: Invalid --regress-pcs-distance parameter '%s'.%s", argv[cur_arg + uii], errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- } else {
- if (scan_posint_defcapx(argv[cur_arg + uii], &max_pcs)) {
- sprintf(g_logbuf, "Error: Invalid --regress-pcs-distance maximum PC count '%s'.%s", argv[cur_arg + uii], errstr_append);
- goto main_ret_INVALID_CMDLINE_3;
- }
- }
- }
- if (!(dist_calc_type & DISTANCE_TYPEMASK)) {
- dist_calc_type |= DISTANCE_ALCT;
- }
- calculation_type |= CALC_REGRESS_PCS_DISTANCE;
- */
+ logerrprint("Error: --regress-pcs has been retired. Contact the developers if you need a\nlibrary which efficiently computes genotype residuals on the fly.\n");
+ goto main_ret_INVALID_CMDLINE_A;
} else if (!memcmp(argptr2, "ead-freq", 9)) {
if (calculation_type & CALC_FREQ) {
logerrprint("Error: --freq and --read-freq flags cannot coexist.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if (misc_flags & MISC_HET_SMALL_SAMPLE) {
- logerrprint("Error: '--het small-sample' cannot currently be used with --read-freq. Contact\nthe developers if you need to combine them.\n");
+ logerrprint("Error: \"--het small-sample\" cannot currently be used with --read-freq. Contact\nthe developers if you need to combine them.\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 1)) {
@@ -10829,7 +10703,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --read-dists cannot be used with a distance matrix calculation.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if (cluster.modifier & CLUSTER_MISSING) {
- logerrprint("Error: --read-dists cannot be used with '--cluster missing'.\n");
+ logerrprint("Error: --read-dists cannot be used with \"--cluster missing\".\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 2)) {
@@ -10850,7 +10724,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --rel-check must be used with --genome.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --rel-check flag deprecated. Use '--genome rel-check'.\n");
+ logprint("Note: --rel-check flag deprecated. Use \"--genome rel-check\".\n");
genome_modifier |= GENOME_REL_CHECK;
goto main_param_zero;
} else if (!memcmp(argptr2, "ecessive", 9)) {
@@ -10861,7 +10735,7 @@ int32_t main(int32_t argc, char** argv) {
sprintf(g_logbuf, "Error: --recessive conflicts with a --%s modifier.\n", (glm_modifier & GLM_LOGISTIC)? "logistic" : "linear");
goto main_ret_INVALID_CMDLINE_2A;
}
- logprint("Note: --recessive flag deprecated. Use e.g. '--linear recessive' (and\n'--condition-list <filename> recessive' to change covariate coding).\n");
+ logprint("Note: --recessive flag deprecated. Use e.g. \"--linear recessive\" (and\n\"--condition-list <filename> recessive\" to change covariate coding).\n");
glm_modifier |= GLM_RECESSIVE | GLM_CONDITION_RECESSIVE;
glm_xchr_model = 0;
goto main_param_zero;
@@ -10932,7 +10806,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: Conflicting --r/--r2 modifiers.\n");
goto main_ret_INVALID_CMDLINE;
} else if (ld_info.modifier & LD_MATRIX_SPACES) {
- logerrprint("Error: --r/--r2 'bin{4}' and 'spaces' modifiers cannot be used together.\n");
+ logerrprint("Error: --r/--r2 'bin{,4}' and 'spaces' modifiers cannot be used together.\n");
goto main_ret_INVALID_CMDLINE;
}
ld_info.modifier |= LD_MATRIX_BIN;
@@ -10943,7 +10817,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: Conflicting --r/--r2 modifiers.\n");
goto main_ret_INVALID_CMDLINE;
} else if (ld_info.modifier & LD_MATRIX_SPACES) {
- logerrprint("Error: --r/--r2 'bin{4}' and 'spaces' modifiers cannot be used together.\n");
+ logerrprint("Error: --r/--r2 'bin{,4}' and 'spaces' modifiers cannot be used together.\n");
goto main_ret_INVALID_CMDLINE;
}
ld_info.modifier |= LD_MATRIX_BIN4;
@@ -10954,7 +10828,7 @@ int32_t main(int32_t argc, char** argv) {
if (ld_info.modifier & (LD_INTER_CHR | LD_INPHASE | LD_DX | LD_WITH_FREQS)) {
goto main_r2_matrix_conflict;
} else if (ld_info.modifier & (LD_MATRIX_BIN | LD_MATRIX_BIN4)) {
- logerrprint("Error: --r/--r2 'bin{4}' and 'spaces' modifiers cannot be used together.\n");
+ logerrprint("Error: --r/--r2 'bin{,4}' and 'spaces' modifiers cannot be used together.\n");
goto main_ret_INVALID_CMDLINE;
}
ld_info.modifier |= LD_MATRIX_SPACES;
@@ -11034,7 +10908,7 @@ int32_t main(int32_t argc, char** argv) {
if (excludename) {
misc_flags |= MISC_EXCLUDE_RANGE;
}
- logprint("Note: --range flag deprecated. Use e.g. '--extract range <filename>'.\n");
+ logprint("Note: --range flag deprecated. Use e.g. \"--extract range <filename>\".\n");
goto main_param_zero;
} else {
goto main_ret_INVALID_CMDLINE_UNRECOGNIZED;
@@ -11078,7 +10952,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --snp cannot be used with --from-bp/-kb/-mb.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if ((!are_all_words_zero(chrom_info.chrom_mask, CHROM_MASK_INITIAL_WORDS)) || chrom_info.incl_excl_name_stack) {
- logerrprint("Error: --snp cannot be used with --autosome{-xy} or --{not-}chr.\n");
+ logerrprint("Error: --snp cannot be used with --autosome{,-xy} or --{,not-}chr.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if (markername_snp) {
logerrprint("Error: --snp cannot be used with --exclude-snp.\n");
@@ -11254,7 +11128,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_INVALID_CMDLINE_WWA;
}
if ((!simulate_controls) && (!simulate_cases)) {
- logerrprint("Error: '--simulate-ncases 0' cannot be used with '--simulate-ncontrols 0'.\n");
+ logerrprint("Error: \"--simulate-ncases 0\" cannot be used with \"--simulate-ncontrols 0\".\n");
goto main_ret_INVALID_CMDLINE;
}
} else if (!memcmp(argptr2, "imulate-prevalence", 19)) {
@@ -11297,7 +11171,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --simulate-tags cannot be used with --simulate-haps.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --simulate-haps flag deprecated. Use e.g. '--simulate haps'.\n");
+ logprint("Note: --simulate-haps flag deprecated. Use e.g. \"--simulate haps\".\n");
simulate_flags |= SIMULATE_HAPS;
goto main_param_zero;
} else if (!memcmp(argptr2, "imulate-tags", 13)) {
@@ -11305,7 +11179,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --simulate-tags cannot be used with --simulate-haps.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --simulate-tags flag deprecated. Use e.g. '--simulate tags'.\n");
+ logprint("Note: --simulate-tags flag deprecated. Use e.g. \"--simulate tags\".\n");
simulate_flags |= SIMULATE_TAGS;
goto main_param_zero;
} else if (!memcmp(argptr2, "ex", 3)) {
@@ -11319,7 +11193,7 @@ int32_t main(int32_t argc, char** argv) {
sprintf(g_logbuf, "Error: --sex conflicts with a --%s modifier.\n", (glm_modifier & GLM_LOGISTIC)? "logistic" : "linear");
goto main_ret_INVALID_CMDLINE_2A;
}
- logprint("Note: --sex flag deprecated. Use e.g. '--linear sex'.\n");
+ logprint("Note: --sex flag deprecated. Use e.g. \"--linear sex\".\n");
glm_modifier |= GLM_SEX;
}
goto main_param_zero;
@@ -11328,9 +11202,9 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --standard-beta must be used with --linear or --dosage.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- // '--linear standard-beta' is ALSO deprecated now for plink2's
+ // "--linear standard-beta" is ALSO deprecated now for plink2's
// --{covar-}variance-normalize, so this note is pointless.
- // logprint("Note: --standard-beta flag deprecated. Use e.g. '--linear standard-beta'.\n");
+ // logprint("Note: --standard-beta flag deprecated. Use e.g. \"--linear standard-beta\".\n");
glm_modifier |= GLM_STANDARD_BETA;
goto main_param_zero;
} else if (!memcmp(argptr2, "et-table", 9)) {
@@ -11346,7 +11220,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --set-test must be used with --set/--make-set.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --set-test flag deprecated. Use e.g. '--assoc perm set-test'.\n");
+ logprint("Note: --set-test flag deprecated. Use e.g. \"--assoc perm set-test\".\n");
if (calculation_type & CALC_MODEL) {
model_modifier |= MODEL_SET_TEST;
}
@@ -11456,7 +11330,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --set-by-all must be used with --{fast-}epistasis.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --set-by-all flag deprecated. Use e.g. '--fast-epistasis set-by-all'.\n");
+ logprint("Note: --set-by-all flag deprecated. Use e.g. \"--fast-epistasis set-by-all\".\n");
epi_info.modifier |= EPI_SET_BY_ALL;
goto main_param_zero;
} else if (!memcmp(argptr2, "nps-only", 9)) {
@@ -11652,7 +11526,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --score-no-mean-imputation cannot be used with --score 'center'\nmodifier.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --score-no-mean-imputation flag deprecated. Use e.g.\n'--score ... no-mean-imputation'.\n");
+ logprint("Note: --score-no-mean-imputation flag deprecated. Use e.g.\n\"--score ... no-mean-imputation\".\n");
score_info.modifier |= SCORE_NO_MEAN_IMPUTATION;
goto main_param_zero;
} else if (!memcmp(argptr2, "et-me-missing", 14)) {
@@ -11675,7 +11549,7 @@ int32_t main(int32_t argc, char** argv) {
}
} else {
if (ld_info.modifier & LD_SHOW_TAGS_LIST_ALL) {
- logerrprint("Error: --list-all cannot be used with '--show-tags all'.\n");
+ logerrprint("Error: --list-all cannot be used with \"--show-tags all\".\n");
goto main_ret_INVALID_CMDLINE_A;
}
ld_info.modifier |= LD_SHOW_TAGS_LIST_ALL;
@@ -11735,7 +11609,7 @@ int32_t main(int32_t argc, char** argv) {
known_procs = 0;
}
} else if (!memcmp(argptr2, "ab", 3)) {
- logprint("Note: --tab flag deprecated. Use '--recode tab ...'.\n");
+ logprint("Note: --tab flag deprecated. Use \"--recode tab ...\".\n");
if (recode_modifier & RECODE_DELIMX) {
logerrprint("Error: Multiple --recode delimiter modifiers.\n");
goto main_ret_INVALID_CMDLINE_A;
@@ -11743,7 +11617,7 @@ int32_t main(int32_t argc, char** argv) {
recode_modifier |= RECODE_TAB;
goto main_param_zero;
} else if (!memcmp(argptr2, "ranspose", 9)) {
- logprint("Note: --transpose flag deprecated. Use '--recode transpose ...'.\n");
+ logprint("Note: --transpose flag deprecated. Use \"--recode transpose ...\".\n");
if (recode_modifier & RECODE_LGEN) {
logerrprint("Error: --recode 'transpose' and 'lgen' modifiers cannot be used together.\n");
goto main_ret_INVALID_CMDLINE_A;
@@ -11808,7 +11682,7 @@ int32_t main(int32_t argc, char** argv) {
load_rare |= LOAD_RARE_TPED;
} else if (!memcmp(argptr2, "o", 2)) {
if ((!are_all_words_zero(chrom_info.chrom_mask, CHROM_MASK_INITIAL_WORDS)) || chrom_info.incl_excl_name_stack) {
- logerrprint("Error: --to cannot be used with --autosome{-xy} or --{not-}chr.\n");
+ logerrprint("Error: --to cannot be used with --autosome{,-xy} or --{,not-}chr.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if (markername_snp) {
logerrprint("Error: --to cannot be used with --snp.\n");
@@ -11884,7 +11758,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --trend cannot be used with --model dom/rec/gen.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --trend flag deprecated. Use '--model trend-only ...'.\n");
+ logprint("Note: --trend flag deprecated. Use \"--model trend-only ...\".\n");
model_modifier |= MODEL_PTREND | MODEL_TRENDONLY;
calculation_type |= CALC_MODEL;
goto main_param_zero;
@@ -11971,7 +11845,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --test-all must be used with --linear or --logistic.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --test-all flag deprecated. Use '--tests all'.\n");
+ logprint("Note: --test-all flag deprecated. Use \"--tests all\".\n");
glm_modifier |= GLM_TEST_ALL;
goto main_param_zero;
} else if (!memcmp(argptr2, "wolocus", 8)) {
@@ -12019,7 +11893,7 @@ int32_t main(int32_t argc, char** argv) {
} else if (!strcmp(argv[cur_arg + uii], "midp")) {
testmiss_modifier |= TESTMISS_MIDP;
} else if (!strcmp(argv[cur_arg + uii], "mperm")) {
- logerrprint("Error: Improper --test-missing mperm syntax. (Use '--test-missing\nmperm=[value]'.)\n");
+ logerrprint("Error: Improper --test-missing mperm syntax. (Use \"--test-missing\nmperm=<value>\".)\n");
goto main_ret_INVALID_CMDLINE;
} else {
sprintf(g_logbuf, "Error: Invalid --test-missing parameter '%s'.\n", argv[cur_arg + uii]);
@@ -12107,7 +11981,7 @@ int32_t main(int32_t argc, char** argv) {
} else if (!strcmp(argv[cur_arg + uii], "set-test")) {
family_info.tdt_modifier |= TDT_SET_TEST;
} else if (!strcmp(argv[cur_arg + uii], "mperm")) {
- logerrprint("Error: Improper --tdt mperm syntax. (Use '--tdt mperm=[value]'.)\n");
+ logerrprint("Error: Improper --tdt mperm syntax. (Use \"--tdt mperm=<value>\".)\n");
goto main_ret_INVALID_CMDLINE;
} else {
sprintf(g_logbuf, "Error: Invalid --tdt parameter '%s'.\n", argv[cur_arg + uii]);
@@ -12170,7 +12044,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --tag-mode2 must be used with --show-tags.\n");
goto main_ret_INVALID_CMDLINE_A;
} else if (!(ld_info.show_tags_fname)) {
- logerrprint("Error: --tag-mode2 cannot be used with '--show-tags all'.\n");
+ logerrprint("Error: --tag-mode2 cannot be used with \"--show-tags all\".\n");
goto main_ret_INVALID_CMDLINE_A;
}
ld_info.modifier |= LD_SHOW_TAGS_MODE2;
@@ -12431,7 +12305,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --unbounded must be used with --genome.\n");
goto main_ret_INVALID_CMDLINE_A;
}
- logprint("Note: --unbounded flag deprecated. Use '--genome unbounded'.\n");
+ logprint("Note: --unbounded flag deprecated. Use \"--genome unbounded\".\n");
genome_modifier |= GENOME_IBD_UNBOUNDED;
goto main_param_zero;
} else {
@@ -12631,7 +12505,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_INVALID_CMDLINE_A;
}
if ((calculation_type & CALC_FREQ) && (misc_flags & MISC_FREQ_COUNTS)) {
- logerrprint("Error: --within cannot be used with '--freq counts'.\n");
+ logerrprint("Error: --within cannot be used with \"--freq counts\".\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (enforce_param_ct_range(param_ct, argv[cur_arg], 1, 2)) {
@@ -12686,7 +12560,7 @@ int32_t main(int32_t argc, char** argv) {
logerrprint("Error: --with-reference must be used with --recode lgen.\n");
goto main_ret_INVALID_CMDLINE;
}
- logprint("Note: --with-reference flag deprecated. Use '--recode lgen-ref' instead.\n");
+ logprint("Note: --with-reference flag deprecated. Use \"--recode lgen-ref\" instead.\n");
recode_modifier += RECODE_LGEN_REF - RECODE_LGEN;
goto main_param_zero;
} else if (!memcmp(argptr2, "rite-covar", 11)) {
@@ -12730,7 +12604,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_INVALID_CMDLINE_A;
}
set_info.modifier |= SET_R2_WRITE;
- logprint("Note: --write-set-r2 flag deprecated. Use '--set-r2 write'.\n");
+ logprint("Note: --write-set-r2 flag deprecated. Use \"--set-r2 write\".\n");
goto main_param_zero;
} else if (!memcmp(argptr2, "ith-freqs", 10)) {
if (!(calculation_type & CALC_LD)) {
@@ -12741,12 +12615,12 @@ int32_t main(int32_t argc, char** argv) {
if (ld_info.modifier & (LD_MATRIX_SHAPEMASK | LD_MATRIX_BIN | LD_MATRIX_BIN4 | LD_MATRIX_SPACES)) {
goto main_r2_matrix_conflict;
}
- logprint("Note: --with-freqs flag deprecated. Use e.g. '--r2 with-freqs'.\n");
+ logprint("Note: --with-freqs flag deprecated. Use e.g. \"--r2 with-freqs\".\n");
goto main_param_zero;
} else if (!memcmp(argptr2, "rite-dosage", 12)) {
if (!(dosage_info.modifier & DOSAGE_GLM)) {
if (dosage_info.modifier & DOSAGE_OCCUR) {
- logerrprint("Error: --write-dosage cannot be used with '--dosage occur'.\n");
+ logerrprint("Error: --write-dosage cannot be used with \"--dosage occur\".\n");
} else if (dosage_info.modifier & DOSAGE_SCORE) {
logerrprint("Error: --write-dosage cannot be used with --score.\n");
} else {
@@ -12902,7 +12776,7 @@ int32_t main(int32_t argc, char** argv) {
goto main_ret_INVALID_CMDLINE;
}
if (dist_calc_type & DISTANCE_IBS) {
- logerrprint("Error: --ibs-matrix cannot be used with '--distance ibs'.\n");
+ logerrprint("Error: --ibs-matrix cannot be used with \"--distance ibs\".\n");
goto main_ret_INVALID_CMDLINE_A;
}
if (read_genome_fname && (cluster.ppc == 0.0)) {
=====================================
plink_calc.c
=====================================
@@ -3193,478 +3193,6 @@ void normalize_phenos(double* new_phenos, uint32_t sample_ct, uintptr_t* sample_
}
}
-/*
-int32_t calc_regress_pcs(char* evecname, uint32_t regress_pcs_modifier, uint32_t max_pcs, FILE* bedfile, uintptr_t bed_offset, uint32_t marker_ct, uintptr_t unfiltered_marker_ct, uintptr_t* marker_exclude, uintptr_t* marker_reverse, char* marker_ids, uintptr_t max_marker_id_len, char** marker_allele_ptrs, Chrom_info* chrom_info_ptr, uint32_t* marker_pos, uintptr_t sample_ct, uintptr_t unfiltered_sample_ct, uintptr_t* sample_exclude, char* sample_ids, uintptr_t max_sample_id_len, uintptr_t* sex_nm, uintptr_t* sex_male, double* pheno_d, double missing_phenod, char* outname, char* outname_end, uint32_t hh_exists) {
- FILE* outfile = nullptr;
- FILE* evecfile = nullptr;
- unsigned char* bigstack_mark = g_bigstack_base;
- uintptr_t* sample_include2 = nullptr;
- uintptr_t* sample_male_include2 = nullptr;
- uintptr_t unfiltered_sample_ct4 = (unfiltered_sample_ct + 3) / 4;
- uintptr_t unfiltered_sample_ctv2 = QUATERCT_TO_ALIGNED_WORDCT(unfiltered_sample_ct);
- uintptr_t sample_ctv2 = QUATERCT_TO_ALIGNED_WORDCT(sample_ct);
- uintptr_t marker_uidx = 0;
- uint32_t pc_ct = 0;
- uint32_t pct = 1;
- uint32_t is_eigenvec = 0; // GCTA .eigenvec format instead of SMARTPCA .evec?
- // er, this external file requirement is silly, we should replicate the most
- // common SMARTPCA options to avoid creating a usability headache (while
- // still supporting SMARTPCA import for power users)
-
- uint32_t chrom_end = 0;
- uint32_t chrom_fo_idx = 0;
- uint32_t regress_pcs_sex_specific = regress_pcs_modifier & REGRESS_PCS_SEX_SPECIFIC;
- uint32_t regress_pcs_clip = regress_pcs_modifier & REGRESS_PCS_CLIP;
- int32_t retval = 0;
- char wbuf[32];
- uintptr_t pc_ct_p1; // plus 1 to account for intercept
- double* pc_matrix;
- double* pc_orig_prod_sums; // pc_ct_p1 * pc_ct_p1, upper triangle filled
- double* pc_prod_sums; // (X'X)^{-1}
- double* x_prime_y; // X'Y
- double* beta_vec; // (X'X)^{-1}X'Y
- double* residual_vec;
- uintptr_t marker_idx;
- uintptr_t sample_uidx;
- uintptr_t sample_idx;
- uintptr_t* loadbuf_raw;
- uintptr_t* loadbuf;
- uintptr_t* ulptr;
- uintptr_t* ulptr_end;
- uint32_t* missing_cts;
- char* bufptr;
- char* id_buf;
- uintptr_t cur_word;
- uintptr_t ulii;
- uintptr_t uljj;
- uintptr_t ulkk;
- uint32_t is_haploid;
- uint32_t is_x;
- uint32_t is_y;
- uint32_t uii;
- char* sample_id_ptr;
- MATRIX_INVERT_BUF1_TYPE* inv_1d_buf;
- double* dbl_2d_buf;
- double dxx;
- if (bigstack_alloc_ul(unfiltered_sample_ctv2, &loadbuf_raw) ||
- bigstack_alloc_ul(sample_ctv2, &loadbuf) ||
- bigstack_alloc_ui(sample_ct, &missing_cts) ||
- bigstack_alloc_c(max_sample_id_len, &id_buf)) {
- goto calc_regress_pcs_ret_NOMEM;
- }
- if (alloc_collapsed_haploid_filters(sample_exclude, sex_male, unfiltered_sample_ct, sample_ct, hh_exists, 0, &sample_include2, &sample_male_include2)) {
- goto calc_regress_pcs_ret_NOMEM;
- }
-
- // try unaltered filename. If that fails and the unaltered filename didn't
- // have an .evec or .eigenvec extension, then also try appending .evec and
- // appending .eigenvec.
- evecfile = fopen(evecname, "r");
- if (!evecfile) {
- ulii = strlen(evecname);
- if (((ulii >= 5) && (!memcmp(".evec", &(evecname[ulii - 5]), 5))) || ((ulii >= 9) && (!memcmp(".eigenvec", &(evecname[ulii - 9]), 9)))) {
- goto calc_regress_pcs_ret_OPEN_FAIL;
- }
- strcpy(&(evecname[ulii]), ".evec");
- evecfile = fopen(evecname, "r");
- if (!evecfile) {
- strcpy(&(evecname[ulii]), ".eigenvec");
- if (fopen_checked(evecname, "r", &evecfile)) {
- goto calc_regress_pcs_ret_OPEN_FAIL;
- }
- }
- }
-
- g_textbuf[MAXLINELEN - 7] = ' ';
- g_textbuf[MAXLINELEN - 1] = ' ';
- if (!fgets(g_textbuf, MAXLINELEN - 6, evecfile)) {
- if (feof(evecfile)) {
- goto calc_regress_pcs_ret_INVALID_FORMAT_2G;
- } else {
- goto calc_regress_pcs_ret_READ_FAIL;
- }
- }
- if (!g_textbuf[MAXLINELEN - 7]) {
- logerrprint("Error: Excessively long line in .evec/.eigenvec file.\n");
- goto calc_regress_pcs_ret_INVALID_FORMAT;
- }
- bufptr = skip_initial_spaces(g_textbuf);
- if (no_more_tokens_kns(bufptr)) {
- goto calc_regress_pcs_ret_INVALID_FORMAT_2G;
- }
- if (memcmp(bufptr, "#eigvals:", 9)) {
- is_eigenvec = 1;
- bufptr = next_token(bufptr);
- }
- bufptr = next_token(bufptr);
- while ((!no_more_tokens_kns(bufptr)) && ((*bufptr == '-') || ((*bufptr >= '0') && (*bufptr <= '9')))) {
- pc_ct++;
- bufptr = next_token(bufptr);
- }
- if (!pc_ct) {
- goto calc_regress_pcs_ret_INVALID_FORMAT_2G;
- }
- if (pc_ct > max_pcs) {
- sprintf(g_logbuf, "%svec format detected. Regressing on %d PC%s (out of %d).\n", is_eigenvec? "GCTA .eigen" : "SMARTPCA .e", max_pcs, (max_pcs == 1)? "" : "s", pc_ct);
- pc_ct = max_pcs;
- } else {
- sprintf(g_logbuf, "%svec format detected. Regressing on %d principal component%s.\n", is_eigenvec? "GCTA .eigen" : "SMARTPCA .e", pc_ct, (pc_ct == 1)? "" : "s");
- }
- logprintb();
- pc_ct_p1 = pc_ct + 1;
- if (bigstack_alloc_d(pc_ct_p1 * sample_ct, &pc_matrix) ||
- bigstack_alloc_d(pc_ct_p1 * pc_ct_p1, &pc_orig_prod_sums) ||
- bigstack_alloc_d(pc_ct_p1 * pc_ct_p1, &pc_prod_sums) ||
- bigstack_alloc_d(pc_ct_p1, &x_prime_y) ||
- bigstack_alloc_d(pc_ct_p1, &beta_vec) ||
- bigstack_alloc_d(pc_ct_p1, &residual_vec) ||
- bigstack_alloc_d(pc_ct_p1 * pc_ct_p1, &dbl_2d_buf)) {
- goto calc_regress_pcs_ret_NOMEM;
- }
- inv_1d_buf = (MATRIX_INVERT_BUF1_TYPE*)bigstack_alloc(pc_ct_p1 * MATRIX_INVERT_BUF1_ELEM_ALLOC);
- if (!inv_1d_buf) {
- goto calc_regress_pcs_ret_NOMEM;
- }
-
- if (is_eigenvec) {
- sample_idx = 0;
- while (1) {
- // todo: validate, and perhaps permute, sample IDs
- bufptr = next_token_mult(skip_initial_spaces(g_textbuf), 2);
- for (uii = 0; uii < pc_ct; uii++) {
- if (no_more_tokens_kns(bufptr)) {
- goto calc_regress_pcs_ret_INVALID_FORMAT_2G;
- }
- if (scan_double(bufptr, &(pc_matrix[uii * sample_ct + sample_idx]))) {
- goto calc_regress_pcs_ret_INVALID_FORMAT_2G;
- }
- bufptr = next_token(bufptr);
- }
- pc_matrix[pc_ct * sample_ct + sample_idx] = 1.0; // intercept
- if (++sample_idx >= sample_ct) {
- break;
- }
- if (!fgets(g_textbuf, MAXLINELEN, evecfile)) {
- if (feof(evecfile)) {
- sprintf(g_logbuf, "Error: Fewer %s in .eigenvec file than expected.\n", g_species_plural);
- goto calc_regress_pcs_ret_INVALID_FORMAT_3;
- } else {
- goto calc_regress_pcs_ret_READ_FAIL;
- }
- }
- }
- } else {
- for (sample_idx = 0; sample_idx < sample_ct; sample_idx++) {
- if (!fgets(g_textbuf, MAXLINELEN, evecfile)) {
- if (feof(evecfile)) {
- sprintf(g_logbuf, "Error: Fewer %s in .evec file than expected.\n", g_species_plural);
- goto calc_regress_pcs_ret_INVALID_FORMAT_3;
- } else {
- goto calc_regress_pcs_ret_READ_FAIL;
- }
- }
- bufptr = next_token(skip_initial_spaces(g_textbuf));
- for (uii = 0; uii < pc_ct; uii++) {
- if (no_more_tokens_kns(bufptr)) {
- goto calc_regress_pcs_ret_INVALID_FORMAT_2G;
- }
- if (scan_double(bufptr, &(pc_matrix[uii * sample_ct + sample_idx]))) {
- goto calc_regress_pcs_ret_INVALID_FORMAT_2G;
- }
- bufptr = next_token(bufptr);
- }
- pc_matrix[pc_ct * sample_ct + sample_idx] = 1.0;
- }
- }
- if (fgets(g_textbuf, MAXLINELEN, evecfile)) {
- if (!no_more_tokens_kns(skip_initial_spaces(g_textbuf))) {
- sprintf(g_logbuf, "Error: More %s in .e%svec file than expected.\n", g_species_plural, is_eigenvec? "igen" : "");
- goto calc_regress_pcs_ret_INVALID_FORMAT_3;
- }
- }
- fclose_null(&evecfile);
-
- // precalculate (X'X)
- // er, check if there's a faster way to do this...
- fill_double_zero(pc_ct_p1 * pc_ct_p1, pc_orig_prod_sums);
- for (sample_idx = 0; sample_idx < sample_ct; sample_idx++) {
- for (ulii = 0; ulii < pc_ct_p1; ulii++) {
- for (uljj = ulii; uljj < pc_ct_p1; uljj++) {
- pc_orig_prod_sums[ulii * pc_ct_p1 + uljj] += pc_matrix[ulii * sample_ct + sample_idx] * pc_matrix[uljj * sample_ct + sample_idx];
- }
- }
- }
-
- fill_uint_zero(sample_ct, missing_cts);
- refresh_chrom_info(chrom_info_ptr, marker_uidx, &chrom_end, &chrom_fo_idx, &is_x, &is_y, &is_haploid);
- // .gen instead of .bgen because latter actually has lower precision(!) (15
- // bits instead of the ~20 you get from printf("%g", dxx)), and there's no
- // need for repeated random access.
- strcpy(outname_end, ".gen");
- if (fopen_checked(outname, "w", &outfile)) {
- goto calc_regress_pcs_ret_OPEN_FAIL;
- }
- if (fseeko(bedfile, bed_offset, SEEK_SET)) {
- goto calc_regress_pcs_ret_READ_FAIL;
- }
- for (marker_idx = 0; marker_idx < marker_ct; marker_uidx++, marker_idx++) {
- if (IS_SET(marker_exclude, marker_uidx)) {
- marker_uidx = next_unset_ul_unsafe(marker_exclude, marker_uidx);
- if (fseeko(bedfile, bed_offset + ((uint64_t)marker_uidx) * unfiltered_sample_ct4, SEEK_SET)) {
- goto calc_regress_pcs_ret_READ_FAIL;
- }
- }
- if (marker_uidx >= chrom_end) {
- chrom_fo_idx++;
- refresh_chrom_info(chrom_info_ptr, marker_uidx, &chrom_end, &chrom_fo_idx, &is_x, &is_y, &is_haploid);
- }
- if (load_and_collapse(unfiltered_sample_ct, sample_ct, sample_exclude, IS_SET(marker_reverse, marker_uidx), bedfile, loadbuf_raw, loadbuf)) {
- goto calc_regress_pcs_ret_READ_FAIL;
- }
- if (is_haploid && hh_exists) {
- haploid_fix(hh_exists, sample_include2, sample_male_include2, sample_ct, is_x, is_y, (unsigned char*)loadbuf);
- }
- bufptr = chrom_name_write(chrom_info_ptr, get_variant_chrom(chrom_info_ptr, marker_uidx), g_textbuf);
- *bufptr++ = ' ';
- fwrite(g_textbuf, 1, bufptr - g_textbuf, outfile);
- fputs(&(marker_ids[marker_uidx * max_marker_id_len]), outfile);
- g_textbuf[0] = ' ';
- bufptr = uint32toa_x(marker_pos[marker_uidx], ' ', &(g_textbuf[1]));
- fwrite(g_textbuf, 1, bufptr - g_textbuf, outfile);
- fputs(marker_allele_ptrs[2 * marker_uidx], outfile);
- putc_unlocked(' ', outfile);
- if (fputs_checked(marker_allele_ptrs[2 * marker_uidx + 1], outfile)) {
- goto calc_regress_pcs_ret_WRITE_FAIL;
- }
- memcpy(pc_prod_sums, pc_orig_prod_sums, pc_ct_p1 * pc_ct_p1 * sizeof(double));
- fill_double_zero(pc_ct_p1, x_prime_y);
- sample_idx = 0;
- sample_uidx = BITCT2; // repurposed as end-of-word
- ulptr = loadbuf;
- ulptr_end = &(loadbuf[sample_ct / BITCT2]);
- while (1) {
- while (ulptr < ulptr_end) {
- cur_word = *loadbuf++;
- for (; sample_idx < sample_uidx; sample_idx++) {
- ulii = cur_word & 3;
- if (ulii != 1) {
- ulii = ulii - (ulii >> 1);
- for (uljj = 0; uljj < pc_ct_p1; uljj++) {
- x_prime_y[uljj] += pc_matrix[uljj * sample_ct + sample_idx] * ulii;
- }
- } else {
- missing_cts[sample_idx] += 1;
- for (uljj = 0; uljj < pc_ct_p1; uljj++) {
- for (ulkk = uljj; ulkk < pc_ct_p1; ulkk++) {
- pc_prod_sums[uljj * pc_ct_p1 + ulkk] -= pc_matrix[uljj * sample_ct + sample_idx] * pc_matrix[ulkk * sample_ct + sample_idx];
- }
- }
- }
- cur_word >>= 2;
- }
- sample_uidx += BITCT2;
- }
- if (sample_idx == sample_ct) {
- break;
- }
- ulptr_end++;
- sample_uidx = sample_ct;
- }
- // last-minute update of lower triangle
- for (ulii = 1; ulii < pc_ct_p1; ulii++) {
- for (uljj = 0; uljj < ulii; uljj++) {
- pc_prod_sums[ulii * pc_ct_p1 + uljj] = pc_prod_sums[uljj * pc_ct_p1 + ulii];
- }
- }
- invert_matrix(pc_ct_p1, pc_prod_sums, inv_1d_buf, dbl_2d_buf);
- for (ulii = 0; ulii < pc_ct_p1; ulii++) {
- dxx = 0.0;
- for (uljj = 0; uljj < pc_ct_p1; uljj++) {
- dxx += pc_prod_sums[ulii * pc_ct_p1 + uljj] * x_prime_y[uljj];
- }
- beta_vec[ulii] = dxx;
- }
- wbuf[0] = ' ';
- sample_idx = 0;
- sample_uidx = BITCT2;
- ulptr = loadbuf;
- ulptr_end = &(loadbuf[sample_ct / BITCT2]);
- while (1) {
- while (ulptr < ulptr_end) {
- cur_word = *loadbuf++;
- for (; sample_idx < sample_uidx; sample_idx++) {
- ulii = cur_word & 3;
- if (ulii == 1) {
- fputs(" 0 0 0", outfile);
- } else {
- ulii = ulii - (ulii >> 1);
- dxx = 0.0;
- for (uljj = 0; uljj < pc_ct_p1; uljj++) {
- dxx += pc_matrix[uljj * sample_ct + sample_idx] * beta_vec[uljj];
- }
- dxx = (double)((intptr_t)ulii) - dxx;
- // now dxx is the residual, normally but not always in [0, 2]
- if (dxx < 1.0) {
- if (dxx < 0.0) {
- if (regress_pcs_clip) {
- fputs(" 1 0 0", outfile);
- } else {
- bufptr = dtoa_g(1.0 - dxx * 0.5, &(wbuf[1]));
- bufptr = memcpyl3a(bufptr, " 0 ");
- bufptr = dtoa_g(dxx * 0.5, bufptr);
- fwrite(wbuf, 1, bufptr - wbuf, outfile);
- }
- } else {
- bufptr = dtoa_gx(1.0 - dxx, ' ', &(wbuf[1]));
- bufptr = dtoa_g(dxx, bufptr);
- bufptr = memcpya(bufptr, " 0", 2);
- fwrite(wbuf, 1, bufptr - wbuf, outfile);
- }
- } else {
- if (dxx > 2.0) {
- if (regress_pcs_clip) {
- fputs(" 0 0 1", outfile);
- } else {
- bufptr = dtoa_g(1.0 - dxx * 0.5, &(wbuf[1]));
- bufptr = memcpyl3a(bufptr, " 0 ");
- bufptr = dtoa_g(dxx * 0.5, bufptr);
- fwrite(wbuf, 1, bufptr - wbuf, outfile);
- }
- } else {
- bufptr = memcpya(&(wbuf[1]), "0 ", 2);
- bufptr = dtoa_gx(2.0 - dxx, ' ', bufptr);
- bufptr = dtoa_g(dxx - 1.0, bufptr);
- fwrite(wbuf, 1, bufptr - wbuf, outfile);
- }
- }
- }
- }
- sample_uidx += BITCT2;
- }
- if (sample_idx == sample_ct) {
- break;
- }
- ulptr_end++;
- sample_uidx = sample_ct;
- }
-
- if (putc_checked('\n', outfile)) {
- goto calc_regress_pcs_ret_WRITE_FAIL;
- }
- if (marker_idx * 100LLU >= ((uint64_t)pct * marker_ct)) {
- pct = ((uint64_t)marker_idx * 100) / marker_ct;
- printf("\r%d%%", pct++);
- fflush(stdout);
- }
- }
- if (fclose_null(&outfile)) {
- goto calc_regress_pcs_ret_WRITE_FAIL;
- }
- strcpy(outname_end, ".sample");
- if (fopen_checked(outname, "w", &outfile)) {
- goto calc_regress_pcs_ret_OPEN_FAIL;
- }
- if (fputs_checked("ID_1 ID_2 missing sex phenotype\n0 0 0 D P\n", outfile)) {
- goto calc_regress_pcs_ret_WRITE_FAIL;
- }
- // regress phenotype
- fill_double_zero(pc_ct_p1, x_prime_y);
- sample_uidx = 0;
- for (sample_idx = 0; sample_idx < sample_ct; sample_uidx++, sample_idx++) {
- next_unset_ul_unsafe_ck(sample_exclude, &sample_uidx);
- dxx = pheno_d[sample_uidx];
- for (ulii = 0; ulii < pc_ct_p1; ulii++) {
- x_prime_y[ulii] += pc_matrix[ulii * sample_ct + sample_idx] * dxx;
- }
- }
- for (ulii = 1; ulii < pc_ct_p1; ulii++) {
- for (uljj = 0; uljj < ulii; uljj++) {
- pc_orig_prod_sums[ulii * pc_ct_p1 + uljj] = pc_orig_prod_sums[uljj * pc_ct_p1 + ulii];
- }
- }
- invert_matrix(pc_ct_p1, pc_orig_prod_sums, inv_1d_buf, dbl_2d_buf);
- for (ulii = 0; ulii < pc_ct_p1; ulii++) {
- dxx = 0.0;
- for (uljj = 0; uljj < pc_ct_p1; uljj++) {
- dxx += pc_orig_prod_sums[ulii * pc_ct_p1 + uljj] * x_prime_y[uljj];
- }
- beta_vec[ulii] = dxx;
- }
-
- sample_uidx = 0;
- for (sample_idx = 0; sample_idx < sample_ct; sample_uidx++, sample_idx++) {
- next_unset_ul_unsafe_ck(sample_exclude, &sample_uidx);
- dxx = 0.0;
- for (ulii = 0; ulii < pc_ct_p1; ulii++) {
- dxx += pc_matrix[ulii * sample_ct + sample_idx] * beta_vec[ulii];
- }
- residual_vec[sample_idx] = pheno_d[sample_uidx] - dxx;
- }
-
- if (regress_pcs_modifier & REGRESS_PCS_NORMALIZE_PHENO) {
- if (regress_pcs_sex_specific) {
- normalize_phenos(residual_vec, sample_ct, sample_exclude, sex_nm, sex_male, 1);
- normalize_phenos(residual_vec, sample_ct, sample_exclude, sex_nm, sex_male, 2);
- normalize_phenos(residual_vec, sample_ct, sample_exclude, sex_nm, sex_male, 4);
- } else {
- normalize_phenos(residual_vec, sample_ct, sample_exclude, sex_nm, sex_male, 7);
- }
- }
-
- sample_uidx = 0;
- for (sample_idx = 0; sample_idx < sample_ct; sample_uidx++, sample_idx++) {
- next_unset_ul_unsafe_ck(sample_exclude, &sample_uidx);
- sample_id_ptr = &(sample_ids[sample_uidx * max_sample_id_len]);
- uii = strlen_se(sample_id_ptr);
- // todo: adjust pheno_d, double-check missing gender behavior
- fwrite(sample_id_ptr, 1, uii, outfile);
- putc_unlocked(' ', outfile);
- fputs(&(sample_id_ptr[uii + 1]), outfile);
- g_textbuf[0] = ' ';
- bufptr = dtoa_gx(((double)missing_cts[sample_uidx]) / (double)marker_ct, ' ', &(g_textbuf[1]));
- *bufptr = sexchar(sex_nm, sex_male, sample_uidx);
- bufptr[1] = ' ';
- bufptr = dtoa_gx(residual_vec[sample_idx], '\n', &(bufptr[2]));
- if (fwrite_checked(g_textbuf, bufptr - g_textbuf, outfile)) {
- goto calc_regress_pcs_ret_WRITE_FAIL;
- }
- }
- if (fclose_null(&outfile)) {
- goto calc_regress_pcs_ret_WRITE_FAIL;
- }
- *outname_end = '\0';
- putc_unlocked('\r', stdout);
- LOGPRINTF("Principal component regression residuals and %sphenotype Z-scores %s%s.gen and %s.sample.\n", regress_pcs_sex_specific? "sex-specific " : "", regress_pcs_sex_specific? "\nwritten to " : "written to\n", outname, outname);
- bigstack_reset(bigstack_mark);
- while (0) {
- calc_regress_pcs_ret_NOMEM:
- retval = RET_NOMEM;
- break;
- calc_regress_pcs_ret_OPEN_FAIL:
- retval = RET_OPEN_FAIL;
- break;
- calc_regress_pcs_ret_READ_FAIL:
- retval = RET_READ_FAIL;
- break;
- calc_regress_pcs_ret_WRITE_FAIL:
- retval = RET_WRITE_FAIL;
- break;
- calc_regress_pcs_ret_INVALID_FORMAT_3:
- logerrprintb();
- retval = RET_INVALID_FORMAT;
- break;
- calc_regress_pcs_ret_INVALID_FORMAT_2G:
- logerrprint("Error: Improperly formatted .evec file.\n");
- calc_regress_pcs_ret_INVALID_FORMAT:
- retval = RET_INVALID_FORMAT;
- break;
- }
- fclose_cond(evecfile);
- fclose_cond(outfile);
- return retval;
-}
-*/
-
static uintptr_t g_cg_sample1idx;
static uintptr_t g_cg_sample2idx;
static uintptr_t g_cg_sample1uidx;
=====================================
plink_calc.h
=====================================
@@ -55,8 +55,6 @@ int32_t ibs_test_calc(pthread_t* threads, char* read_dists_fname, uintptr_t unfi
int32_t groupdist_calc(pthread_t* threads, uint32_t unfiltered_sample_ct, uintptr_t* sample_exclude, uintptr_t sample_ct, uintptr_t groupdist_iters, uint32_t groupdist_d, uint32_t pheno_nm_ct, uint32_t pheno_ctrl_ct, uintptr_t* pheno_nm, uintptr_t* pheno_c);
-// int32_t calc_regress_pcs(char* evecname, uint32_t regress_pcs_modifier, uint32_t max_pcs, FILE* bedfile, uintptr_t bed_offset, uint32_t marker_ct, uintptr_t unfiltered_marker_ct, uintptr_t* marker_exclude, uintptr_t* marker_reverse, char* marker_ids, uintptr_t max_marker_id_len, char** marker_allele_ptrs, Chrom_info* chrom_info_ptr, uint32_t* marker_pos, uintptr_t sample_ct, uintptr_t unfiltered_sample_ct, uintptr_t* sample_exclude, char* sample_ids, uintptr_t max_sample_id_len, uintptr_t* sex_nm, uintptr_t* sex_male, double* pheno_d, double missing_phenod, char* outname, char* outname_end, uint32_t hh_exists);
-
int32_t calc_genome(pthread_t* threads, FILE* bedfile, uintptr_t bed_offset, uint32_t marker_ct, uintptr_t unfiltered_marker_ct, uintptr_t* marker_exclude, Chrom_info* chrom_info_ptr, uint32_t* marker_pos, double* set_allele_freqs, uint32_t* nchrobs, uintptr_t unfiltered_sample_ct, uintptr_t* sample_exclude, uintptr_t sample_ct, char* sample_ids, uint32_t plink_maxfid, uint32_t plink_maxiid, uintptr_t max_sample_id_len, char* paternal_ids, uintptr_t max_paternal_id_len, char* maternal_ids, uintptr_t max_maternal_id_len, uintptr_t* founder_info, uint32_t parallel_idx, uint32_t parallel_tot, char* outname, char* outname_end, int32_t nonfounders, uint64_t calculation_type, uint32_t genome_modifier, uint32_t ppc_gap, double min_pi_hat, double max_pi_hat, uintptr_t* pheno_nm, uintptr_t* pheno_c, Pedigree_rel_info pri, uint32_t skip_write);
int32_t rel_cutoff_batch(uint32_t load_grm_bin, char* grmname, char* outname, char* outname_end, Rel_info* relip);
=====================================
plink_common.h
=====================================
@@ -313,13 +313,12 @@
#define RET_INVALID_CMDLINE 5
#define RET_WRITE_FAIL 6
#define RET_READ_FAIL 7
-#define RET_HELP 8
-#define RET_THREAD_CREATE_FAIL 9
-#define RET_ALLELE_MISMATCH 10
-#define RET_NULL_CALC 11
-#define RET_ALL_SAMPLES_EXCLUDED 12
-#define RET_ALL_MARKERS_EXCLUDED 13
-#define RET_NETWORK 14
+#define RET_THREAD_CREATE_FAIL 8
+#define RET_ALLELE_MISMATCH 9
+#define RET_NULL_CALC 10
+#define RET_ALL_SAMPLES_EXCLUDED 11
+#define RET_ALL_MARKERS_EXCLUDED 12
+#define RET_NETWORK 13
#define LOAD_PHENO_LAST_COL 127
// for 2.0 -> 1.9 backports
@@ -410,8 +409,8 @@
#define CALC_GENOME 0x1000LLU
#define CALC_REGRESS_REL 0x2000LLU
#define CALC_LD_PRUNE 0x4000LLU
-#define CALC_REGRESS_PCS 0x8000LLU
-#define CALC_REGRESS_PCS_DISTANCE 0x10000LLU
+#define CALC_DFAM 0x8000LLU
+#define CALC_TUCC 0x10000LLU
#define CALC_MAKE_BED 0x20000LLU
#define CALC_RECODE 0x40000LLU
#define CALC_MERGE 0x80000LLU
@@ -453,8 +452,6 @@
#define CALC_WRITE_VAR_RANGES 0x80000000000000LLU
#define CALC_DUPVAR 0x100000000000000LLU
#define CALC_RPLUGIN 0x200000000000000LLU
-#define CALC_DFAM 0x400000000000000LLU
-#define CALC_TUCC 0x800000000000000LLU
#define CALC_ONLY_BIM (CALC_WRITE_SET | CALC_WRITE_SNPLIST | CALC_WRITE_VAR_RANGES | CALC_LIST_23_INDELS | CALC_MAKE_BIM | CALC_DUPVAR)
#define CALC_ONLY_FAM (CALC_MAKE_PERM_PHENO | CALC_WRITE_COVAR | CALC_MAKE_FAM)
// only room for 6 more basic commands before we need to switch from a single
@@ -584,10 +581,6 @@
#define SAMPLE_SORT_ASCII 4
#define SAMPLE_SORT_FILE 8
-#define REGRESS_PCS_NORMALIZE_PHENO 1
-#define REGRESS_PCS_SEX_SPECIFIC 2
-#define REGRESS_PCS_CLIP 4
-
#define HWE_MIDP 1
#define HWE_THRESH_MIDP 2
#define HWE_THRESH_ALL 4
=====================================
plink_help.c
=====================================
@@ -628,8 +628,8 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" --indep-pairphase <window size>['kb'] <step size (variant ct)> <r^2 thresh>\n"
" Generate a list of markers in approximate linkage equilibrium. With the\n"
" 'kb' modifier, the window size is in kilobase instead of variant count\n"
-" units. (Pre-'kb' space is optional, i.e. '--indep-pairwise 500 kb 5 0.5'\n"
-" and '--indep-pairwise 500kb 5 0.5' have the same effect.)\n"
+" units. (Pre-'kb' space is optional, i.e. \"--indep-pairwise 500 kb 5 0.5\"\n"
+" and \"--indep-pairwise 500kb 5 0.5\" have the same effect.)\n"
" Note that you need to rerun " PROG_NAME_CAPS " using --extract or --exclude on the\n"
" .prune.in/.prune.out file to apply the list to another computation.\n\n"
);
@@ -694,7 +694,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" the --hap... family of flags has not been reimplemented in PLINK 1.9 due to\n"
" poor phasing accuracy relative to other software; for now, we recommend\n"
" using BEAGLE instead of PLINK for case/control haplotype association\n"
-" analysis. (You can use '--recode beagle' to export data to BEAGLE 3.3.)\n"
+" analysis. (You can use \"--recode beagle\" to export data to BEAGLE 3.3.)\n"
" We apologize for the inconvenience, and plan to develop variants of the\n"
" --hap... flags which handle pre-phased data effectively.\n\n"
);
@@ -735,8 +735,8 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
help_print("distance-matrix\tibs-matrix\tmatrix", &help_ctrl, 1,
" --distance-matrix\n"
" --ibs-matrix\n"
-" These deprecated commands are equivalent to '--distance 1-ibs flat-missing\n"
-" square' and '--distance ibs flat-missing square', respectively, except that\n"
+" These deprecated commands are equivalent to \"--distance 1-ibs flat-missing\n"
+" square\" and \"--distance ibs flat-missing square\", respectively, except that\n"
" they generate space- instead of tab-delimited text matrices.\n\n"
);
help_print("make-rel", &help_ctrl, 1,
@@ -969,7 +969,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" derived from considering only members of one group to the regression\n"
" coefficient derived from considering only members of the other. By\n"
" default, the first covariate in the --covar file defines the groups; use\n"
-" e.g. '--gxe 3' to base them on the third covariate instead.\n\n"
+" e.g. \"--gxe 3\" to base them on the third covariate instead.\n\n"
);
help_print("linear\tlogistic\tperm\tmperm\tperm-count\tset-test\tgenotypic\thethom\tdominant\trecessive\tno-snp\thide-covar\tsex\tno-x-sex\tinteraction\tstandard-beta\tbeta", &help_ctrl, 1,
#ifndef NOLAPACK
@@ -1297,31 +1297,6 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" have tried to execute are logged to a file.)\n\n"
);
#endif
- /*
- help_print("regress-pcs\tregress-pcs-distance", &help_ctrl, 1,
-" --regress-pcs <.evec or .eigenvec filename> ['normalize-pheno']\n"
-" ['sex-specific'] ['clip'] [max PCs]\n"
-" Linear regression of phenotypes and genotypes on the given list of\n"
-" principal components (produced by SMARTPCA or GCTA). Output is currently a\n"
-" .gen + .sample fileset in the Oxford IMPUTE/SNPTEST v2 format.\n"
-" * The 'normalize-pheno' modifier converts all phenotype residuals to\n"
-" Z-scores. When combined with 'sex-specific', the Z-scores are evaluated\n"
-" separately by sex.\n"
-" * The 'clip' modifier clips out-of-range genotype residuals. Without it,\n"
-" they are represented as negative probabilities in the .gen file, which\n"
-" are invalid input for some programs.\n"
-" * By default, principal components beyond the 20th are ignored; change this\n"
-" by setting the max PCs parameter.\n\n"
- );
- help_print("regress-pcs\tdistance\tregress-pcs-distance", &help_ctrl, 1,
-" --regress-pcs-distance <.evec/.eigenvec file> ['normalize-pheno']\n"
-" ['sex-specific'] [max PCs]\n"
-" [{square | square0 | triangle}] [{gz | bin}] ['ibs']\n"
-" ['1-ibs'] ['allele-ct'] ['flat-missing']\n"
-" High-speed combination of --regress-pcs and --distance (no .gen + .sample\n"
-" fileset is written to disk).\n\n"
- );
- */
#ifndef STABLE_BUILD
help_print("cnv-make-map", &help_ctrl, 1,
" --cnv-make-map ['short']\n"
@@ -1447,7 +1422,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" Given diploid autosomes, the remaining modifiers indicate the absence of\n"
" the named non-autosomal chromosomes.\n"
" --cow/--dog/--horse/--mouse/--rice/--sheep : Shortcuts for those species.\n"
-" --autosome-num <value> : Alias for '--chr-set <value> no-y no-xy no-mt'.\n"
+" --autosome-num <value> : Alias for \"--chr-set <value> no-y no-xy no-mt\".\n"
);
help_print("cm-map\tzero-cms\tupdate-cm", &help_ctrl, 0,
" --cm-map <fname pattern> [chr] : Use SHAPEIT-format recombination maps to set\n"
@@ -1565,7 +1540,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" either missing from the file or don't have any of\n"
" the listed attributes. If some attribute names in\n"
" the list are preceded by '-', they are treated as\n"
-" 'negative match conditions' instead: variants with\n"
+" \"negative match conditions\" instead: variants with\n"
" at least one negative match attribute are removed.\n"
" The first character in the list cannot be a '-', due\n"
" to how command-line parsing works; add a comma in\n"
@@ -1576,7 +1551,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" Valid choices for humans are 0 (unplaced), 1-22, X, Y, XY,\n"
" and MT. Separate multiple chromosomes with spaces and/or\n"
" commas, and use a dash (no adjacent spaces permitted) to\n"
-" denote a range, e.g. '--chr 1-4, 22, xy'.\n"
+" denote a range, e.g. \"--chr 1-4, 22, xy\".\n"
" --not-chr <...> : Reverse of --chr (exclude variants on listed chromosomes).\n"
);
help_print("autosome\tautosome-xy\tchr\tnot-chr\tchr-excl", &help_ctrl, 0,
@@ -1605,7 +1580,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
);
help_print("snps\texclude-snps", &help_ctrl, 0,
" --snps <var IDs...> : Use IDs to specify variant range(s) to load or\n"
-" --exclude-snps <...> exclude. E.g. '--snps rs1111-rs2222, rs3333, rs4444'.\n"
+" --exclude-snps <...> exclude. E.g. \"--snps rs1111-rs2222, rs3333, rs4444\".\n"
);
help_print("thin\tthin-count", &help_ctrl, 0,
" --thin <p> : Randomly remove variants, retaining each with prob. p.\n"
@@ -1887,7 +1862,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
help_print("blocks\tblocks-max-kb\tblocks-min-maf\tblocks-strong-lowci\tblocks-strong-highci\tblocks-recomb-highci\tblocks-inform-frac\tld-window-kb", &help_ctrl, 0,
" --blocks-max-kb <kbs> : Set --blocks maximum haploblock span (def. 200).\n"
" --blocks-min-maf <cutoff> : Adjust --blocks MAF minimum (default 0.05).\n"
-" --blocks-strong-lowci <x> : Set --blocks 'strong LD' CI thresholds (defaults\n"
+" --blocks-strong-lowci <x> : Set --blocks \"strong LD\" CI thresholds (defaults\n"
" --blocks-strong-highci <x> 0.70 and 0.98).\n"
" --blocks-recomb-highci <x> : Set 'recombination' CI threshold (default 0.90).\n"
" --blocks-inform-frac <x> : Force haploblock <strong LD pairs>:<total\n"
@@ -1920,7 +1895,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
help_print("homozyg\thomozyg-match\tpool-size", &help_ctrl, 0,
" --homozyg-match <> : Set minimum concordance across jointly homozygous\n"
" variants for a pairwise allelic match to be declared.\n"
-" --pool-size <ct> : Set minimum size of pools in '--homozyg group' report.\n"
+" --pool-size <ct> : Set minimum size of pools in \"--homozyg group\" report.\n"
);
help_print("read-genome\tcluster\tneighbour\tneighbor", &help_ctrl, 0,
" --read-genome <fn> : Load --genome report for --cluster/--neighbour, instead\n"
@@ -1941,9 +1916,9 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" --match-type <f> : Refine interpretation of --match file. The --match-type\n"
" file is expected to be a single line with as many entries\n"
" as the --match file has covariates; '0' entries specify\n"
-" 'negative matches' (i.e. samples with equal covariate\n"
+" \"negative matches\" (i.e. samples with equal covariate\n"
" values cannot be in the same cluster), '1' entries specify\n"
-" 'positive matches' (default), and '-1' causes the\n"
+" \"positive matches\" (default), and '-1' causes the\n"
" corresponding covariate to be ignored.\n"
" --qmatch <f> [m] : Force all members of a cluster to have similar\n"
" --qt <fname> quantitative covariate values. The --qmatch file contains\n"
@@ -1987,7 +1962,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" * Note that, when --parameters is also present, the\n"
" indices refer to the terms remaining AFTER pruning by\n"
" --parameters.\n"
-" * You can use '--tests all' to include all terms.\n"
+" * You can use \"--tests all\" to include all terms.\n"
);
help_print("linear\tdosage\tvif", &help_ctrl, 0,
" --vif <max VIF> : Set VIF threshold for --linear multicollinearity check\n"
@@ -2113,7 +2088,7 @@ int32_t disp_help(uint32_t param_ct, char** argv) {
" 'SNP'). Only relevant with --extract.\n"
);
help_print("fast-epistasis\tepistasis\tgap\tepi1\tepi2", &help_ctrl, 0,
-" --gap <kbs> : Set '--fast-epistasis case-only' min. gap (default 1000).\n"
+" --gap <kbs> : Set \"--fast-epistasis case-only\" min. gap (default 1000).\n"
" --epi1 <p-value> : Set --{,fast-}epistasis reporting threshold (default\n"
" 5e-6 for 'boost', 1e-4 otherwise).\n"
" --epi2 <p-value> : Set threshold for contributing to SIG_E count (def. 0.01).\n"
=====================================
plink_misc.c
=====================================
@@ -582,8 +582,9 @@ int32_t apply_cm_map(char* cm_map_fname, char* cm_map_chrname, uintptr_t unfilte
goto apply_cm_map_ret_INVALID_FORMAT_2;
}
if (bp_new <= bp_old) {
- logerrprint("Error: bp coordinates in --cm-map file are not in increasing order.\n");
- goto apply_cm_map_ret_INVALID_FORMAT;
+ sprintf(g_logbuf, "Error: bp coordinates in --cm-map file are not in increasing order ('%d' on line %" PRIuPTR " is not larger than previous value '%d').\n", bp_new, line_idx, bp_old);
+ wordwrapb(0);
+ goto apply_cm_map_ret_INVALID_FORMAT_2;
}
bufptr2 = next_token_mult(bufptr, 2);
if (no_more_tokens_kns(bufptr2)) {
@@ -642,7 +643,6 @@ int32_t apply_cm_map(char* cm_map_fname, char* cm_map_chrname, uintptr_t unfilte
sprintf(g_logbuf, "Error: Line %" PRIuPTR " of --cm-map file has fewer tokens than expected.\n", line_idx);
apply_cm_map_ret_INVALID_FORMAT_2:
logerrprintb();
- apply_cm_map_ret_INVALID_FORMAT:
retval = RET_INVALID_FORMAT;
break;
}
=====================================
prettify.c
=====================================
@@ -41,9 +41,9 @@ char pathbuf[FNAMESIZE * 2 + 128];
void disp_usage(FILE* stream) {
fputs(
-" prettify {flag(s)...} [input filename] {output filename}\n\n"
+" prettify [flag(s)...] <input filename> [output filename]\n\n"
" -i, --inplace : Replace the input instead of writing to a new file.\n"
-" -s, --spacing [ct] : Set number of spaces between columns (default 2).\n"
+" -s, --spacing <ct> : Set number of spaces between columns (default 2).\n"
" -r, --ralign : Make right sides of columns line up, instead of left.\n"
" -l, --leading : Add space(s) before the first column.\n"
" -e, --extend-short : Use spaces to extend lines with fewer columns.\n"
@@ -55,7 +55,7 @@ void disp_usage(FILE* stream) {
, stream);
}
-void dispmsg(retval) {
+void dispmsg(int32_t retval) {
switch (retval) {
case RET_NOMEM:
fputs("\nError: Out of memory.\n", stderr);
@@ -184,7 +184,7 @@ int32_t scan_column_widths(FILE* infile, uintptr_t column_sep, uintptr_t** col_w
}
if (++cur_col_idx == max_col_ct) {
malloc_size *= 2;
- new_col_widths = realloc(col_widths, malloc_size);
+ new_col_widths = (uintptr_t*)realloc(col_widths, malloc_size);
if (!new_col_widths) {
goto scan_column_widths_ret_READ_FAIL;
}
@@ -602,7 +602,7 @@ int32_t main(int32_t argc, char** argv) {
while (0) {
main_ret_HELP:
fputs(
-"prettify v1.04 (21 Feb 2014) Christopher Chang (chrchang at alumni.caltech.edu)\n\n"
+"prettify v1.05 (5 Mar 2019) Christopher Chang (chrchang at alumni.caltech.edu)\n\n"
"Takes a tab-and/or-space-delimited text table, and generates a space-delimited\n"
"pretty-printed version. Multibyte character encodings are not currently\n"
"supported.\n\n"
@@ -611,10 +611,10 @@ int32_t main(int32_t argc, char** argv) {
fputs(
"\nTo perform the simplest reverse conversion (multiple spaces to one tab), you\n"
"can use\n"
-" cat [input filename] | tr -s ' ' '\\t' > [output filename]\n"
+" cat <input filename> | tr -s ' ' '\\t' > <output filename>\n"
"For one-to-one conversion between spaces and tabs instead, omit the \"-s\". And\n"
"to strip leading and trailing tabs and spaces, try\n"
-" cat [in] | sed 's/^[[:space:]]*//g' | sed 's/[[:space:]]*$//g' > [out]\n"
+" cat <in> | sed 's/^[[:space:]]*//g' | sed 's/[[:space:]]*$//g' > <out>\n"
, stdout);
retval = RET_HELP;
break;
View it on GitLab: https://salsa.debian.org/med-team/plink1-9/commit/145e0abae0e01ade8a213e135019991eb1c32a90
--
View it on GitLab: https://salsa.debian.org/med-team/plink1-9/commit/145e0abae0e01ade8a213e135019991eb1c32a90
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190913/f79959f7/attachment-0001.html>
More information about the debian-med-commit
mailing list