about summary refs log tree commit diff
path: root/src/param.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/param.cpp')
-rw-r--r--src/param.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/param.cpp b/src/param.cpp
index 7e34830..b2098ce 100644
--- a/src/param.cpp
+++ b/src/param.cpp
@@ -1309,7 +1309,14 @@ void PARAM::ReadBIMBAMGenotypes(gsl_matrix *UtX, gsl_matrix *K, const bool calc_
 }
 
 gsl_matrix *PARAM::MdbCalcKin() {
-  return mdb_calc_kin(file_geno, a_mode - 20, loco);
+  size_t n_used = 0;
+  gsl_matrix *K = mdb_calc_kin(file_geno, a_mode - 20, loco, n_used,
+                               maf_level, miss_level);
+  // Feed the log: ns_test was never set on this path, so "number of analyzed
+  // SNPs/var" printed whatever the PARAM object happened to hold.
+  ns_total = n_used;
+  ns_test = n_used;
+  return K;
 }
 
 void PARAM::CalcKin(gsl_matrix *matrix_kin) {