From b76a21467c8692f263c07aa4f013370a8d10ce20 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 1 Dec 2025 08:43:56 +0100 Subject: mdb gwa --- src/param.cpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'src/param.cpp') diff --git a/src/param.cpp b/src/param.cpp index f799ef7..955da8e 100644 --- a/src/param.cpp +++ b/src/param.cpp @@ -149,26 +149,28 @@ void PARAM::ReadFiles(void) { } } - // Read SNP set. - if (!file_snps.empty()) { - if (ReadFile_snps(file_snps, setSnps) == false) { - error = true; - } - } else { - setSnps.clear(); + if (file_geno.find(".mdb") != string::npos) { + is_mdb = true; } - // Read KSNP set. - if (!file_ksnps.empty()) { - if (ReadFile_snps(file_ksnps, setKSnps) == false) { - error = true; + if (!is_mdb) { + // Read SNP set into setSnps (without filtering) + if (!file_snps.empty()) { + if (ReadFile_snps(file_snps, setSnps) == false) { + error = true; + } + } else { + setSnps.clear(); } - } else { - setKSnps.clear(); - } - if (file_geno.find(".mdb") != string::npos) { - is_mdb = true; + // Also read KSNP set. Snps used by GRM. + if (!file_ksnps.empty()) { + if (ReadFile_snps(file_ksnps, setKSnps) == false) { + error = true; + } + } else { + setKSnps.clear(); + } } // For prediction. -- cgit 1.4.1