diff options
| author | Pjotr Prins | 2025-11-28 15:24:19 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2025-11-28 15:24:19 +0100 |
| commit | 01fa01a3553eeadbdd56e11f5fcd020f4dd71310 (patch) | |
| tree | 396df61a3d03fb299e467f035c03d2ded9d0aa44 | |
| parent | 12dc6b3e92a85f3b50cb35f36058e0c97bd081c7 (diff) | |
| download | pangemma-01fa01a3553eeadbdd56e11f5fcd020f4dd71310.tar.gz | |
Simplify a bit and make guix.scm work without running out of RAM
| -rw-r--r-- | guix/guix.scm (renamed from guix.scm) | 8 | ||||
| -rw-r--r-- | src/param.cpp | 9 | ||||
| -rw-r--r-- | src/param.h | 3 |
3 files changed, 9 insertions, 11 deletions
diff --git a/guix.scm b/guix/guix.scm index 1efe946..90ef001 100644 --- a/guix.scm +++ b/guix/guix.scm @@ -1,14 +1,16 @@ ;; To use this file to build HEAD of gemma: ;; -;; guix build -f guix.scm # default builds pangemma-git +;; guix build -f guix/guix.scm # default builds pangemma-git ;; ;; To get a development container (e.g., run in emacs shell). ;; -;; guix shell -C -D -F -v 3 -f guix.scm # pangemma-shell-git +;; guix shell -C -D -F -f guix/guix.scm # pangemma-shell-git +;; +;; see premake5.lua for build/test instructions ;; ;; optimized for arch: ;; -;; guix shell --tune=native -C -D -F -v 3 # pangemma-shell-git +;; guix shell --tune=native -C -D -F # pangemma-shell-git ;; ;; see premake5.lua header for examples. ;; 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 |
