about summary refs log tree commit diff
path: root/src/gemma.cpp
diff options
context:
space:
mode:
authorPjotr Prins2025-11-30 08:53:10 +0100
committerPjotr Prins2025-11-30 08:53:10 +0100
commitab434bbd38a61941bf32afcf91b7cc397462a53b (patch)
tree6bddea2b6a706a6f91ec98a654627f3458e84f9f /src/gemma.cpp
parent254113f4e02d5b423af302e9facb0ed580749ef5 (diff)
downloadpangemma-ab434bbd38a61941bf32afcf91b7cc397462a53b.tar.gz
Write out K
Diffstat (limited to 'src/gemma.cpp')
-rw-r--r--src/gemma.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gemma.cpp b/src/gemma.cpp
index 6b42763..1cced77 100644
--- a/src/gemma.cpp
+++ b/src/gemma.cpp
@@ -1915,7 +1915,16 @@ void GEMMA::BatchRun(PARAM &cPar) {
     cout << "Calculating Relatedness Matrix ... " << endl;
 
     if (cPar.is_mdb) {
-      cPar.MdbCalcKin();
+      time_start = clock();
+      auto K = cPar.MdbCalcKin();
+      cPar.time_G = (clock() - time_start) / (double(CLOCKS_PER_SEC) * 60.0);
+      if (cPar.a_mode == M_KIN) {
+        cPar.WriteMatrix(K, "cXX");
+      } else { // M_KIN2
+        cPar.WriteMatrix(K, "sXX");
+      }
+
+      gsl_matrix_safe_free(K);
       return;
     }