diff options
| author | Pjotr Prins | 2025-12-01 08:43:56 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2025-12-01 08:43:56 +0100 |
| commit | b76a21467c8692f263c07aa4f013370a8d10ce20 (patch) | |
| tree | 5c7a985c97e745e24b7793e5aa3114c9b6ff40a7 /src/param.cpp | |
| parent | e0a32b97dd2e6b0ab769b6e7ec6d3d217eeb15a0 (diff) | |
| download | pangemma-b76a21467c8692f263c07aa4f013370a8d10ce20.tar.gz | |
mdb gwa
Diffstat (limited to 'src/param.cpp')
| -rw-r--r-- | src/param.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
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. |
