From 01fa01a3553eeadbdd56e11f5fcd020f4dd71310 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 28 Nov 2025 15:24:19 +0100 Subject: Simplify a bit and make guix.scm work without running out of RAM --- src/param.cpp | 9 ++++----- src/param.h | 3 --- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/param.cpp b/src/param.cpp index 034b25c..017d588 100644 --- a/src/param.cpp +++ b/src/param.cpp @@ -323,7 +323,7 @@ void PARAM::ReadFiles(void) { trim_individuals(indicator_idv, ni_max); trim_individuals(indicator_cvt, ni_max); // The following reads the geno file to get the SNPs - only for BIMBAM - if (is_bimbam && ReadFile_bimbam_geno(file_geno, setSnps, W2, indicator_idv, indicator_snp, + if (ReadFile_bimbam_geno(file_geno, setSnps, W2, indicator_idv, indicator_snp, maf_level, miss_level, hwe_level, r2_level, mapRS2chr, mapRS2bp, mapRS2cM, snpInfo, ns_test) == false) { error = true; @@ -1285,8 +1285,7 @@ void PARAM::ReadBIMBAMGenotypes(gsl_matrix *UtX, gsl_matrix *K, const bool calc_ error = true; } } else { - // Read BIMBAM - if (is_bimbam && ReadFile_geno(file_geno, indicator_idv, indicator_snp, UtX, K, calc_K) == false) { + if (ReadFile_geno(file_geno, indicator_idv, indicator_snp, UtX, K, calc_K) == false) { error = true; } } @@ -1311,10 +1310,10 @@ void PARAM::CalcKin(gsl_matrix *matrix_kin) { file_str = file_geno; if (is_mdb) error = !BimbamKin(file_str, setKSnps, indicator_snp, a_mode - 20, d_pace, - matrix_kin, ni_max == 0) == false); + matrix_kin, ni_max == 0); else error = !BimbamKin(file_str, setKSnps, indicator_snp, a_mode - 20, d_pace, - matrix_kin, ni_max == 0) == false); + matrix_kin, ni_max == 0); } diff --git a/src/param.h b/src/param.h index 978196c..38b9430 100644 --- a/src/param.h +++ b/src/param.h @@ -372,7 +372,4 @@ public: size_t GetabIndex(const size_t a, const size_t b, const size_t n_cvt); -#define is_bimbam (!is_mdb) -#define compute_kinship (a_mode == M_KIN || a_mode == M_KIN2) - #endif -- cgit 1.4.1